Files
libreoffice/vcl/source/window/window2.cxx

1750 lines
48 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:07:07 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
2000-09-18 16:07:07 +00:00
#include <limits.h>
#include <tools/debug.hxx>
#include <tools/poly.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/event.hxx>
#include <vcl/timer.hxx>
#include <vcl/metric.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/dockwin.hxx>
2000-09-18 16:07:07 +00:00
#include <window.h>
#include <outfont.hxx>
#include <outdev.h>
#include <svdata.hxx>
#include <impbmp.hxx>
#include <salbmp.hxx>
#include <salgdi.hxx>
#include <salframe.hxx>
#include <scrwnd.hxx>
2000-09-18 16:07:07 +00:00
// =======================================================================
DBG_NAMEEX( Window )
2000-09-18 16:07:07 +00:00
// =======================================================================
#define IMPL_MAXSAVEBACKSIZE (640*480)
#define IMPL_MAXALLSAVEBACKSIZE (800*600*2)
// =======================================================================
struct ImplFocusDelData : public ImplDelData
{
Window* mpFocusWin;
};
// =======================================================================
sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
DBG_CHKOBJ( pTestWindow, Window, ImplDbgCheckWindow );
// check for overlapping window
2000-09-18 16:07:07 +00:00
pTestWindow = pTestWindow->ImplGetFirstOverlapWindow();
const Window* pTempWindow = pTestWindow;
const Window* pThisWindow = ImplGetFirstOverlapWindow();
if ( pTempWindow == pThisWindow )
return sal_False;
2000-09-18 16:07:07 +00:00
do
{
if ( pTempWindow == pThisWindow )
return sal_True;
if ( pTempWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
pTempWindow = pThisWindow;
do
{
if ( pTempWindow == pTestWindow )
return sal_False;
if ( pTempWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
// move window to same level
if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nThisLevel = 0;
sal_uInt16 nTestLevel = 0;
2000-09-18 16:07:07 +00:00
pTempWindow = pThisWindow;
do
{
nThisLevel++;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( !pTempWindow->mpWindowImpl->mbFrame );
2000-09-18 16:07:07 +00:00
pTempWindow = pTestWindow;
do
{
nTestLevel++;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( !pTempWindow->mpWindowImpl->mbFrame );
2000-09-18 16:07:07 +00:00
if ( nThisLevel < nTestLevel )
{
do
{
if ( pTestWindow->mpWindowImpl->mpOverlapWindow == pThisWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
break;
if ( pTestWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTestWindow = pTestWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTestWindow );
}
else
{
do
{
if ( pThisWindow->mpWindowImpl->mpOverlapWindow == pTempWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
break;
if ( pThisWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pThisWindow = pThisWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pThisWindow );
}
}
// if TestWindow is before ThisWindow, it is in front
2000-09-18 16:07:07 +00:00
pTempWindow = pTestWindow;
do
{
if ( pTempWindow == pThisWindow )
return sal_True;
pTempWindow = pTempWindow->mpWindowImpl->mpNext;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
return sal_False;
2000-09-18 16:07:07 +00:00
}
// =======================================================================
void Window::ImplSaveOverlapBackground()
{
DBG_ASSERT( !mpWindowImpl->mpOverlapData->mpSaveBackDev, "Window::ImplSaveOverlapBackground() - Background already saved" );
2000-09-18 16:07:07 +00:00
if ( !mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
{
sal_uLong nSaveBackSize = mnOutWidth*mnOutHeight;
2000-09-18 16:07:07 +00:00
if ( nSaveBackSize <= IMPL_MAXSAVEBACKSIZE )
{
if ( nSaveBackSize+mpWindowImpl->mpFrameData->mnAllSaveBackSize <= IMPL_MAXALLSAVEBACKSIZE )
2000-09-18 16:07:07 +00:00
{
Size aOutSize( mnOutWidth, mnOutHeight );
mpWindowImpl->mpOverlapData->mpSaveBackDev = new VirtualDevice( *mpWindowImpl->mpFrameWindow );
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev->SetOutputSizePixel( aOutSize ) )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->mpFrameWindow->ImplUpdateAll();
2000-09-18 16:07:07 +00:00
if ( mpWindowImpl->mbInitWinClipRegion )
2000-09-18 16:07:07 +00:00
ImplInitWinClipRegion();
mpWindowImpl->mpOverlapData->mnSaveBackSize = nSaveBackSize;
mpWindowImpl->mpFrameData->mnAllSaveBackSize += nSaveBackSize;
2000-09-18 16:07:07 +00:00
Point aDevPt;
mpWindowImpl->mpFrameWindow->ImplGetFrameDev( Point( mnOutOffX, mnOutOffY ),
2000-09-18 16:07:07 +00:00
aDevPt, aOutSize,
*(mpWindowImpl->mpOverlapData->mpSaveBackDev) );
mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpFrameData->mpFirstBackWin;
mpWindowImpl->mpFrameData->mpFirstBackWin = this;
2000-09-18 16:07:07 +00:00
}
else
{
delete mpWindowImpl->mpOverlapData->mpSaveBackDev;
mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
2000-09-18 16:07:07 +00:00
}
}
}
}
}
// -----------------------------------------------------------------------
sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mbInitWinClipRegion )
2000-09-18 16:07:07 +00:00
ImplInitWinClipRegion();
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +00:00
{
Point aDevPt;
Point aDestPt( mnOutOffX, mnOutOffY );
Size aDevSize = mpWindowImpl->mpOverlapData->mpSaveBackDev->GetOutputSizePixel();
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->mpOverlapData->mpSaveBackRgn->Intersect( mpWindowImpl->maWinClipRegion );
rInvRegion = mpWindowImpl->maWinClipRegion;
rInvRegion.Exclude( *mpWindowImpl->mpOverlapData->mpSaveBackRgn );
mpWindowImpl->mpFrameWindow->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
*(mpWindowImpl->mpOverlapData->mpSaveBackDev),
*mpWindowImpl->mpOverlapData->mpSaveBackRgn );
2000-09-18 16:07:07 +00:00
}
else
{
mpWindowImpl->mpFrameWindow->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
*(mpWindowImpl->mpOverlapData->mpSaveBackDev),
mpWindowImpl->maWinClipRegion );
2000-09-18 16:07:07 +00:00
}
ImplDeleteOverlapBackground();
}
return sal_True;
2000-09-18 16:07:07 +00:00
}
return sal_False;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::ImplDeleteOverlapBackground()
{
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->mpFrameData->mnAllSaveBackSize -= mpWindowImpl->mpOverlapData->mnSaveBackSize;
delete mpWindowImpl->mpOverlapData->mpSaveBackDev;
mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
2000-09-18 16:07:07 +00:00
{
delete mpWindowImpl->mpOverlapData->mpSaveBackRgn;
mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
2000-09-18 16:07:07 +00:00
}
// remove window from the list
if ( mpWindowImpl->mpFrameData->mpFirstBackWin == this )
mpWindowImpl->mpFrameData->mpFirstBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
2000-09-18 16:07:07 +00:00
else
{
Window* pTemp = mpWindowImpl->mpFrameData->mpFirstBackWin;
while ( pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin != this )
pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin;
pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
2000-09-18 16:07:07 +00:00
}
mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------
void Window::ImplInvalidateAllOverlapBackgrounds()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin;
2000-09-18 16:07:07 +00:00
while ( pWindow )
{
// remember next window here already, as this window could
// be removed within the next if clause from the list
Window* pNext = pWindow->mpWindowImpl->mpOverlapData->mpNextBackWin;
2000-09-18 16:07:07 +00:00
if ( ImplIsWindowInFront( pWindow ) )
{
Rectangle aRect1( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
Rectangle aRect2( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
aRect1.Intersection( aRect2 );
if ( !aRect1.IsEmpty() )
{
if ( !pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn )
pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn = new Region( aRect2 );
pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->Exclude( aRect1 );
if ( pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->IsEmpty() )
2000-09-18 16:07:07 +00:00
pWindow->ImplDeleteOverlapBackground();
}
}
pWindow = pNext;
}
}
// -----------------------------------------------------------------------
void Window::ShowFocus( const Rectangle& rRect )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if( mpWindowImpl->mbInShowFocus )
return;
mpWindowImpl->mbInShowFocus = sal_True;
2000-09-18 16:07:07 +00:00
ImplWinData* pWinData = ImplGetWinData();
// native themeing suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
2000-09-18 16:07:07 +00:00
{
if ( !mpWindowImpl->mbInPaint )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mbFocusVisible )
{
if ( *(pWinData->mpFocusRect) == rRect )
{
mpWindowImpl->mbInShowFocus = sal_False;
return;
}
2000-09-18 16:07:07 +00:00
ImplInvertFocus( *(pWinData->mpFocusRect) );
}
2000-09-18 16:07:07 +00:00
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
pWinData->mpFocusRect = new Rectangle( rRect );
else
*(pWinData->mpFocusRect) = rRect;
mpWindowImpl->mbFocusVisible = sal_True;
2000-09-18 16:07:07 +00:00
}
else
{
if( ! mpWindowImpl->mbNativeFocusVisible )
{
mpWindowImpl->mbNativeFocusVisible = sal_True;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
mpWindowImpl->mbInShowFocus = sal_False;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::HideFocus()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if( mpWindowImpl->mbInHideFocus )
2000-09-18 16:07:07 +00:00
return;
mpWindowImpl->mbInHideFocus = sal_True;
// native themeing can suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
{
if ( !mpWindowImpl->mbFocusVisible )
{
mpWindowImpl->mbInHideFocus = sal_False;
return;
}
2000-09-18 16:07:07 +00:00
if ( !mpWindowImpl->mbInPaint )
ImplInvertFocus( *(ImplGetWinData()->mpFocusRect) );
mpWindowImpl->mbFocusVisible = sal_False;
}
else
{
if( mpWindowImpl->mbNativeFocusVisible )
{
mpWindowImpl->mbNativeFocusVisible = sal_False;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
mpWindowImpl->mbInHideFocus = sal_False;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::Invert( const Rectangle& rRect, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( !IsDeviceOutputNecessary() )
return;
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
aRect.Justify();
// we need a graphics
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
return;
}
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
return;
SalInvert nSalFlags = 0;
if ( nFlags & INVERT_HIGHLIGHT )
nSalFlags |= SAL_INVERT_HIGHLIGHT;
if ( nFlags & INVERT_50 )
nSalFlags |= SAL_INVERT_50;
2002-08-29 14:42:38 +00:00
mpGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), nSalFlags, this );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( !IsDeviceOutputNecessary() )
return;
sal_uInt16 nPoints = rPoly.GetSize();
2000-09-18 16:07:07 +00:00
if ( nPoints < 2 )
return;
Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
// we need a graphics
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
return;
}
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
return;
SalInvert nSalFlags = 0;
if ( nFlags & INVERT_HIGHLIGHT )
nSalFlags |= SAL_INVERT_HIGHLIGHT;
if ( nFlags & INVERT_50 )
nSalFlags |= SAL_INVERT_50;
const SalPoint* pPtAry = (const SalPoint*)aPoly.GetConstPointAry();
2002-08-29 14:42:38 +00:00
mpGraphics->Invert( nPoints, pPtAry, nSalFlags, this );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
ImplWinData* pWinData = ImplGetWinData();
if ( !mpWindowImpl->mbInPaint || !(nFlags & SHOWTRACK_WINDOW) )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mbTrackVisible )
2000-09-18 16:07:07 +00:00
{
if ( (*(pWinData->mpTrackRect) == rRect) &&
(pWinData->mnTrackFlags == nFlags) )
return;
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
}
InvertTracking( rRect, nFlags );
}
if ( !pWinData->mpTrackRect )
pWinData->mpTrackRect = new Rectangle( rRect );
else
*(pWinData->mpTrackRect) = rRect;
pWinData->mnTrackFlags = nFlags;
mpWindowImpl->mbTrackVisible = sal_True;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::HideTracking()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mbTrackVisible )
2000-09-18 16:07:07 +00:00
{
ImplWinData* pWinData = ImplGetWinData();
if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
2000-09-18 16:07:07 +00:00
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
mpWindowImpl->mbTrackVisible = sal_False;
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------
void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
aRect.Justify();
SalGraphics* pGraphics;
if ( nFlags & SHOWTRACK_WINDOW )
{
if ( !IsDeviceOutputNecessary() )
return;
// we need a graphics
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
return;
}
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
return;
pGraphics = mpGraphics;
}
else
{
pGraphics = ImplGetFrameGraphics();
if ( nFlags & SHOWTRACK_CLIP )
{
Point aPoint( mnOutOffX, mnOutOffY );
Region aRegion( Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
2000-09-18 16:07:07 +00:00
}
}
sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE;
2000-09-18 16:07:07 +00:00
if ( nStyle == SHOWTRACK_OBJECT )
2002-08-29 14:42:38 +00:00
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_TRACKFRAME, this );
2000-09-18 16:07:07 +00:00
else if ( nStyle == SHOWTRACK_SPLIT )
2002-08-29 14:42:38 +00:00
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_50, this );
2000-09-18 16:07:07 +00:00
else
{
long nBorder = 1;
if ( nStyle == SHOWTRACK_BIG )
nBorder = 5;
2002-08-29 14:42:38 +00:00
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SAL_INVERT_50, this );
pGraphics->Invert( aRect.Left(), aRect.Bottom()-nBorder+1, aRect.GetWidth(), nBorder, SAL_INVERT_50, this );
pGraphics->Invert( aRect.Left(), aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SAL_INVERT_50, this );
pGraphics->Invert( aRect.Right()-nBorder+1, aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SAL_INVERT_50, this );
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------
void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
sal_uInt16 nPoints = rPoly.GetSize();
2000-09-18 16:07:07 +00:00
if ( nPoints < 2 )
return;
Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
SalGraphics* pGraphics;
if ( nFlags & SHOWTRACK_WINDOW )
{
if ( !IsDeviceOutputNecessary() )
return;
// we need a graphics
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
return;
}
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
return;
pGraphics = mpGraphics;
}
else
{
pGraphics = ImplGetFrameGraphics();
if ( nFlags & SHOWTRACK_CLIP )
{
Point aPoint( mnOutOffX, mnOutOffY );
Region aRegion( Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
2000-09-18 16:07:07 +00:00
}
}
const SalPoint* pPtAry = (const SalPoint*)aPoly.GetConstPointAry();
2002-08-29 14:42:38 +00:00
pGraphics->Invert( nPoints, pPtAry, SAL_INVERT_TRACKFRAME, this );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer )
{
ImplSVData* pSVData = ImplGetSVData();
// Bei Button-Repeat muessen wir den Timeout umsetzen
if ( pSVData->maWinData.mnTrackFlags & STARTTRACK_BUTTONREPEAT )
pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
// Tracking-Event erzeugen
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
if( ImplIsAntiparallel() )
{
// - RTL - re-mirror frame pos at pChild
ImplReMirror( aMousePos );
}
2000-09-18 16:07:07 +00:00
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
mpWindowImpl->mpFrameData->mnClickCount, 0,
mpWindowImpl->mpFrameData->mnMouseCode, mpWindowImpl->mpFrameData->mnMouseCode );
2000-09-18 16:07:07 +00:00
TrackingEvent aTEvt( aMEvt, TRACKING_REPEAT );
Tracking( aTEvt );
return 0;
}
// -----------------------------------------------------------------------
void Window::StartTracking( sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpTrackWin != this )
{
if ( pSVData->maWinData.mpTrackWin )
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
}
if ( nFlags & (STARTTRACK_SCROLLREPEAT | STARTTRACK_BUTTONREPEAT) )
{
pSVData->maWinData.mpTrackTimer = new AutoTimer;
if ( nFlags & STARTTRACK_SCROLLREPEAT )
pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
else
pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
pSVData->maWinData.mpTrackTimer->SetTimeoutHdl( LINK( this, Window, ImplTrackTimerHdl ) );
pSVData->maWinData.mpTrackTimer->Start();
}
pSVData->maWinData.mpTrackWin = this;
pSVData->maWinData.mnTrackFlags = nFlags;
CaptureMouse();
}
// -----------------------------------------------------------------------
void Window::EndTracking( sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpTrackWin == this )
{
// due to DbgChkThis in brackets, as the window could be destroyed
// in the handler
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( pSVData->maWinData.mpTrackTimer )
{
delete pSVData->maWinData.mpTrackTimer;
pSVData->maWinData.mpTrackTimer = NULL;
}
pSVData->maWinData.mpTrackWin = NULL;
pSVData->maWinData.mnTrackFlags = 0;
ReleaseMouse();
}
// call EndTracking if required
2000-09-18 16:07:07 +00:00
if ( !(nFlags & ENDTRACK_DONTCALLHDL) )
{
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
if( ImplIsAntiparallel() )
{
// - RTL - re-mirror frame pos at pChild
ImplReMirror( aMousePos );
}
2000-09-18 16:07:07 +00:00
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
mpWindowImpl->mpFrameData->mnClickCount, 0,
mpWindowImpl->mpFrameData->mnMouseCode, mpWindowImpl->mpFrameData->mnMouseCode );
2000-09-18 16:07:07 +00:00
TrackingEvent aTEvt( aMEvt, nFlags | ENDTRACK_END );
Tracking( aTEvt );
}
}
}
// -----------------------------------------------------------------------
sal_Bool Window::IsTracking() const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
return (ImplGetSVData()->maWinData.mpTrackWin == this);
}
// -----------------------------------------------------------------------
void Window::StartAutoScroll( sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpAutoScrollWin != this )
{
if ( pSVData->maWinData.mpAutoScrollWin )
pSVData->maWinData.mpAutoScrollWin->EndAutoScroll();
}
pSVData->maWinData.mpAutoScrollWin = this;
pSVData->maWinData.mnAutoScrollFlags = nFlags;
pSVData->maAppData.mpWheelWindow = new ImplWheelWindow( this );
}
// -----------------------------------------------------------------------
void Window::EndAutoScroll()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpAutoScrollWin == this )
{
pSVData->maWinData.mpAutoScrollWin = NULL;
pSVData->maWinData.mnAutoScrollFlags = 0;
pSVData->maAppData.mpWheelWindow->ImplStop();
pSVData->maAppData.mpWheelWindow->doLazyDelete();
2000-09-18 16:07:07 +00:00
pSVData->maAppData.mpWheelWindow = NULL;
}
}
// -----------------------------------------------------------------------
void Window::SaveBackground( const Point& rPos, const Size& rSize,
const Point& rDestOff, VirtualDevice& rSaveDevice )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpPaintRegion )
2000-09-18 16:07:07 +00:00
{
Region aClip( *mpWindowImpl->mpPaintRegion );
2000-09-18 16:07:07 +00:00
const Point aPixPos( LogicToPixel( rPos ) );
aClip.Move( -mnOutOffX, -mnOutOffY );
aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
if ( !aClip.IsEmpty() )
{
const Region aOldClip( rSaveDevice.GetClipRegion() );
const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
const sal_Bool bMap = rSaveDevice.IsMapModeEnabled();
2000-09-18 16:07:07 +00:00
// move clip region to have the same distance to DestOffset
aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
// set pixel clip region
rSaveDevice.EnableMapMode( sal_False );
2000-09-18 16:07:07 +00:00
rSaveDevice.SetClipRegion( aClip );
rSaveDevice.EnableMapMode( bMap );
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
rSaveDevice.SetClipRegion( aOldClip );
}
}
else
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
}
// -----------------------------------------------------------------------
sal_uIntPtr Window::SaveFocus()
2000-09-18 16:07:07 +00:00
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpFocusWin )
{
ImplFocusDelData* pDelData = new ImplFocusDelData;
pSVData->maWinData.mpFocusWin->ImplAddDel( pDelData );
pDelData->mpFocusWin = pSVData->maWinData.mpFocusWin;
return (sal_uIntPtr)(void*)pDelData;
2000-09-18 16:07:07 +00:00
}
else
return 0;
}
// -----------------------------------------------------------------------
sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore )
2000-09-18 16:07:07 +00:00
{
if ( !nSaveId )
return sal_False;
2000-09-18 16:07:07 +00:00
else
{
sal_Bool bOK = sal_True;
2000-09-18 16:07:07 +00:00
ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId;
if ( !pDelData->IsDelete() )
{
pDelData->mpFocusWin->ImplRemoveDel( pDelData );
if ( bRestore )
pDelData->mpFocusWin->GrabFocus();
}
else
bOK = !bRestore;
delete pDelData;
return bOK;
}
}
// -----------------------------------------------------------------------
void Window::SetZoom( const Fraction& rZoom )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->maZoom != rZoom )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maZoom = rZoom;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_ZOOM );
}
}
// -----------------------------------------------------------------------
inline long WinFloatRound( double fVal )
{
return( fVal > 0.0 ? (long) ( fVal + 0.5 ) : -(long) ( -fVal + 0.5 ) );
}
// -----------------------------------------------------------------------
void Window::SetZoomedPointFont( const Font& rFont )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
const Fraction& rZoom = GetZoom();
if ( rZoom.GetNumerator() != rZoom.GetDenominator() )
{
Font aFont( rFont );
Size aSize = aFont.GetSize();
double n = (double)aSize.Width();
n *= (double)rZoom.GetNumerator();
n /= (double)rZoom.GetDenominator();
aSize.Width() = WinFloatRound( n );
n = (double)aSize.Height();
n *= (double)rZoom.GetNumerator();
n /= (double)rZoom.GetDenominator();
aSize.Height() = WinFloatRound( n );
aFont.SetSize( aSize );
SetPointFont( aFont );
// Use another font if the representation is to be scaled,
// and the actual font is not scalable
2000-09-18 16:07:07 +00:00
FontMetric aMetric = GetFontMetric();
long nFontDiff = Abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) )
{
sal_uInt16 nType;
2000-09-18 16:07:07 +00:00
if ( aMetric.GetPitch() == PITCH_FIXED )
2001-06-21 20:01:12 +00:00
nType = DEFAULTFONT_FIXED;
else
2001-06-21 20:01:12 +00:00
nType = DEFAULTFONT_UI_SANS;
Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguage(), 0 );
aFont.SetName( aTempFont.GetName() );
SetPointFont( aFont );
2000-09-18 16:07:07 +00:00
}
}
else
SetPointFont( rFont );
}
// -----------------------------------------------------------------------
long Window::CalcZoom( long nCalc ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
const Fraction& rZoom = GetZoom();
if ( rZoom.GetNumerator() != rZoom.GetDenominator() )
{
double n = (double)nCalc;
n *= (double)rZoom.GetNumerator();
n /= (double)rZoom.GetDenominator();
nCalc = WinFloatRound( n );
}
return nCalc;
}
// -----------------------------------------------------------------------
void Window::SetControlFont()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpControlFont )
2000-09-18 16:07:07 +00:00
{
delete mpWindowImpl->mpControlFont;
mpWindowImpl->mpControlFont = NULL;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFONT );
}
}
// -----------------------------------------------------------------------
void Window::SetControlFont( const Font& rFont )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( rFont == Font() )
{
SetControlFont();
return;
}
if ( mpWindowImpl->mpControlFont )
2000-09-18 16:07:07 +00:00
{
if ( *mpWindowImpl->mpControlFont == rFont )
2000-09-18 16:07:07 +00:00
return;
*mpWindowImpl->mpControlFont = rFont;
2000-09-18 16:07:07 +00:00
}
else
mpWindowImpl->mpControlFont = new Font( rFont );
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFONT );
}
// -----------------------------------------------------------------------
Font Window::GetControlFont() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpControlFont )
return *mpWindowImpl->mpControlFont;
2000-09-18 16:07:07 +00:00
else
{
Font aFont;
return aFont;
}
}
// -----------------------------------------------------------------------
void Window::SetControlForeground()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mbControlForeground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlForeground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
// -----------------------------------------------------------------------
void Window::SetControlForeground( const Color& rColor )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( rColor.GetTransparency() )
{
if ( mpWindowImpl->mbControlForeground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlForeground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
else
{
if ( mpWindowImpl->maControlForeground != rColor )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = rColor;
mpWindowImpl->mbControlForeground = sal_True;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
}
// -----------------------------------------------------------------------
void Window::SetControlBackground()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mbControlBackground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlBackground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
// -----------------------------------------------------------------------
void Window::SetControlBackground( const Color& rColor )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( rColor.GetTransparency() )
{
if ( mpWindowImpl->mbControlBackground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlBackground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
else
{
if ( mpWindowImpl->maControlBackground != rColor )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = rColor;
mpWindowImpl->mbControlBackground = sal_True;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
}
// -----------------------------------------------------------------------
Size Window::CalcWindowSize( const Size& rOutSz ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Size aSz = rOutSz;
aSz.Width() += mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder;
aSz.Height() += mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder;
2000-09-18 16:07:07 +00:00
return aSz;
}
// -----------------------------------------------------------------------
Size Window::CalcOutputSize( const Size& rWinSz ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Size aSz = rWinSz;
aSz.Width() -= mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder;
aSz.Height() -= mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder;
2000-09-18 16:07:07 +00:00
return aSz;
}
// -----------------------------------------------------------------------
Font Window::GetDrawPixelFont( OutputDevice* pDev ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Font aFont = GetPointFont();
Size aFontSize = aFont.GetSize();
MapMode aPtMapMode( MAP_POINT );
aFontSize = pDev->LogicToPixel( aFontSize, aPtMapMode );
aFont.SetSize( aFontSize );
return aFont;
}
// -----------------------------------------------------------------------
long Window::GetDrawPixel( OutputDevice* pDev, long nPixels ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
long nP = nPixels;
if ( pDev->GetOutDevType() != OUTDEV_WINDOW )
{
MapMode aMap( MAP_100TH_MM );
Size aSz( nP, 0 );
aSz = PixelToLogic( aSz, aMap );
aSz = pDev->LogicToPixel( aSz, aMap );
nP = aSz.Width();
}
return nP;
}
// -----------------------------------------------------------------------
sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd,
2000-09-18 16:07:07 +00:00
ScrollBar* pHScrl, ScrollBar* pVScrl )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
sal_Bool bRet = sal_False;
2000-09-18 16:07:07 +00:00
if ( pHScrl || pVScrl )
{
switch( rCmd.GetCommand() )
{
case COMMAND_STARTAUTOSCROLL:
{
sal_uInt16 nFlags = 0;
2000-09-18 16:07:07 +00:00
if ( pHScrl )
{
if ( (pHScrl->GetVisibleSize() < pHScrl->GetRangeMax()) &&
pHScrl->IsEnabled() && pHScrl->IsInputEnabled() && ! pHScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
nFlags |= AUTOSCROLL_HORZ;
}
if ( pVScrl )
{
if ( (pVScrl->GetVisibleSize() < pVScrl->GetRangeMax()) &&
pVScrl->IsEnabled() && pVScrl->IsInputEnabled() && ! pVScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
nFlags |= AUTOSCROLL_VERT;
}
if ( nFlags )
{
StartAutoScroll( nFlags );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
}
break;
case COMMAND_WHEEL:
{
const CommandWheelData* pData = rCmd.GetWheelData();
if ( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) )
2000-09-18 16:07:07 +00:00
{
sal_uLong nScrollLines = pData->GetScrollLines();
2000-09-18 16:07:07 +00:00
long nLines;
if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
if ( pData->GetDelta() < 0 )
nLines = -LONG_MAX;
else
nLines = LONG_MAX;
}
else
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
ImplHandleScroll( NULL,
0L,
pData->IsHorz() ? pHScrl : pVScrl,
nLines );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
break;
case COMMAND_AUTOSCROLL:
{
const CommandScrollData* pData = rCmd.GetAutoScrollData();
if ( pData && (pData->GetDeltaX() || pData->GetDeltaY()) )
{
ImplHandleScroll( pHScrl, pData->GetDeltaX(),
pVScrl, pData->GetDeltaY() );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
}
break;
default:
break;
}
}
return bRet;
}
// -----------------------------------------------------------------------
void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
ScrollBar* pVScrl, long nY )
{
if ( pHScrl && nX && pHScrl->IsEnabled() && pHScrl->IsInputEnabled() && ! pHScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
{
long nNewPos = pHScrl->GetThumbPos();
if ( nX == -LONG_MAX )
nNewPos += pHScrl->GetPageSize();
else if ( nX == LONG_MAX )
nNewPos -= pHScrl->GetPageSize();
else
{
const double fVal = (double)nNewPos - ((double)nX * pHScrl->GetLineSize());
if ( fVal < LONG_MIN )
nNewPos = LONG_MIN;
else if ( fVal > LONG_MAX )
nNewPos = LONG_MAX;
else
nNewPos = (long)fVal;
}
pHScrl->DoScroll( nNewPos );
}
if ( pVScrl && nY && pVScrl->IsEnabled() && pVScrl->IsInputEnabled() && ! pVScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
{
long nNewPos = pVScrl->GetThumbPos();
if ( nY == -LONG_MAX )
nNewPos += pVScrl->GetPageSize();
else if ( nY == LONG_MAX )
nNewPos -= pVScrl->GetPageSize();
else
{
const double fVal = (double)nNewPos - ((double)nY * pVScrl->GetLineSize());
if ( fVal < LONG_MIN )
nNewPos = LONG_MIN;
else if ( fVal > LONG_MAX )
nNewPos = LONG_MAX;
else
nNewPos = (long)fVal;
}
pVScrl->DoScroll( nNewPos );
}
}
DockingManager* Window::GetDockingManager()
{
return ImplGetDockingManager();
}
void Window::EnableDocking( sal_Bool bEnable )
{
// update list of dockable windows
if( bEnable )
ImplGetDockingManager()->AddWindow( this );
else
ImplGetDockingManager()->RemoveWindow( this );
}
// retrieves the list of owner draw decorated windows for this window hiearchy
::std::vector<Window *>& Window::ImplGetOwnerDrawList()
{
return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList;
}
Window* Window::ImplGetTopmostFrameWindow()
{
Window *pTopmostParent = this;
while( pTopmostParent->ImplGetParent() )
pTopmostParent = pTopmostParent->ImplGetParent();
return pTopmostParent->mpWindowImpl->mpFrameWindow;
}
void Window::SetHelpId( const rtl::OString& rHelpId )
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
mpWindowImpl->maHelpId = rHelpId;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
const rtl::OString& Window::GetHelpId() const
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
{
return mpWindowImpl->maHelpId;
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
}
void Window::SetUniqueId( const rtl::OString& rUniqueId )
{
mpWindowImpl->maUniqId = rUniqueId;
}
const rtl::OString& Window::GetUniqueId() const
{
return mpWindowImpl->maUniqId;
}
// --------- old inline methods ---------------
Window* Window::ImplGetWindow()
{
if ( mpWindowImpl->mpClientWindow )
return mpWindowImpl->mpClientWindow;
else
return this;
}
ImplFrameData* Window::ImplGetFrameData()
{
return mpWindowImpl->mpFrameData;
}
SalFrame* Window::ImplGetFrame() const
{
return mpWindowImpl->mpFrame;
}
Window* Window::ImplGetParent() const
{
return mpWindowImpl->mpParent;
}
Window* Window::ImplGetClientWindow() const
{
return mpWindowImpl->mpClientWindow;
}
Window* Window::ImplGetBorderWindow() const
{
return mpWindowImpl->mpBorderWindow;
}
Window* Window::ImplGetFirstOverlapWindow()
{
if ( mpWindowImpl->mbOverlapWin )
return this;
else
return mpWindowImpl->mpOverlapWindow;
}
const Window* Window::ImplGetFirstOverlapWindow() const
{
if ( mpWindowImpl->mbOverlapWin )
return this;
else
return mpWindowImpl->mpOverlapWindow;
}
Window* Window::ImplGetFrameWindow() const
{
return mpWindowImpl->mpFrameWindow;
}
sal_Bool Window::ImplIsDockingWindow() const
{
return mpWindowImpl->mbDockWin;
}
sal_Bool Window::ImplIsFloatingWindow() const
{
return mpWindowImpl->mbFloatWin;
}
sal_Bool Window::ImplIsSplitter() const
{
return mpWindowImpl->mbSplitter;
}
sal_Bool Window::ImplIsPushButton() const
{
return mpWindowImpl->mbPushButton;
}
sal_Bool Window::ImplIsOverlapWindow() const
{
return mpWindowImpl->mbOverlapWin;
}
void Window::ImplSetMouseTransparent( sal_Bool bTransparent )
{
mpWindowImpl->mbMouseTransparent = bTransparent;
}
Point Window::ImplOutputToFrame( const Point& rPos )
{
return Point( rPos.X()+mnOutOffX, rPos.Y()+mnOutOffY );
}
Point Window::ImplFrameToOutput( const Point& rPos )
{
return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY );
}
void Window::SetCompoundControl( sal_Bool bCompound )
{
mpWindowImpl->mbCompoundControl = bCompound;
}
void Window::IncrementLockCount()
{
mpWindowImpl->mnLockCount++;
}
void Window::DecrementLockCount()
{
mpWindowImpl->mnLockCount--;
}
WinBits Window::GetStyle() const
{
return mpWindowImpl->mnStyle;
}
WinBits Window::GetPrevStyle() const
{
return mpWindowImpl->mnPrevStyle;
}
WinBits Window::GetExtendedStyle() const
{
return mpWindowImpl->mnExtendedStyle;
}
void Window::SetType( WindowType nType )
{
mpWindowImpl->mnType = nType;
}
WindowType Window::GetType() const
{
return mpWindowImpl->mnType;
}
Window* Window::GetParentDialog() const
{
const Window *pWindow = this;
while( pWindow )
{
if( pWindow->IsDialog() )
break;
pWindow = pWindow->GetParent();
}
return const_cast<Window *>(pWindow);
}
sal_Bool Window::IsSystemWindow() const
{
return mpWindowImpl->mbSysWin;
}
sal_Bool Window::IsDialog() const
{
return mpWindowImpl->mbDialog;
}
sal_Bool Window::IsMenuFloatingWindow() const
{
return mpWindowImpl->mbMenuFloatingWindow;
}
sal_Bool Window::IsToolbarFloatingWindow() const
{
return mpWindowImpl->mbToolbarFloatingWindow;
}
void Window::EnableAllResize( sal_Bool bEnable )
{
mpWindowImpl->mbAllResize = bEnable;
}
void Window::EnableChildTransparentMode( sal_Bool bEnable )
{
mpWindowImpl->mbChildTransparent = bEnable;
}
sal_Bool Window::IsChildTransparentModeEnabled() const
{
return mpWindowImpl->mbChildTransparent;
}
sal_Bool Window::IsMouseTransparent() const
{
return mpWindowImpl->mbMouseTransparent;
}
sal_Bool Window::IsPaintTransparent() const
{
return mpWindowImpl->mbPaintTransparent;
}
void Window::SetDialogControlStart( sal_Bool bStart )
{
mpWindowImpl->mbDlgCtrlStart = bStart;
}
sal_Bool Window::IsDialogControlStart() const
{
return mpWindowImpl->mbDlgCtrlStart;
}
void Window::SetDialogControlFlags( sal_uInt16 nFlags )
{
mpWindowImpl->mnDlgCtrlFlags = nFlags;
}
sal_uInt16 Window::GetDialogControlFlags() const
{
return mpWindowImpl->mnDlgCtrlFlags;
}
const InputContext& Window::GetInputContext() const
{
return mpWindowImpl->maInputContext;
}
sal_Bool Window::IsControlFont() const
{
return (mpWindowImpl->mpControlFont != 0);
}
Color Window::GetControlForeground() const
{
return mpWindowImpl->maControlForeground;
}
sal_Bool Window::IsControlForeground() const
{
return mpWindowImpl->mbControlForeground;
}
Color Window::GetControlBackground() const
{
return mpWindowImpl->maControlBackground;
}
sal_Bool Window::IsControlBackground() const
{
return mpWindowImpl->mbControlBackground;
}
sal_Bool Window::IsInPaint() const
{
return mpWindowImpl->mbInPaint;
}
Window* Window::GetParent() const
{
return mpWindowImpl->mpRealParent;
}
sal_Bool Window::IsVisible() const
{
return mpWindowImpl->mbVisible;
}
sal_Bool Window::IsReallyVisible() const
{
return mpWindowImpl->mbReallyVisible;
}
sal_Bool Window::IsReallyShown() const
{
return mpWindowImpl->mbReallyShown;
}
sal_Bool Window::IsInInitShow() const
{
return mpWindowImpl->mbInInitShow;
}
sal_Bool Window::IsEnabled() const
{
return !mpWindowImpl->mbDisabled;
}
sal_Bool Window::IsInputEnabled() const
{
return !mpWindowImpl->mbInputDisabled;
}
sal_Bool Window::IsAlwaysEnableInput() const
{
return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
}
sal_uInt16 Window::GetActivateMode() const
{
return mpWindowImpl->mnActivateMode;
}
sal_Bool Window::IsAlwaysOnTopEnabled() const
{
return mpWindowImpl->mbAlwaysOnTop;
}
sal_Bool Window::IsDefaultPos() const
{
return mpWindowImpl->mbDefPos;
}
sal_Bool Window::IsDefaultSize() const
{
return mpWindowImpl->mbDefSize;
}
void Window::EnablePaint( sal_Bool bEnable )
{
mpWindowImpl->mbPaintDisabled = !bEnable;
}
sal_Bool Window::IsPaintEnabled() const
{
return !mpWindowImpl->mbPaintDisabled;
}
sal_Bool Window::IsUpdateMode() const
{
return !mpWindowImpl->mbNoUpdate;
}
void Window::SetParentUpdateMode( sal_Bool bUpdate )
{
mpWindowImpl->mbNoParentUpdate = !bUpdate;
}
sal_Bool Window::IsActive() const
{
return mpWindowImpl->mbActive;
}
sal_uInt16 Window::GetGetFocusFlags() const
{
return mpWindowImpl->mnGetFocusFlags;
}
sal_Bool Window::IsCompoundControl() const
{
return mpWindowImpl->mbCompoundControl;
}
sal_Bool Window::IsWait() const
{
return (mpWindowImpl->mnWaitCount != 0);
}
Cursor* Window::GetCursor() const
{
return mpWindowImpl->mpCursor;
}
const Fraction& Window::GetZoom() const
{
return mpWindowImpl->maZoom;
}
sal_Bool Window::IsZoom() const
{
return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
}
void Window::SetHelpText( const XubString& rHelpText )
{
mpWindowImpl->maHelpText = rHelpText;
mpWindowImpl->mbHelpTextDynamic = sal_True;
}
void Window::SetQuickHelpText( const XubString& rHelpText )
{
mpWindowImpl->maQuickHelpText = rHelpText;
}
const XubString& Window::GetQuickHelpText() const
{
return mpWindowImpl->maQuickHelpText;
}
void Window::SetData( void* pNewData )
{
mpWindowImpl->mpUserData = pNewData;
}
void* Window::GetData() const
{
return mpWindowImpl->mpUserData;
}
sal_Bool Window::IsCreatedWithToolkit() const
{
return mpWindowImpl->mbCreatedWithToolkit;
}
void Window::SetCreatedWithToolkit( sal_Bool b )
{
mpWindowImpl->mbCreatedWithToolkit = b;
}
const Pointer& Window::GetPointer() const
{
return mpWindowImpl->maPointer;
}
VCLXWindow* Window::GetWindowPeer() const
{
return mpWindowImpl->mpVCLXWindow;
}
void Window::SetPosPixel( const Point& rNewPos )
{
SetPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, WINDOW_POSSIZE_POS );
}
void Window::SetSizePixel( const Size& rNewSize )
{
SetPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(),
WINDOW_POSSIZE_SIZE );
}
void Window::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
SetPosSizePixel( rNewPos.X(), rNewPos.Y(),
rNewSize.Width(), rNewSize.Height(),
WINDOW_POSSIZE_POSSIZE );
}
void Window::SetOutputSizePixel( const Size& rNewSize )
{
SetSizePixel( Size( rNewSize.Width()+mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder,
rNewSize.Height()+mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder ) );
}
void Window::SetBackgroundBitmap( const BitmapEx& rBitmapEx )
{
if( !rBitmapEx.IsEmpty() )
{
SalBitmap* pBmp = rBitmapEx.ImplGetBitmapImpBitmap()->ImplGetSalBitmap();
ImplGetFrame()->SetBackgroundBitmap( pBmp );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */