diff options
Diffstat (limited to 'vcl/source/window/window.cxx')
-rwxr-xr-x | vcl/source/window/window.cxx | 1138 |
1 files changed, 569 insertions, 569 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index fdc3f20fea06..d7d22f3d5c5d 100755 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -114,12 +114,12 @@ DBG_NAME( Window ) // ======================================================================= -#define IMPL_PAINT_PAINT ((USHORT)0x0001) -#define IMPL_PAINT_PAINTALL ((USHORT)0x0002) -#define IMPL_PAINT_PAINTALLCHILDS ((USHORT)0x0004) -#define IMPL_PAINT_PAINTCHILDS ((USHORT)0x0008) -#define IMPL_PAINT_ERASE ((USHORT)0x0010) -#define IMPL_PAINT_CHECKRTL ((USHORT)0x0020) +#define IMPL_PAINT_PAINT ((sal_uInt16)0x0001) +#define IMPL_PAINT_PAINTALL ((sal_uInt16)0x0002) +#define IMPL_PAINT_PAINTALLCHILDS ((sal_uInt16)0x0004) +#define IMPL_PAINT_PAINTCHILDS ((sal_uInt16)0x0008) +#define IMPL_PAINT_ERASE ((sal_uInt16)0x0010) +#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020) // ----------------------------------------------------------------------- @@ -136,7 +136,7 @@ struct ImplCalcToTopData struct ImplAccessibleInfos { - USHORT nAccessibleRole; + sal_uInt16 nAccessibleRole; String* pAccessibleName; String* pAccessibleDescription; @@ -307,12 +307,12 @@ bool Window::ImplCheckUIFont( const Font& rFont ) // ----------------------------------------------------------------------- -void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) +void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl ) { // reset high contrast to false, so the system can either update it // or AutoDetectSystemHC can kick in (see below) StyleSettings aTmpSt( rSettings.GetStyleSettings() ); - aTmpSt.SetHighContrastMode( FALSE ); + aTmpSt.SetHighContrastMode( sal_False ); rSettings.SetStyleSettings( aTmpSt ); ImplGetFrame()->UpdateSettings( rSettings ); // reset default border width for layouters @@ -518,7 +518,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) || rSettings.GetStyleSettings().GetWindowColor().IsDark() ) { aStyleSettings = rSettings.GetStyleSettings(); - aStyleSettings.SetHighContrastMode( TRUE ); + aStyleSettings.SetHighContrastMode( sal_True ); rSettings.SetStyleSettings( aStyleSettings ); } } @@ -527,7 +527,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); if( pEnvHC && *pEnvHC ) { - aStyleSettings.SetHighContrastMode( TRUE ); + aStyleSettings.SetHighContrastMode( sal_True ); rSettings.SetStyleSettings( aStyleSettings ); } @@ -650,83 +650,83 @@ void Window::ImplInitWindowData( WindowType nType ) mpWindowImpl->mnDlgCtrlFlags = 0; // DialogControl-Flags mpWindowImpl->mnLockCount = 0; // LockCount mpWindowImpl->meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called - mpWindowImpl->mbFrame = FALSE; // TRUE: Window is a frame window - mpWindowImpl->mbBorderWin = FALSE; // TRUE: Window is a border window - mpWindowImpl->mbOverlapWin = FALSE; // TRUE: Window is a overlap window - mpWindowImpl->mbSysWin = FALSE; // TRUE: SystemWindow is the base class - mpWindowImpl->mbDialog = FALSE; // TRUE: Dialog is the base class - mpWindowImpl->mbDockWin = FALSE; // TRUE: DockingWindow is the base class - mpWindowImpl->mbFloatWin = FALSE; // TRUE: FloatingWindow is the base class - mpWindowImpl->mbPushButton = FALSE; // TRUE: PushButton is the base class - mpWindowImpl->mbToolBox = FALSE; // TRUE: ToolBox is the base class - mpWindowImpl->mbMenuFloatingWindow= FALSE; // TRUE: MenuFloatingWindow is the base class - mpWindowImpl->mbToolbarFloatingWindow= FALSE; // TRUE: ImplPopupFloatWin is the base class, used for subtoolbars - mpWindowImpl->mbSplitter = FALSE; // TRUE: Splitter is the base class - mpWindowImpl->mbVisible = FALSE; // TRUE: Show( TRUE ) called - mpWindowImpl->mbOverlapVisible = FALSE; // TRUE: Hide called for visible window from ImplHideAllOverlapWindow() - mpWindowImpl->mbDisabled = FALSE; // TRUE: Enable( FALSE ) called - mpWindowImpl->mbInputDisabled = FALSE; // TRUE: EnableInput( FALSE ) called - mpWindowImpl->mbDropDisabled = FALSE; // TRUE: Drop is enabled - mpWindowImpl->mbNoUpdate = FALSE; // TRUE: SetUpdateMode( FALSE ) called - mpWindowImpl->mbNoParentUpdate = FALSE; // TRUE: SetParentUpdateMode( FALSE ) called - mpWindowImpl->mbActive = FALSE; // TRUE: Window Active - mpWindowImpl->mbParentActive = FALSE; // TRUE: OverlapActive from Parent - mpWindowImpl->mbReallyVisible = FALSE; // TRUE: this and all parents to an overlaped window are visible - mpWindowImpl->mbReallyShown = FALSE; // TRUE: this and all parents to an overlaped window are shown - mpWindowImpl->mbInInitShow = FALSE; // TRUE: we are in InitShow - mpWindowImpl->mbChildNotify = FALSE; // TRUE: ChildNotify - mpWindowImpl->mbChildPtrOverwrite = FALSE; // TRUE: PointerStyle overwrites Child-Pointer - mpWindowImpl->mbNoPtrVisible = FALSE; // TRUE: ShowPointer( FALSE ) called - mpWindowImpl->mbMouseMove = FALSE; // TRUE: BaseMouseMove called - mpWindowImpl->mbPaintFrame = FALSE; // TRUE: Paint is visible, but not painted - mpWindowImpl->mbInPaint = FALSE; // TRUE: Inside PaintHdl - mpWindowImpl->mbMouseButtonDown = FALSE; // TRUE: BaseMouseButtonDown called - mpWindowImpl->mbMouseButtonUp = FALSE; // TRUE: BaseMouseButtonUp called - mpWindowImpl->mbKeyInput = FALSE; // TRUE: BaseKeyInput called - mpWindowImpl->mbKeyUp = FALSE; // TRUE: BaseKeyUp called - mpWindowImpl->mbCommand = FALSE; // TRUE: BaseCommand called - mpWindowImpl->mbDefPos = TRUE; // TRUE: Position is not Set - mpWindowImpl->mbDefSize = TRUE; // TRUE: Size is not Set - mpWindowImpl->mbCallMove = TRUE; // TRUE: Move must be called by Show - mpWindowImpl->mbCallResize = TRUE; // TRUE: Resize must be called by Show - mpWindowImpl->mbWaitSystemResize = TRUE; // TRUE: Wait for System-Resize - mpWindowImpl->mbInitWinClipRegion = TRUE; // TRUE: Calc Window Clip Region - mpWindowImpl->mbInitChildRegion = FALSE; // TRUE: InitChildClipRegion - mpWindowImpl->mbWinRegion = FALSE; // TRUE: Window Region - mpWindowImpl->mbClipChildren = FALSE; // TRUE: Child-Fenster muessen evt. geclippt werden - mpWindowImpl->mbClipSiblings = FALSE; // TRUE: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden - mpWindowImpl->mbChildTransparent = FALSE; // TRUE: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN) - mpWindowImpl->mbPaintTransparent = FALSE; // TRUE: Paints muessen auf Parent ausgeloest werden - mpWindowImpl->mbMouseTransparent = FALSE; // TRUE: Window is transparent for Mouse - mpWindowImpl->mbDlgCtrlStart = FALSE; // TRUE: Ab hier eigenes Dialog-Control - mpWindowImpl->mbFocusVisible = FALSE; // TRUE: Focus Visible - mpWindowImpl->mbUseNativeFocus = FALSE; - mpWindowImpl->mbNativeFocusVisible= FALSE; // TRUE: native Focus Visible - mpWindowImpl->mbInShowFocus = FALSE; // prevent recursion - mpWindowImpl->mbInHideFocus = FALSE; // prevent recursion - mpWindowImpl->mbTrackVisible = FALSE; // TRUE: Tracking Visible - mpWindowImpl->mbControlForeground = FALSE; // TRUE: Foreground-Property set - mpWindowImpl->mbControlBackground = FALSE; // TRUE: Background-Property set - mpWindowImpl->mbAlwaysOnTop = FALSE; // TRUE: immer vor allen anderen normalen Fenstern sichtbar - mpWindowImpl->mbCompoundControl = FALSE; // TRUE: Zusammengesetztes Control => Listener... - mpWindowImpl->mbCompoundControlHasFocus = FALSE; // TRUE: Zusammengesetztes Control hat irgendwo den Focus - mpWindowImpl->mbPaintDisabled = FALSE; // TRUE: Paint soll nicht ausgefuehrt werden - mpWindowImpl->mbAllResize = FALSE; // TRUE: Auch ResizeEvents mit 0,0 schicken - mpWindowImpl->mbInDtor = FALSE; // TRUE: Wir befinden uns im Window-Dtor - mpWindowImpl->mbExtTextInput = FALSE; // TRUE: ExtTextInput-Mode is active - mpWindowImpl->mbInFocusHdl = FALSE; // TRUE: Innerhalb vom GetFocus-Handler - mpWindowImpl->mbCreatedWithToolkit = FALSE; - mpWindowImpl->mbSuppressAccessibilityEvents = FALSE; // TRUE: do not send any accessibility events - mpWindowImpl->mbDrawSelectionBackground = FALSE; // TRUE: draws transparent window background to indicate (toolbox) selection - mpWindowImpl->mbIsInTaskPaneList = FALSE; // TRUE: window was added to the taskpanelist in the topmost system window + mpWindowImpl->mbFrame = sal_False; // sal_True: Window is a frame window + mpWindowImpl->mbBorderWin = sal_False; // sal_True: Window is a border window + mpWindowImpl->mbOverlapWin = sal_False; // sal_True: Window is a overlap window + mpWindowImpl->mbSysWin = sal_False; // sal_True: SystemWindow is the base class + mpWindowImpl->mbDialog = sal_False; // sal_True: Dialog is the base class + mpWindowImpl->mbDockWin = sal_False; // sal_True: DockingWindow is the base class + mpWindowImpl->mbFloatWin = sal_False; // sal_True: FloatingWindow is the base class + mpWindowImpl->mbPushButton = sal_False; // sal_True: PushButton is the base class + mpWindowImpl->mbToolBox = sal_False; // sal_True: ToolBox is the base class + mpWindowImpl->mbMenuFloatingWindow= sal_False; // sal_True: MenuFloatingWindow is the base class + mpWindowImpl->mbToolbarFloatingWindow= sal_False; // sal_True: ImplPopupFloatWin is the base class, used for subtoolbars + mpWindowImpl->mbSplitter = sal_False; // sal_True: Splitter is the base class + mpWindowImpl->mbVisible = sal_False; // sal_True: Show( sal_True ) called + mpWindowImpl->mbOverlapVisible = sal_False; // sal_True: Hide called for visible window from ImplHideAllOverlapWindow() + mpWindowImpl->mbDisabled = sal_False; // sal_True: Enable( sal_False ) called + mpWindowImpl->mbInputDisabled = sal_False; // sal_True: EnableInput( sal_False ) called + mpWindowImpl->mbDropDisabled = sal_False; // sal_True: Drop is enabled + mpWindowImpl->mbNoUpdate = sal_False; // sal_True: SetUpdateMode( sal_False ) called + mpWindowImpl->mbNoParentUpdate = sal_False; // sal_True: SetParentUpdateMode( sal_False ) called + mpWindowImpl->mbActive = sal_False; // sal_True: Window Active + mpWindowImpl->mbParentActive = sal_False; // sal_True: OverlapActive from Parent + mpWindowImpl->mbReallyVisible = sal_False; // sal_True: this and all parents to an overlaped window are visible + mpWindowImpl->mbReallyShown = sal_False; // sal_True: this and all parents to an overlaped window are shown + mpWindowImpl->mbInInitShow = sal_False; // sal_True: we are in InitShow + mpWindowImpl->mbChildNotify = sal_False; // sal_True: ChildNotify + mpWindowImpl->mbChildPtrOverwrite = sal_False; // sal_True: PointerStyle overwrites Child-Pointer + mpWindowImpl->mbNoPtrVisible = sal_False; // sal_True: ShowPointer( sal_False ) called + mpWindowImpl->mbMouseMove = sal_False; // sal_True: BaseMouseMove called + mpWindowImpl->mbPaintFrame = sal_False; // sal_True: Paint is visible, but not painted + mpWindowImpl->mbInPaint = sal_False; // sal_True: Inside PaintHdl + mpWindowImpl->mbMouseButtonDown = sal_False; // sal_True: BaseMouseButtonDown called + mpWindowImpl->mbMouseButtonUp = sal_False; // sal_True: BaseMouseButtonUp called + mpWindowImpl->mbKeyInput = sal_False; // sal_True: BaseKeyInput called + mpWindowImpl->mbKeyUp = sal_False; // sal_True: BaseKeyUp called + mpWindowImpl->mbCommand = sal_False; // sal_True: BaseCommand called + mpWindowImpl->mbDefPos = sal_True; // sal_True: Position is not Set + mpWindowImpl->mbDefSize = sal_True; // sal_True: Size is not Set + mpWindowImpl->mbCallMove = sal_True; // sal_True: Move must be called by Show + mpWindowImpl->mbCallResize = sal_True; // sal_True: Resize must be called by Show + mpWindowImpl->mbWaitSystemResize = sal_True; // sal_True: Wait for System-Resize + mpWindowImpl->mbInitWinClipRegion = sal_True; // sal_True: Calc Window Clip Region + mpWindowImpl->mbInitChildRegion = sal_False; // sal_True: InitChildClipRegion + mpWindowImpl->mbWinRegion = sal_False; // sal_True: Window Region + mpWindowImpl->mbClipChildren = sal_False; // sal_True: Child-Fenster muessen evt. geclippt werden + mpWindowImpl->mbClipSiblings = sal_False; // sal_True: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden + mpWindowImpl->mbChildTransparent = sal_False; // sal_True: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN) + mpWindowImpl->mbPaintTransparent = sal_False; // sal_True: Paints muessen auf Parent ausgeloest werden + mpWindowImpl->mbMouseTransparent = sal_False; // sal_True: Window is transparent for Mouse + mpWindowImpl->mbDlgCtrlStart = sal_False; // sal_True: Ab hier eigenes Dialog-Control + mpWindowImpl->mbFocusVisible = sal_False; // sal_True: Focus Visible + mpWindowImpl->mbUseNativeFocus = sal_False; + mpWindowImpl->mbNativeFocusVisible= sal_False; // sal_True: native Focus Visible + mpWindowImpl->mbInShowFocus = sal_False; // prevent recursion + mpWindowImpl->mbInHideFocus = sal_False; // prevent recursion + mpWindowImpl->mbTrackVisible = sal_False; // sal_True: Tracking Visible + mpWindowImpl->mbControlForeground = sal_False; // sal_True: Foreground-Property set + mpWindowImpl->mbControlBackground = sal_False; // sal_True: Background-Property set + mpWindowImpl->mbAlwaysOnTop = sal_False; // sal_True: immer vor allen anderen normalen Fenstern sichtbar + mpWindowImpl->mbCompoundControl = sal_False; // sal_True: Zusammengesetztes Control => Listener... + mpWindowImpl->mbCompoundControlHasFocus = sal_False; // sal_True: Zusammengesetztes Control hat irgendwo den Focus + mpWindowImpl->mbPaintDisabled = sal_False; // sal_True: Paint soll nicht ausgefuehrt werden + mpWindowImpl->mbAllResize = sal_False; // sal_True: Auch ResizeEvents mit 0,0 schicken + mpWindowImpl->mbInDtor = sal_False; // sal_True: Wir befinden uns im Window-Dtor + mpWindowImpl->mbExtTextInput = sal_False; // sal_True: ExtTextInput-Mode is active + mpWindowImpl->mbInFocusHdl = sal_False; // sal_True: Innerhalb vom GetFocus-Handler + mpWindowImpl->mbCreatedWithToolkit = sal_False; + mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; // sal_True: do not send any accessibility events + mpWindowImpl->mbDrawSelectionBackground = sal_False; // sal_True: draws transparent window background to indicate (toolbox) selection + mpWindowImpl->mbIsInTaskPaneList = sal_False; // sal_True: window was added to the taskpanelist in the topmost system window mpWindowImpl->mnNativeBackground = 0; // initialize later, depends on type - mpWindowImpl->mbCallHandlersDuringInputDisabled = FALSE; // TRUE: call event handlers even if input is disabled - mpWindowImpl->mbDisableAccessibleLabelForRelation = FALSE; // TRUE: do not set LabelFor relation on accessible objects - mpWindowImpl->mbDisableAccessibleLabeledByRelation = FALSE; // TRUE: do not set LabeledBy relation on accessible objects - mpWindowImpl->mbHelpTextDynamic = FALSE; // TRUE: append help id in HELP_DEBUG case - mpWindowImpl->mbFakeFocusSet = FALSE; // TRUE: pretend as if the window has focus. + mpWindowImpl->mbCallHandlersDuringInputDisabled = sal_False; // sal_True: call event handlers even if input is disabled + mpWindowImpl->mbDisableAccessibleLabelForRelation = sal_False; // sal_True: do not set LabelFor relation on accessible objects + mpWindowImpl->mbDisableAccessibleLabeledByRelation = sal_False; // sal_True: do not set LabeledBy relation on accessible objects + mpWindowImpl->mbHelpTextDynamic = sal_False; // sal_True: append help id in HELP_DEBUG case + mpWindowImpl->mbFakeFocusSet = sal_False; // sal_True: pretend as if the window has focus. - mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // TRUE: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active + mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // sal_True: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active } // ----------------------------------------------------------------------- @@ -753,7 +753,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste if ( !mpWindowImpl->mbFrame && !mpWindowImpl->mbBorderWin && !mpWindowImpl->mpBorderWindow && (nStyle & (WB_BORDER | WB_SYSTEMCHILDWINDOW) ) ) { - USHORT nBorderTypeStyle = 0; + sal_uInt16 nBorderTypeStyle = 0; if( (nStyle & WB_SYSTEMCHILDWINDOW) ) { // handle WB_SYSTEMCHILDWINDOW @@ -771,8 +771,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } else if( !mpWindowImpl->mbFrame && ! pParent ) { - mpWindowImpl->mbOverlapWin = TRUE; - mpWindowImpl->mbFrame = TRUE; + mpWindowImpl->mbOverlapWin = sal_True; + mpWindowImpl->mbFrame = sal_True; } // insert window in list @@ -787,7 +787,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL; mpWindowImpl->mpOverlapData->mpNextBackWin = NULL; mpWindowImpl->mpOverlapData->mnSaveBackSize = 0; - mpWindowImpl->mpOverlapData->mbSaveBack = FALSE; + mpWindowImpl->mpOverlapData->mbSaveBack = sal_False; mpWindowImpl->mpOverlapData->mnTopLevel = 1; } @@ -798,7 +798,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste if ( mpWindowImpl->mbFrame ) { // create frame - ULONG nFrameStyle = 0; + sal_uLong nFrameStyle = 0; if ( nStyle & WB_MOVEABLE ) nFrameStyle |= SAL_FRAME_STYLE_MOVEABLE; @@ -904,21 +904,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpFrameData->mnMouseCode = 0; mpWindowImpl->mpFrameData->mnMouseMode = 0; mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL; - mpWindowImpl->mpFrameData->mbHasFocus = FALSE; - mpWindowImpl->mpFrameData->mbInMouseMove = FALSE; - mpWindowImpl->mpFrameData->mbMouseIn = FALSE; - mpWindowImpl->mpFrameData->mbStartDragCalled = FALSE; - mpWindowImpl->mpFrameData->mbNeedSysWindow = FALSE; - mpWindowImpl->mpFrameData->mbMinimized = FALSE; - mpWindowImpl->mpFrameData->mbStartFocusState = FALSE; - mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = FALSE; - mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = FALSE; - mpWindowImpl->mpFrameData->mbSysObjFocus = FALSE; + mpWindowImpl->mpFrameData->mbHasFocus = sal_False; + mpWindowImpl->mpFrameData->mbInMouseMove = sal_False; + mpWindowImpl->mpFrameData->mbMouseIn = sal_False; + mpWindowImpl->mpFrameData->mbStartDragCalled = sal_False; + mpWindowImpl->mpFrameData->mbNeedSysWindow = sal_False; + mpWindowImpl->mpFrameData->mbMinimized = sal_False; + mpWindowImpl->mpFrameData->mbStartFocusState = sal_False; + mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = sal_False; + mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = sal_False; + mpWindowImpl->mpFrameData->mbSysObjFocus = sal_False; mpWindowImpl->mpFrameData->maPaintTimer.SetTimeout( 30 ); mpWindowImpl->mpFrameData->maPaintTimer.SetTimeoutHdl( LINK( this, Window, ImplHandlePaintHdl ) ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeout( 50 ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeoutHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) ); - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = FALSE; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_False; if ( pRealParent && IsTopWindow() ) { @@ -963,7 +963,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); OutputDevice::SetSettings( *pSVData->maAppData.mpSettings ); - pSVData->maAppData.mbSettingsInit = TRUE; + pSVData->maAppData.mbSettingsInit = sal_True; } // If we create a Window with default size, query this @@ -989,7 +989,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } const StyleSettings& rStyleSettings = maSettings.GetStyleSettings(); - USHORT nScreenZoom = rStyleSettings.GetScreenZoom(); + sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; maFont = rStyleSettings.GetAppFont(); @@ -1050,7 +1050,7 @@ void Window::ImplInsertWindow( Window* pParent ) mpWindowImpl->mpFrameData = pFrameParent->mpWindowImpl->mpFrameData; mpWindowImpl->mpFrame = pFrameParent->mpWindowImpl->mpFrame; mpWindowImpl->mpFrameWindow = pFrameParent; - mpWindowImpl->mbFrame = FALSE; + mpWindowImpl->mbFrame = sal_False; // search overlap window and insert window in list if ( ImplIsOverlapWindow() ) @@ -1089,7 +1089,7 @@ void Window::ImplInsertWindow( Window* pParent ) // ----------------------------------------------------------------------- -void Window::ImplRemoveWindow( BOOL bRemoveFrameData ) +void Window::ImplRemoveWindow( sal_Bool bRemoveFrameData ) { // Fenster aus den Listen austragen if ( !mpWindowImpl->mbFrame ) @@ -1142,7 +1142,7 @@ void Window::ImplRemoveWindow( BOOL bRemoveFrameData ) void Window::ImplCallResize() { - mpWindowImpl->mbCallResize = FALSE; + mpWindowImpl->mbCallResize = sal_False; if( GetBackground().IsGradient() ) Invalidate(); @@ -1160,7 +1160,7 @@ void Window::ImplCallResize() void Window::ImplCallMove() { - mpWindowImpl->mbCallMove = FALSE; + mpWindowImpl->mbCallMove = sal_False; if( mpWindowImpl->mbFrame ) { @@ -1229,7 +1229,7 @@ WinBits Window::ImplInitRes( const ResId& rResId ) void Window::ImplLoadRes( const ResId& rResId ) { - ULONG nObjMask = ReadLongRes(); + sal_uLong nObjMask = ReadLongRes(); // we need to calculate auto helpids before the resource gets closed // if the resource only contains flags, it will be closed before we try to read a help id @@ -1238,7 +1238,7 @@ void Window::ImplLoadRes( const ResId& rResId ) rtl::OString aHelpId = ImplAutoHelpID( rResId.GetResMgr() ); // ResourceStyle - ULONG nRSStyle = ReadLongRes(); + sal_uLong nRSStyle = ReadLongRes(); // WinBits ReadLongRes(); @@ -1247,8 +1247,8 @@ void Window::ImplLoadRes( const ResId& rResId ) SetHelpId( aHelpId ); - BOOL bPos = FALSE; - BOOL bSize = FALSE; + sal_Bool bPos = sal_False; + sal_Bool bSize = sal_False; Point aPos; Size aSize; @@ -1257,7 +1257,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // Groessenangabe aus der Resource verwenden MapUnit ePosMap = MAP_PIXEL; - bPos = TRUE; + bPos = sal_True; if ( nObjMask & WINDOW_XYMAPMODE ) ePosMap = (MapUnit)ReadLongRes(); @@ -1272,7 +1272,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // Groessenangabe aus der Resource verwenden MapUnit eSizeMap = MAP_PIXEL; - bSize = TRUE; + bSize = sal_True; if ( nObjMask & WINDOW_WHMAPMODE ) eSizeMap = (MapUnit)ReadLongRes(); @@ -1298,14 +1298,14 @@ void Window::ImplLoadRes( const ResId& rResId ) SetSizePixel( aSize ); if ( nRSStyle & RSWND_DISABLED ) - Enable( FALSE ); + Enable( sal_False ); if ( nObjMask & WINDOW_TEXT ) SetText( ReadStringRes() ); if ( nObjMask & WINDOW_HELPTEXT ) { SetHelpText( ReadStringRes() ); - mpWindowImpl->mbHelpTextDynamic = TRUE; + mpWindowImpl->mbHelpTextDynamic = sal_True; } if ( nObjMask & WINDOW_QUICKTEXT ) SetQuickHelpText( ReadStringRes() ); @@ -1316,7 +1316,7 @@ void Window::ImplLoadRes( const ResId& rResId ) if ( nObjMask & WINDOW_BORDER_STYLE ) { - USHORT nBorderStyle = (USHORT)ReadLongRes(); + sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes(); SetBorderStyle( nBorderStyle ); } } @@ -1337,9 +1337,9 @@ ImplWinData* Window::ImplGetWinData() const mpWindowImpl->mpWinData->mpFocusRect = NULL; mpWindowImpl->mpWinData->mpTrackRect = NULL; mpWindowImpl->mpWinData->mnTrackFlags = 0; - mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) - mpWindowImpl->mpWinData->mbMouseOver = FALSE; - mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API + mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) + mpWindowImpl->mpWinData->mbMouseOver = sal_False; + mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? sal_False : sal_True; // sal_True: try to draw this control with native theme API } return mpWindowImpl->mpWinData; @@ -1350,7 +1350,7 @@ ImplWinData* Window::ImplGetWinData() const SalGraphics* Window::ImplGetFrameGraphics() const { if ( mpWindowImpl->mpFrameWindow->mpGraphics ) - mpWindowImpl->mpFrameWindow->mbInitClipRegion = TRUE; + mpWindowImpl->mpFrameWindow->mbInitClipRegion = sal_True; else mpWindowImpl->mpFrameWindow->ImplGetGraphics(); mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion(); @@ -1380,7 +1380,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos ) if ( !mpWindowImpl->mbVisible ) return NULL; - USHORT nHitTest = ImplHitTest( rFramePos ); + sal_uInt16 nHitTest = ImplHitTest( rFramePos ); if ( nHitTest & WINDOW_HITTEST_INSIDE ) { // und danach gehen wir noch alle Child-Fenster durch @@ -1404,7 +1404,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos ) // ----------------------------------------------------------------------- -USHORT Window::ImplHitTest( const Point& rFramePos ) +sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) { Point aFramePos( rFramePos ); if( ImplIsAntiparallel() ) @@ -1424,7 +1424,7 @@ USHORT Window::ImplHitTest( const Point& rFramePos ) return 0; } - USHORT nHitTest = WINDOW_HITTEST_INSIDE; + sal_uInt16 nHitTest = WINDOW_HITTEST_INSIDE; if ( mpWindowImpl->mbMouseTransparent ) nHitTest |= WINDOW_HITTEST_TRANSPARENT; return nHitTest; @@ -1432,22 +1432,22 @@ USHORT Window::ImplHitTest( const Point& rFramePos ) // ----------------------------------------------------------------------- -BOOL Window::ImplIsRealParentPath( const Window* pWindow ) const +sal_Bool Window::ImplIsRealParentPath( const Window* pWindow ) const { pWindow = pWindow->GetParent(); while ( pWindow ) { if ( pWindow == this ) - return TRUE; + return sal_True; pWindow = pWindow->GetParent(); } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) const { do { @@ -1457,19 +1457,19 @@ BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return TRUE; + return sal_True; } while ( pWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::ImplIsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const { if ( this == pWindow ) - return TRUE; + return sal_True; return ImplIsChild( pWindow, bSystemWindow ); } @@ -1499,15 +1499,15 @@ int Window::ImplTestMousePointerSet() { // Wenn Mouse gecaptured ist, dann soll MousePointer umgeschaltet werden if ( IsMouseCaptured() ) - return TRUE; + return sal_True; // Wenn sich Mouse ueber dem Fenster befindet, dann soll MousePointer // umgeschaltet werden Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() ); if ( aClientRect.IsInside( GetPointerPosPixel() ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1515,7 +1515,7 @@ int Window::ImplTestMousePointerSet() PointerStyle Window::ImplGetMousePointer() const { PointerStyle ePointerStyle; - BOOL bWait = FALSE; + sal_Bool bWait = sal_False; if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) ePointerStyle = GetPointer().GetStyle(); @@ -1535,7 +1535,7 @@ PointerStyle Window::ImplGetMousePointer() const if ( pWindow->mpWindowImpl->mnWaitCount ) { ePointerStyle = POINTER_WAIT; - bWait = TRUE; + bWait = sal_True; } else { @@ -1558,11 +1558,11 @@ PointerStyle Window::ImplGetMousePointer() const void Window::ImplResetReallyVisible() { - BOOL bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; + sal_Bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; - mbDevOutput = FALSE; - mpWindowImpl->mbReallyVisible = FALSE; - mpWindowImpl->mbReallyShown = FALSE; + mbDevOutput = sal_False; + mpWindowImpl->mbReallyVisible = sal_False; + mpWindowImpl->mbReallyShown = sal_False; // the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge. // For this, the data member of the event must not be NULL. @@ -1600,11 +1600,11 @@ void Window::ImplSetReallyVisible() if( !mpWindowImpl->mbReallyShown ) ImplCallInitShow(); - BOOL bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; + sal_Bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; - mbDevOutput = TRUE; - mpWindowImpl->mbReallyVisible = TRUE; - mpWindowImpl->mbReallyShown = TRUE; + mbDevOutput = sal_True; + mpWindowImpl->mbReallyVisible = sal_True; + mpWindowImpl->mbReallyShown = sal_True; // the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge. // For this, the data member of the event must not be NULL. @@ -1637,10 +1637,10 @@ void Window::ImplSetReallyVisible() void Window::ImplCallInitShow() { - mpWindowImpl->mbReallyShown = TRUE; - mpWindowImpl->mbInInitShow = TRUE; + mpWindowImpl->mbReallyShown = sal_True; + mpWindowImpl->mbInInitShow = sal_True; StateChanged( STATE_CHANGE_INITSHOW ); - mpWindowImpl->mbInInitShow = FALSE; + mpWindowImpl->mbInInitShow = sal_False; Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) @@ -1696,7 +1696,7 @@ void Window::ImplInitResolutionSettings() if ( mpWindowImpl->mbFrame ) { const StyleSettings& rStyleSettings = maSettings.GetStyleSettings(); - USHORT nScreenZoom = rStyleSettings.GetScreenZoom(); + sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; SetPointFont( rStyleSettings.GetAppFont() ); @@ -1722,7 +1722,7 @@ void Window::ImplInitResolutionSettings() void Window::ImplPointToLogic( Font& rFont ) const { Size aSize = rFont.GetSize(); - USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); + sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); if ( aSize.Width() ) { @@ -1749,7 +1749,7 @@ void Window::ImplPointToLogic( Font& rFont ) const void Window::ImplLogicToPoint( Font& rFont ) const { Size aSize = rFont.GetSize(); - USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); + sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom(); if ( IsMapModeEnabled() ) aSize = LogicToPixel( aSize ); @@ -1773,13 +1773,13 @@ void Window::ImplLogicToPoint( Font& rFont ) const // ----------------------------------------------------------------------- -BOOL Window::ImplSysObjClip( const Region* pOldRegion ) +sal_Bool Window::ImplSysObjClip( const Region* pOldRegion ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( mpWindowImpl->mpSysObj ) { - BOOL bVisibleState = mpWindowImpl->mbReallyVisible; + sal_Bool bVisibleState = mpWindowImpl->mbReallyVisible; if ( bVisibleState ) { @@ -1800,7 +1800,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) Region aRegion = *pWinChildClipRegion; Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); Region aWinRectRegion( aWinRect ); - USHORT nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType(); + sal_uInt16 nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType(); if ( aRegion == aWinRectRegion ) mpWindowImpl->mpSysObj->ResetClipRegion(); @@ -1819,9 +1819,9 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) long nY; long nWidth; long nHeight; - ULONG nRectCount; + sal_uLong nRectCount; ImplRegionInfo aInfo; - BOOL bRegionRect; + sal_Bool bRegionRect; nRectCount = aRegion.GetRectCount(); mpWindowImpl->mpSysObj->BeginSetClipRegion( nRectCount ); @@ -1835,7 +1835,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion ) } } else - bVisibleState = FALSE; + bVisibleState = sal_False; } // Visible-Status updaten @@ -1899,31 +1899,31 @@ void Window::ImplUpdateSysObjClip() // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller ) { - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( mpWindowImpl->mpSysObj ) { Region* pOldRegion = NULL; if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion ) pOldRegion = new Region( mpWindowImpl->maWinClipRegion ); - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } if ( !ImplSysObjClip( pOldRegion ) ) { - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; - bUpdate = FALSE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; + bUpdate = sal_False; } if ( pOldRegion ) @@ -1931,14 +1931,14 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) } else { - mbInitClipRegion = TRUE; - mpWindowImpl->mbInitWinClipRegion = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInitWinClipRegion = sal_True; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -1947,15 +1947,15 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) { - BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); + sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -1964,18 +1964,18 @@ BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller ) +sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) { if ( !ImplIsOverlapWindow() ) { - BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); + sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller ); Window* pParent = ImplGetParent(); if ( pParent && ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP)) ) { - pParent->mbInitClipRegion = TRUE; - pParent->mpWindowImpl->mbInitChildRegion = TRUE; + pParent->mbInitClipRegion = sal_True; + pParent->mpWindowImpl->mbInitChildRegion = sal_True; } // Schwestern muessen ihre ClipRegion auch neu berechnen @@ -1985,7 +1985,7 @@ BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) ) - bUpdate = FALSE; + bUpdate = sal_False; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2065,7 +2065,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps ) +void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ) { if ( bThis ) ImplIntersectWindowClipRegion( rRegion ); @@ -2100,21 +2100,21 @@ void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps ) // ----------------------------------------------------------------------- -BOOL Window::ImplClipChilds( Region& rRegion ) +sal_Bool Window::ImplClipChilds( Region& rRegion ) { - BOOL bOtherClip = FALSE; + sal_Bool bOtherClip = sal_False; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) { // ParentClipMode-Flags auswerten - USHORT nClipMode = pWindow->GetParentClipMode(); + sal_uInt16 nClipMode = pWindow->GetParentClipMode(); if ( !(nClipMode & PARENTCLIPMODE_NOCLIP) && ((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) ) pWindow->ImplExcludeWindowRegion( rRegion ); else - bOtherClip = TRUE; + bOtherClip = sal_True; } pWindow = pWindow->mpWindowImpl->mpNext; @@ -2168,13 +2168,13 @@ void Window::ImplInitWinClipRegion() ImplClipSiblings( mpWindowImpl->maWinClipRegion ); // Clip Parent Boundaries - ImplClipBoundaries( mpWindowImpl->maWinClipRegion, FALSE, TRUE ); + ImplClipBoundaries( mpWindowImpl->maWinClipRegion, sal_False, sal_True ); // Clip Children if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren ) - mpWindowImpl->mbInitChildRegion = TRUE; + mpWindowImpl->mbInitChildRegion = sal_True; - mpWindowImpl->mbInitWinClipRegion = FALSE; + mpWindowImpl->mbInitWinClipRegion = sal_False; } // ----------------------------------------------------------------------- @@ -2199,7 +2199,7 @@ void Window::ImplInitWinChildClipRegion() ImplClipChilds( *mpWindowImpl->mpChildClipRegion ); } - mpWindowImpl->mbInitChildRegion = FALSE; + mpWindowImpl->mbInitChildRegion = sal_False; } // ----------------------------------------------------------------------- @@ -2280,7 +2280,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& // ----------------------------------------------------------------------- void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, - BOOL bChilds, BOOL bParent, BOOL bSiblings ) + sal_Bool bChilds, sal_Bool bParent, sal_Bool bSiblings ) { Region aRegion( rSourceRect ); if ( mpWindowImpl->mbWinRegion ) @@ -2352,13 +2352,13 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegio // ----------------------------------------------------------------------- -void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) +void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) { // call PrePaint. PrePaint may add to the invalidate region as well as // other parameters used below. PrePaint(); - mpWindowImpl->mbPaintFrame = FALSE; + mpWindowImpl->mbPaintFrame = sal_False; if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDS ) mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALLCHILDS | (nPaintFlags & IMPL_PAINT_PAINTALL); @@ -2412,8 +2412,8 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplHide(); - mbInitClipRegion = TRUE; - mpWindowImpl->mbInPaint = TRUE; + mbInitClipRegion = sal_True; + mpWindowImpl->mbInPaint = sal_True; // Paint-Region zuruecksetzen Region aPaintRegion( mpWindowImpl->maInvalidateRegion ); @@ -2453,11 +2453,11 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) if ( mpWindowImpl->mbFocusVisible ) ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) ); } - mpWindowImpl->mbInPaint = FALSE; - mbInitClipRegion = TRUE; + mpWindowImpl->mbInPaint = sal_False; + mbInitClipRegion = sal_True; mpWindowImpl->mpPaintRegion = NULL; if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplShow( FALSE ); + mpWindowImpl->mpCursor->ImplShow( sal_False ); } } else @@ -2483,7 +2483,7 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ) // #98943# draw toolbox selection if( !aSelectionRect.IsEmpty() ) - DrawSelectionBackground( aSelectionRect, 3, FALSE, TRUE, FALSE ); + DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False ); if ( pChildRegion ) delete pChildRegion; @@ -2550,14 +2550,14 @@ IMPL_LINK( Window, ImplHandleResizeTimerHdl, void*, EMPTYARG ) // ----------------------------------------------------------------------- -void Window::ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags ) +void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) { // PAINTCHILDS bei allen Parent-Fenster bis zum ersten OverlapWindow // setzen if ( !ImplIsOverlapWindow() ) { Window* pTempWindow = this; - USHORT nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0; + sal_uInt16 nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0; do { pTempWindow = pTempWindow->ImplGetParent(); @@ -2615,7 +2615,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) { Region aRegion = rRegion; - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); @@ -2645,7 +2645,7 @@ void Window::ImplInvalidateParentFrameRegion( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) +void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) { // Hintergrund-Sicherung zuruecksetzen @@ -2653,7 +2653,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) ImplInvalidateAllOverlapBackgrounds(); // Feststellen, was neu ausgegeben werden muss - BOOL bInvalidateAll = !pRegion; + sal_Bool bInvalidateAll = !pRegion; // Transparent-Invalidate beruecksichtigen Window* pOpaqueWindow = this; @@ -2666,7 +2666,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) { pOpaqueWindow = pTempWindow; nFlags |= INVALIDATE_CHILDREN; - bInvalidateAll = FALSE; + bInvalidateAll = sal_False; break; } @@ -2678,7 +2678,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) } // Region zusammenbauen - USHORT nOrgFlags = nFlags; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (INVALIDATE_CHILDREN | INVALIDATE_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2687,7 +2687,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) nFlags |= INVALIDATE_CHILDREN; } if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bInvalidateAll = FALSE; + bInvalidateAll = sal_False; if ( bInvalidateAll ) ImplInvalidateFrameRegion( NULL, nFlags ); else @@ -2706,7 +2706,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) else aRegion.Intersect( *pRegion ); } - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( nFlags & INVALIDATE_NOCHILDREN ) { nFlags &= ~INVALIDATE_CHILDREN; @@ -2733,7 +2733,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags ) void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - BOOL bChilds ) + sal_Bool bChilds ) { if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT ) { @@ -2748,7 +2748,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { - pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, TRUE ); + pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, sal_True ); pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2758,7 +2758,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - BOOL bChilds ) + sal_Bool bChilds ) { // Paint-Region auch verschieben, wenn noch Paints anstehen ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, bChilds ); @@ -2786,7 +2786,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, if ( !aPaintAllRegion.IsEmpty() ) { aPaintAllRegion.Move( nHorzScroll, nVertScroll ); - USHORT nPaintFlags = 0; + sal_uInt16 nPaintFlags = 0; if ( bChilds ) mpWindowImpl->mnPaintFlags |= INVALIDATE_CHILDREN; ImplInvalidateFrameRegion( &aPaintAllRegion, nPaintFlags ); @@ -2796,7 +2796,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, // ----------------------------------------------------------------------- -void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags ) +void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) { if ( !pRegion ) mpWindowImpl->maInvalidateRegion.SetEmpty(); @@ -2841,11 +2841,11 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) +void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) { // Region zusammenbauen - BOOL bValidateAll = !pRegion; - USHORT nOrgFlags = nFlags; + sal_Bool bValidateAll = !pRegion; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2854,7 +2854,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) nFlags |= VALIDATE_CHILDREN; } if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bValidateAll = FALSE; + bValidateAll = sal_False; if ( bValidateAll ) ImplValidateFrameRegion( NULL, nFlags ); else @@ -2863,7 +2863,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) Region aRegion( aRect ); if ( pRegion ) aRegion.Intersect( *pRegion ); - ImplClipBoundaries( aRegion, TRUE, TRUE ); + ImplClipBoundaries( aRegion, sal_True, sal_True ); if ( nFlags & VALIDATE_NOCHILDREN ) { nFlags &= ~VALIDATE_CHILDREN; @@ -2883,7 +2883,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags ) // ----------------------------------------------------------------------- void Window::ImplScroll( const Rectangle& rRect, - long nHorzScroll, long nVertScroll, USHORT nFlags ) + long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ) { if ( !IsDeviceOutputNecessary() ) return; @@ -2901,7 +2901,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplHide(); - USHORT nOrgFlags = nFlags; + sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) ) { if ( GetStyle() & WB_CLIPCHILDREN ) @@ -2911,14 +2911,14 @@ void Window::ImplScroll( const Rectangle& rRect, } Region aInvalidateRegion; - BOOL bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0; - BOOL bErase = (nFlags & SCROLL_NOERASE) == 0; + sal_Bool bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0; + sal_Bool bErase = (nFlags & SCROLL_NOERASE) == 0; if ( !mpWindowImpl->mpFirstChild ) - bScrollChilds = FALSE; + bScrollChilds = sal_False; // --- RTL --- check if this window requires special action - BOOL bReMirror = ( ImplIsAntiparallel() ); + sal_Bool bReMirror = ( ImplIsAntiparallel() ); Rectangle aRectMirror( rRect ); if( bReMirror ) @@ -2933,7 +2933,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !(nFlags & SCROLL_NOINVALIDATE) ) { - ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, TRUE, FALSE ); + ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, sal_True, sal_False ); // --- RTL --- // if the scrolling on the device is performed in the opposite direction @@ -2943,7 +2943,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !aInvalidateRegion.IsEmpty() ) { aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - bErase = TRUE; + bErase = sal_True; } if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) ) { @@ -2965,7 +2965,7 @@ void Window::ImplScroll( const Rectangle& rRect, aRegion.Exclude( aInvalidateRegion ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !bScrollChilds ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) @@ -3016,7 +3016,7 @@ void Window::ImplScroll( const Rectangle& rRect, // so it has to be re-mirrored before calling the Paint-handler mpWindowImpl->mnPaintFlags |= IMPL_PAINT_CHECKRTL; - USHORT nPaintFlags = INVALIDATE_CHILDREN; + sal_uInt16 nPaintFlags = INVALIDATE_CHILDREN; if ( !bErase ) nPaintFlags |= INVALIDATE_NOERASE; if ( !bScrollChilds ) @@ -3046,24 +3046,24 @@ void Window::ImplScroll( const Rectangle& rRect, Update(); if ( mpWindowImpl->mpCursor ) - mpWindowImpl->mpCursor->ImplShow( FALSE ); + mpWindowImpl->mpCursor->ImplShow( sal_False ); } // ----------------------------------------------------------------------- -void Window::ImplUpdateAll( BOOL bOverlapWindows ) +void Window::ImplUpdateAll( sal_Bool bOverlapWindows ) { if ( !mpWindowImpl->mbReallyVisible ) return; - BOOL bFlush = FALSE; + sal_Bool bFlush = sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = TRUE; + bFlush = sal_True; } // Ein Update wirkt immer auf das OverlapWindow, damit bei spaeteren @@ -3122,10 +3122,10 @@ void Window::ImplUpdateWindowPtr() // ----------------------------------------------------------------------- -void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame ) +void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) { - BOOL bVisible = IsVisible(); - Show( FALSE ); + sal_Bool bVisible = IsVisible(); + Show( sal_False ); ImplRemoveWindow( bNewFrame ); Window* pRealParent = mpWindowImpl->mpRealParent; ImplInsertWindow( ImplGetParent() ); @@ -3146,14 +3146,14 @@ void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame ) } if ( bVisible ) - Show( TRUE ); + Show( sal_True ); } // ----------------------------------------------------------------------- -BOOL Window::ImplUpdatePos() +sal_Bool Window::ImplUpdatePos() { - BOOL bSysChild = FALSE; + sal_Bool bSysChild = sal_False; if ( ImplIsOverlapWindow() ) { @@ -3172,12 +3172,12 @@ BOOL Window::ImplUpdatePos() while ( pChild ) { if ( pChild->ImplUpdatePos() ) - bSysChild = TRUE; + bSysChild = sal_True; pChild = pChild->mpWindowImpl->mpNext; } if ( mpWindowImpl->mpSysObj ) - bSysChild = TRUE; + bSysChild = sal_True; return bSysChild; } @@ -3199,12 +3199,12 @@ void Window::ImplUpdateSysObjPos() // ----------------------------------------------------------------------- void Window::ImplPosSizeWindow( long nX, long nY, - long nWidth, long nHeight, USHORT nFlags ) + long nWidth, long nHeight, sal_uInt16 nFlags ) { - BOOL bNewPos = FALSE; - BOOL bNewSize = FALSE; - BOOL bNewWidth = FALSE; - BOOL bCopyBits = FALSE; + sal_Bool bNewPos = sal_False; + sal_Bool bNewSize = sal_False; + sal_Bool bNewWidth = sal_False; + sal_Bool bCopyBits = sal_False; long nOldOutOffX = mnOutOffX; long nOldOutOffY = mnOutOffY; long nOldOutWidth = mnOutWidth; @@ -3226,17 +3226,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mnOutWidth && mnOutHeight && !mpWindowImpl->mbPaintTransparent && !mpWindowImpl->mbInitWinClipRegion && !mpWindowImpl->maWinClipRegion.IsEmpty() && !HasPaintEvent() ) - bCopyBits = TRUE; + bCopyBits = sal_True; } - BOOL bnXRecycled = FALSE; // avoid duplicate mirroring in RTL case + sal_Bool bnXRecycled = sal_False; // avoid duplicate mirroring in RTL case if ( nFlags & WINDOW_POSSIZE_WIDTH ) { if(!( nFlags & WINDOW_POSSIZE_X )) { nX = mpWindowImpl->mnX; nFlags |= WINDOW_POSSIZE_X; - bnXRecycled = TRUE; // we're using a mnX which was already mirrored in RTL case + bnXRecycled = sal_True; // we're using a mnX which was already mirrored in RTL case } if ( nWidth < 0 ) @@ -3244,9 +3244,9 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nWidth != mnOutWidth ) { mnOutWidth = nWidth; - bNewSize = TRUE; - bCopyBits = FALSE; - bNewWidth = TRUE; + bNewSize = sal_True; + bCopyBits = sal_False; + bNewWidth = sal_True; } } if ( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -3256,8 +3256,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nHeight != mnOutHeight ) { mnOutHeight = nHeight; - bNewSize = TRUE; - bCopyBits = FALSE; + bNewSize = sal_True; + bCopyBits = sal_False; } } @@ -3307,12 +3307,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, FALSE, TRUE, TRUE ); + *pOverlapRegion, sal_False, sal_True, sal_True ); } mpWindowImpl->mnX = nX; mpWindowImpl->maPos.X() = nOrgX; mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos) - bNewPos = TRUE; + bNewPos = sal_True; } } if ( nFlags & WINDOW_POSSIZE_Y ) @@ -3325,11 +3325,11 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, FALSE, TRUE, TRUE ); + *pOverlapRegion, sal_False, sal_True, sal_True ); } mpWindowImpl->mnY = nY; mpWindowImpl->maPos.Y() = nY; - bNewPos = TRUE; + bNewPos = sal_True; } } @@ -3345,7 +3345,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, */ if ( bNewPos || bNewSize ) { - BOOL bUpdateSysObjPos = FALSE; + sal_Bool bUpdateSysObjPos = sal_False; if ( bNewPos ) bUpdateSysObjPos = ImplUpdatePos(); @@ -3372,7 +3372,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, } else { - mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = TRUE; + mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = sal_True; } } } @@ -3398,12 +3398,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, else { if ( bNewPos ) - mpWindowImpl->mbCallMove = TRUE; + mpWindowImpl->mbCallMove = sal_True; if ( bNewSize ) - mpWindowImpl->mbCallResize = TRUE; + mpWindowImpl->mbCallResize = sal_True; } - BOOL bUpdateSysObjClip = FALSE; + sal_Bool bUpdateSysObjClip = sal_False; if ( IsReallyVisible() ) { if ( bNewPos || bNewSize ) @@ -3414,7 +3414,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); // Clip-Flag neu setzen - bUpdateSysObjClip = !ImplSetClipFlag( TRUE ); + bUpdateSysObjClip = !ImplSetClipFlag( sal_True ); } // Fensterinhalt invalidieren ? @@ -3422,8 +3422,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bNewPos ) { - BOOL bInvalidate = FALSE; - BOOL bParentPaint = TRUE; + sal_Bool bInvalidate = sal_False; + sal_Bool bParentPaint = sal_True; if ( !ImplIsOverlapWindow() ) bParentPaint = mpWindowImpl->mpParent->IsPaintEnabled(); if ( bCopyBits && bParentPaint && !HasPaintEvent() ) @@ -3433,7 +3433,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !pOverlapRegion->IsEmpty() ) { pOverlapRegion->Move( mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY ); @@ -3445,7 +3445,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ), mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY, - TRUE ); + sal_True ); SalGraphics* pGraphics = ImplGetFrameGraphics(); if ( pGraphics ) { @@ -3458,10 +3458,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, SAL_COPYAREA_WINDOWINVALIDATE, this ); } else - bInvalidate = TRUE; + bInvalidate = sal_True; } else - bInvalidate = TRUE; + bInvalidate = sal_True; if ( !bInvalidate ) { if ( !pOverlapRegion->IsEmpty() ) @@ -3469,10 +3469,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, } } else - bInvalidate = TRUE; + bInvalidate = sal_True; } else - bInvalidate = TRUE; + bInvalidate = sal_True; if ( bInvalidate ) ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN ); } @@ -3484,7 +3484,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); } @@ -3497,7 +3497,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Region aRegion( *pOldRegion ); if ( !mpWindowImpl->mbPaintTransparent ) ImplExcludeWindowRegion( aRegion ); - ImplClipBoundaries( aRegion, FALSE, TRUE ); + ImplClipBoundaries( aRegion, sal_False, sal_True ); if ( !aRegion.IsEmpty() && !mpWindowImpl->mpBorderWindow ) ImplInvalidateParentFrameRegion( aRegion ); } @@ -3588,7 +3588,7 @@ void Window::ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData ) // ----------------------------------------------------------------------- -void Window::ImplToTop( USHORT nFlags ) +void Window::ImplToTop( sal_uInt16 nFlags ) { DBG_ASSERT( ImplIsOverlapWindow(), "Window::ImplToTop(): Is not a OverlapWindow" ); @@ -3605,7 +3605,7 @@ void Window::ImplToTop( USHORT nFlags ) // do not bring floating windows on the client to top if( !ImplGetClientWindow() || !(ImplGetClientWindow()->GetStyle() & WB_SYSTEMFLOATWIN) ) { - USHORT nSysFlags = 0; + sal_uInt16 nSysFlags = 0; if ( nFlags & TOTOP_RESTOREWHENMIN ) nSysFlags |= SAL_FRAME_TOTOP_RESTOREWHENMIN; if ( nFlags & TOTOP_FOREGROUNDTASK ) @@ -3628,7 +3628,7 @@ void Window::ImplToTop( USHORT nFlags ) mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev; // AlwaysOnTop beruecksichtigen - BOOL bOnTop = IsAlwaysOnTopEnabled(); + sal_Bool bOnTop = IsAlwaysOnTopEnabled(); Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; if ( !bOnTop ) { @@ -3641,7 +3641,7 @@ void Window::ImplToTop( USHORT nFlags ) } // TopLevel abpruefen - BYTE nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel; + sal_uInt8 nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel; while ( pNextWin ) { if ( (bOnTop != pNextWin->IsAlwaysOnTopEnabled()) || @@ -3682,7 +3682,7 @@ void Window::ImplToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplStartToTop( USHORT nFlags ) +void Window::ImplStartToTop( sal_uInt16 nFlags ) { ImplCalcToTopData aStartData; ImplCalcToTopData* pCurData; @@ -3737,7 +3737,7 @@ void Window::ImplStartToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible ) +void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) { // Soll Focus auch geholt werden? if ( !(nFlags & TOTOP_NOGRABFOCUS) ) @@ -3756,7 +3756,7 @@ void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible ) pFocusWindow = pFocusWindow->ImplGetParent(); } if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) && - !pFocusWindow->HasChildPathFocus( TRUE ) ) + !pFocusWindow->HasChildPathFocus( sal_True ) ) pFocusWindow->GrabFocus(); } @@ -3773,8 +3773,8 @@ void Window::ImplShowAllOverlaps() { if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible ) { - pOverlapWindow->Show( TRUE, SHOW_NOACTIVATE ); - pOverlapWindow->mpWindowImpl->mbOverlapVisible = FALSE; + pOverlapWindow->Show( sal_True, SHOW_NOACTIVATE ); + pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_False; } pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; @@ -3790,8 +3790,8 @@ void Window::ImplHideAllOverlaps() { if ( pOverlapWindow->IsVisible() ) { - pOverlapWindow->mpWindowImpl->mbOverlapVisible = TRUE; - pOverlapWindow->Show( FALSE ); + pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_True; + pOverlapWindow->Show( sal_False ); } pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; @@ -3800,24 +3800,24 @@ void Window::ImplHideAllOverlaps() // ----------------------------------------------------------------------- -void Window::ImplCallMouseMove( USHORT nMouseCode, BOOL bModChanged ) +void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) { if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible ) { - ULONG nTime = Time::GetSystemTicks(); + sal_uLong nTime = Time::GetSystemTicks(); long nX = mpWindowImpl->mpFrameData->mnLastMouseX; long nY = mpWindowImpl->mpFrameData->mnLastMouseY; - USHORT nCode = nMouseCode; - USHORT nMode = mpWindowImpl->mpFrameData->mnMouseMode; - BOOL bLeave; + sal_uInt16 nCode = nMouseCode; + sal_uInt16 nMode = mpWindowImpl->mpFrameData->mnMouseMode; + sal_Bool bLeave; // Auf MouseLeave testen if ( ((nX < 0) || (nY < 0) || (nX >= mpWindowImpl->mpFrameWindow->mnOutWidth) || (nY >= mpWindowImpl->mpFrameWindow->mnOutHeight)) && !ImplGetSVData()->maWinData.mpCaptureWin ) - bLeave = TRUE; + bLeave = sal_True; else - bLeave = FALSE; + bLeave = sal_False; nMode |= MOUSE_SYNTHETIC; if ( bModChanged ) nMode |= MOUSE_MODIFIERCHANGED; @@ -3864,8 +3864,8 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pNewRealWindow; Window* pOldRealWindow; Window* pLastRealWindow; - BOOL bCallActivate = TRUE; - BOOL bCallDeactivate = TRUE; + sal_Bool bCallActivate = sal_True; + sal_Bool bCallDeactivate = sal_True; pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); @@ -3876,7 +3876,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, !pNewRealWindow->GetActivateMode() ) { pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow; - bCallDeactivate = FALSE; + bCallDeactivate = sal_False; } } else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) || @@ -3885,15 +3885,15 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, if ( pSVData->maWinData.mpLastDeacWin ) { if ( pSVData->maWinData.mpLastDeacWin == pNewOverlapWindow ) - bCallActivate = FALSE; + bCallActivate = sal_False; else { pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow(); - pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = FALSE; + pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = sal_False; pSVData->maWinData.mpLastDeacWin->Deactivate(); if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin ) { - pLastRealWindow->mpWindowImpl->mbActive = TRUE; + pLastRealWindow->mpWindowImpl->mbActive = sal_True; pLastRealWindow->Activate(); } } @@ -3905,14 +3905,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, { if( pOldOverlapWindow->mpWindowImpl->mbActive ) { - pOldOverlapWindow->mpWindowImpl->mbActive = FALSE; + pOldOverlapWindow->mpWindowImpl->mbActive = sal_False; pOldOverlapWindow->Deactivate(); } if ( pOldRealWindow != pOldOverlapWindow ) { if( pOldRealWindow->mpWindowImpl->mbActive ) { - pOldRealWindow->mpWindowImpl->mbActive = FALSE; + pOldRealWindow->mpWindowImpl->mbActive = sal_False; pOldRealWindow->Deactivate(); } } @@ -3921,14 +3921,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, { if( ! pNewOverlapWindow->mpWindowImpl->mbActive ) { - pNewOverlapWindow->mpWindowImpl->mbActive = TRUE; + pNewOverlapWindow->mpWindowImpl->mbActive = sal_True; pNewOverlapWindow->Activate(); } if ( pNewRealWindow != pNewOverlapWindow ) { if( ! pNewRealWindow->mpWindowImpl->mbActive ) { - pNewRealWindow->mpWindowImpl->mbActive = TRUE; + pNewRealWindow->mpWindowImpl->mbActive = sal_True; pNewRealWindow->Activate(); } } @@ -3950,7 +3950,7 @@ static bool IsWindowFocused(const WindowImpl& rWinImpl) } // ----------------------------------------------------------------------- -void Window::ImplGrabFocus( USHORT nFlags ) +void Window::ImplGrabFocus( sal_uInt16 nFlags ) { // #143570# no focus for destructing windows if( mpWindowImpl->mbInDtor ) @@ -4008,13 +4008,13 @@ void Window::ImplGrabFocus( USHORT nFlags ) // which is done using ToTop ImplSVData* pSVData = ImplGetSVData(); - BOOL bAsyncFocusWaiting = FALSE; + sal_Bool bAsyncFocusWaiting = sal_False; Window *pFrame = pSVData->maWinData.mpFirstFrame; while( pFrame ) { if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) { - bAsyncFocusWaiting = TRUE; + bAsyncFocusWaiting = sal_True; break; } pFrame = pFrame->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4022,7 +4022,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) bool bHasFocus = IsWindowFocused(*mpWindowImpl); - BOOL bMustNotGrabFocus = FALSE; + sal_Bool bMustNotGrabFocus = sal_False; // #100242#, check parent hierarchy if some floater prohibits grab focus Window *pParent = this; @@ -4032,7 +4032,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) // otherwise we cannot set the focus in a floating toolbox if( ( (pParent->mpWindowImpl->mbFloatWin && ((FloatingWindow*)pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) ) { - bMustNotGrabFocus = TRUE; + bMustNotGrabFocus = sal_True; break; } pParent = pParent->mpWindowImpl->mpParent; @@ -4093,11 +4093,11 @@ void Window::ImplGrabFocus( USHORT nFlags ) { Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); - pNewOverlapWindow->mpWindowImpl->mbActive = TRUE; + pNewOverlapWindow->mpWindowImpl->mbActive = sal_True; pNewOverlapWindow->Activate(); if ( pNewRealWindow != pNewOverlapWindow ) { - pNewRealWindow->mpWindowImpl->mbActive = TRUE; + pNewRealWindow->mpWindowImpl->mbActive = sal_True; pNewRealWindow->Activate(); } } @@ -4176,7 +4176,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) else pParent = pLastParent; - pParent->mpWindowImpl->mbActive = FALSE; + pParent->mpWindowImpl->mbActive = sal_False; pParent->Deactivate(); pDeactivateParent = pLastParent; } @@ -4199,7 +4199,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) else pParent = pLastParent; - pParent->mpWindowImpl->mbActive = TRUE; + pParent->mpWindowImpl->mbActive = sal_True; pParent->Activate(); pActivateParent = pLastParent; } @@ -4230,7 +4230,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) { if ( mpWindowImpl->mpCursor ) mpWindowImpl->mpCursor->ImplShow(); - mpWindowImpl->mbInFocusHdl = TRUE; + mpWindowImpl->mbInFocusHdl = sal_True; mpWindowImpl->mnGetFocusFlags = nFlags; // if we're changing focus due to closing a popup floating window // notify the new focus window so it can restore the inner focus @@ -4247,7 +4247,7 @@ void Window::ImplGrabFocus( USHORT nFlags ) if( !aDogTag.IsDelete() ) { mpWindowImpl->mnGetFocusFlags = 0; - mpWindowImpl->mbInFocusHdl = FALSE; + mpWindowImpl->mbInFocusHdl = sal_False; } } } @@ -4389,7 +4389,7 @@ Window::~Window() xCanvasComponent->dispose(); } - mpWindowImpl->mbInDtor = TRUE; + mpWindowImpl->mbInDtor = sal_True; ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); @@ -4452,7 +4452,7 @@ Window::~Window() } } - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); if ( pWrapper ) pWrapper->WindowDestroyed( this ); @@ -4488,16 +4488,16 @@ Window::~Window() pSVData->maWinData.mpDefDialogParent = NULL; #ifdef DBG_UTIL - if ( TRUE ) // always perform these tests in non-pro versions + if ( sal_True ) // always perform these tests in non-pro versions { ByteString aErrorStr; - BOOL bError = FALSE; + sal_Bool bError = sal_False; Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = TRUE; + bError = sal_True; lcl_appendWindowInfo( aErrorStr, *pTempWin ); } pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; @@ -4512,13 +4512,13 @@ Window::~Window() GetpApp()->Abort( String( aTempStr, RTL_TEXTENCODING_UTF8 ) ); // abort in non-pro version, this must be fixed! } - bError = FALSE; + bError = sal_False; pTempWin = pSVData->maWinData.mpFirstFrame; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = TRUE; + bError = sal_True; lcl_appendWindowInfo( aErrorStr, *pTempWin ); } pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4625,11 +4625,11 @@ Window::~Window() } // check if the focus window is our child - BOOL bHasFocussedChild = FALSE; + sal_Bool bHasFocussedChild = sal_False; if( pSVData->maWinData.mpFocusWin && ImplIsRealParentPath( pSVData->maWinData.mpFocusWin ) ) { // #122232#, this must not happen and is an application bug ! but we try some cleanup to hopefully avoid crashes, see below - bHasFocussedChild = TRUE; + bHasFocussedChild = sal_True; #ifdef DBG_UTIL ByteString aTempStr( "Window (" ); aTempStr += ByteString( GetText(), RTL_TEXTENCODING_UTF8 ); @@ -4715,18 +4715,18 @@ Window::~Window() ImplDelData* pDelData = mpWindowImpl->mpFirstDel; while ( pDelData ) { - pDelData->mbDel = TRUE; + pDelData->mbDel = sal_True; pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore pDelData = pDelData->mpNext; } // Fenster aus den Listen austragen - ImplRemoveWindow( TRUE ); + ImplRemoveWindow( sal_True ); // de-register as "top window child" at our parent, if necessary if ( mpWindowImpl->mbFrame ) { - BOOL bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); + sal_Bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); if ( mpWindowImpl->mpRealParent && bIsTopWindow ) { ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData(); @@ -4799,7 +4799,7 @@ void Window::doLazyDelete() DockingWindow* pDockWin = dynamic_cast<DockingWindow*>(this); if( pSysWin || ( pDockWin && pDockWin->IsFloatingMode() ) ) { - Show( FALSE ); + Show( sal_False ); SetParent( ImplGetDefaultWindow() ); } vcl::LazyDeletor<Window>::Delete( this ); @@ -4822,7 +4822,7 @@ void Window::MouseMove( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEMOVE, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseMove = TRUE; + mpWindowImpl->mbMouseMove = sal_True; } // ----------------------------------------------------------------------- @@ -4835,7 +4835,7 @@ void Window::MouseButtonDown( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEBUTTONDOWN, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseButtonDown = TRUE; + mpWindowImpl->mbMouseButtonDown = sal_True; } // ----------------------------------------------------------------------- @@ -4848,7 +4848,7 @@ void Window::MouseButtonUp( const MouseEvent& rMEvt ) NotifyEvent aNEvt( EVENT_MOUSEBUTTONUP, this, &rMEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbMouseButtonUp = TRUE; + mpWindowImpl->mbMouseButtonUp = sal_True; } // ----------------------------------------------------------------------- @@ -4861,7 +4861,7 @@ void Window::KeyInput( const KeyEvent& rKEvt ) NotifyEvent aNEvt( EVENT_KEYINPUT, this, &rKEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbKeyInput = TRUE; + mpWindowImpl->mbKeyInput = sal_True; } // ----------------------------------------------------------------------- @@ -4874,7 +4874,7 @@ void Window::KeyUp( const KeyEvent& rKEvt ) NotifyEvent aNEvt( EVENT_KEYUP, this, &rKEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbKeyUp = TRUE; + mpWindowImpl->mbKeyUp = sal_True; } // ----------------------------------------------------------------------- @@ -4902,7 +4902,7 @@ void Window::PostPaint() // ----------------------------------------------------------------------- -void Window::Draw( OutputDevice*, const Point&, const Size&, ULONG ) +void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uLong ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } @@ -5035,7 +5035,7 @@ void Window::Command( const CommandEvent& rCEvt ) NotifyEvent aNEvt( EVENT_COMMAND, this, &rCEvt ); if ( !Notify( aNEvt ) ) - mpWindowImpl->mbCommand = TRUE; + mpWindowImpl->mbCommand = sal_True; } // ----------------------------------------------------------------------- @@ -5051,7 +5051,7 @@ void Window::Tracking( const TrackingEvent& rTEvt ) // ----------------------------------------------------------------------- -void Window::UserEvent( ULONG, void* ) +void Window::UserEvent( sal_uLong, void* ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } @@ -5179,7 +5179,7 @@ long Window::PreNotify( NotifyEvent& rNEvt ) DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } - long bDone = FALSE; + long bDone = sal_False; if ( mpWindowImpl->mpParent && !ImplIsOverlapWindow() ) bDone = mpWindowImpl->mpParent->PreNotify( rNEvt ); @@ -5187,11 +5187,11 @@ long Window::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - BOOL bCompoundFocusChanged = FALSE; + sal_Bool bCompoundFocusChanged = sal_False; if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() ) { - mpWindowImpl->mbCompoundControlHasFocus = TRUE; - bCompoundFocusChanged = TRUE; + mpWindowImpl->mbCompoundControlHasFocus = sal_True; + bCompoundFocusChanged = sal_True; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5199,11 +5199,11 @@ long Window::PreNotify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - BOOL bCompoundFocusChanged = FALSE; + sal_Bool bCompoundFocusChanged = sal_False; if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() ) { - mpWindowImpl->mbCompoundControlHasFocus = FALSE ; - bCompoundFocusChanged = TRUE; + mpWindowImpl->mbCompoundControlHasFocus = sal_False ; + bCompoundFocusChanged = sal_True; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5268,7 +5268,7 @@ long Window::Notify( NotifyEvent& rNEvt ) DBG_CHKTHIS( Window, ImplDbgCheckWindow ); } - long nRet = FALSE; + long nRet = sal_False; // check for docking window // but do nothing if window is docked and locked @@ -5278,27 +5278,27 @@ long Window::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) { // ctrl double click toggles floating mode pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() ); - return TRUE; + return sal_True; } else if ( pMEvt->GetClicks() == 1 && bHit) { // allow start docking during mouse move pWrapper->ImplEnableStartDocking(); - return TRUE; + return sal_True; } } } else if ( rNEvt.GetType() == EVENT_MOUSEMOVE ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { // check if a single click initiated this sequence ( ImplStartDockingEnabled() ) @@ -5315,7 +5315,7 @@ long Window::Notify( NotifyEvent& rNEvt ) } pWrapper->ImplStartDocking( aPos ); } - return TRUE; + return sal_True; } } else if( rNEvt.GetType() == EVENT_KEYINPUT ) @@ -5333,7 +5333,7 @@ long Window::Notify( NotifyEvent& rNEvt ) */ if( pWrapper->IsFloatingMode() ) ToTop( TOTOP_GRABFOCUSONLY ); - return TRUE; + return sal_True; } } } @@ -5356,7 +5356,7 @@ long Window::Notify( NotifyEvent& rNEvt ) if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == EVENT_GETFOCUS) && !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) ) { - USHORT n = 0; + sal_uInt16 n = 0; Window* pFirstChild = ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFirstChild ) pFirstChild->ImplControlFocus(); @@ -5375,7 +5375,7 @@ long Window::Notify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -void Window::ImplCallEventListeners( ULONG nEvent, void* pData ) +void Window::ImplCallEventListeners( sal_uLong nEvent, void* pData ) { // The implementation was moved to CallEventListeners(), // because derived classes in svtools must be able to @@ -5388,7 +5388,7 @@ void Window::ImplCallEventListeners( ULONG nEvent, void* pData ) // ----------------------------------------------------------------------- -void Window::CallEventListeners( ULONG nEvent, void* pData ) +void Window::CallEventListeners( sal_uLong nEvent, void* pData ) { VclWindowEvent aEvent( this, nEvent, pData ); @@ -5460,25 +5460,25 @@ void Window::RemoveChildEventListener( const Link& rEventListener ) // ----------------------------------------------------------------------- -ULONG Window::PostUserEvent( ULONG nEvent, void* pEventData ) +sal_uLong Window::PostUserEvent( sal_uLong nEvent, void* pEventData ) { - ULONG nEventId; + sal_uLong nEventId; PostUserEvent( nEventId, nEvent, pEventData ); return nEventId; } // ----------------------------------------------------------------------- -ULONG Window::PostUserEvent( const Link& rLink, void* pCaller ) +sal_uLong Window::PostUserEvent( const Link& rLink, void* pCaller ) { - ULONG nEventId; + sal_uLong nEventId; PostUserEvent( nEventId, rLink, pCaller ); return nEventId; } // ----------------------------------------------------------------------- -BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData ) +sal_Bool Window::PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5487,23 +5487,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData ) pSVEvent->mpData = pEventData; pSVEvent->mpLink = NULL; pSVEvent->mpWindow = this; - pSVEvent->mbCall = TRUE; + pSVEvent->mbCall = sal_True; ImplAddDel( &(pSVEvent->maDelData) ); - rEventId = (ULONG)pSVEvent; + rEventId = (sal_uLong)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return TRUE; + return sal_True; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return FALSE; + return sal_False; } } // ----------------------------------------------------------------------- -BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller ) +sal_Bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5512,23 +5512,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller ) pSVEvent->mpData = pCaller; pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = this; - pSVEvent->mbCall = TRUE; + pSVEvent->mbCall = sal_True; ImplAddDel( &(pSVEvent->maDelData) ); - rEventId = (ULONG)pSVEvent; + rEventId = (sal_uLong)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return TRUE; + return sal_True; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return FALSE; + return sal_False; } } // ----------------------------------------------------------------------- -void Window::RemoveUserEvent( ULONG nUserEvent ) +void Window::RemoveUserEvent( sal_uLong nUserEvent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5545,14 +5545,14 @@ void Window::RemoveUserEvent( ULONG nUserEvent ) pSVEvent->mpWindow = NULL; } - pSVEvent->mbCall = FALSE; + pSVEvent->mbCall = sal_False; } // ----------------------------------------------------------------------- IMPL_LINK( Window, ImplAsyncStateChangedHdl, void*, pState ) { - StateChanged( (StateChangedType)(ULONG)pState ); + StateChanged( (StateChangedType)(sal_uLong)pState ); return 0; } @@ -5562,28 +5562,28 @@ void Window::PostStateChanged( StateChangedType nState ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(ULONG)nState ); + PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(sal_uLong)nState ); } // ----------------------------------------------------------------------- -BOOL Window::IsLocked( BOOL bChilds ) const +sal_Bool Window::IsLocked( sal_Bool bChilds ) const { if ( mpWindowImpl->mnLockCount != 0 ) - return TRUE; + return sal_True; if ( bChilds || mpWindowImpl->mbChildNotify ) { Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { - if ( pChild->IsLocked( TRUE ) ) - return TRUE; + if ( pChild->IsLocked( sal_True ) ) + return sal_True; pChild = pChild->mpWindowImpl->mpNext; } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -5641,7 +5641,7 @@ SystemWindow* Window::GetSystemWindow() const // ----------------------------------------------------------------------- -void Window::SetBorderStyle( USHORT nBorderStyle ) +void Window::SetBorderStyle( sal_uInt16 nBorderStyle ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5684,7 +5684,7 @@ void Window::SetBorderStyle( USHORT nBorderStyle ) // ----------------------------------------------------------------------- -USHORT Window::GetBorderStyle() const +sal_uInt16 Window::GetBorderStyle() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5732,7 +5732,7 @@ long Window::CalcTitleWidth() const // ----------------------------------------------------------------------- -void Window::EnableClipSiblings( BOOL bClipSiblings ) +void Window::EnableClipSiblings( sal_Bool bClipSiblings ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5744,7 +5744,7 @@ void Window::EnableClipSiblings( BOOL bClipSiblings ) // ----------------------------------------------------------------------- -void Window::SetMouseTransparent( BOOL bTransparent ) +void Window::SetMouseTransparent( sal_Bool bTransparent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5759,7 +5759,7 @@ void Window::SetMouseTransparent( BOOL bTransparent ) // ----------------------------------------------------------------------- -void Window::SetPaintTransparent( BOOL bTransparent ) +void Window::SetPaintTransparent( sal_Bool bTransparent ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5786,7 +5786,7 @@ void Window::SetInputContext( const InputContext& rInputContext ) // ----------------------------------------------------------------------- -void Window::EndExtTextInput( USHORT nFlags ) +void Window::EndExtTextInput( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -5844,24 +5844,24 @@ long Window::GetCursorExtTextInputWidth() const // ----------------------------------------------------------------------- void Window::SetSettings( const AllSettings& rSettings ) { - SetSettings( rSettings, FALSE ); + SetSettings( rSettings, sal_False ); } -void Window::SetSettings( const AllSettings& rSettings, BOOL bChild ) +void Window::SetSettings( const AllSettings& rSettings, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->SetSettings( rSettings, FALSE ); + mpWindowImpl->mpBorderWindow->SetSettings( rSettings, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, sal_True ); } AllSettings aOldSettings = maSettings; OutputDevice::SetSettings( rSettings ); - ULONG nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); + sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( rSettings ); // AppFont-Aufloesung und DPI-Aufloesung neu berechnen ImplInitResolutionSettings(); @@ -5885,20 +5885,20 @@ void Window::SetSettings( const AllSettings& rSettings, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild ) +void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, FALSE ); + mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, sal_True ); } AllSettings aOldSettings = maSettings; - ULONG nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings ); + sal_uLong nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings ); nChangeFlags |= SETTINGS_IN_UPDATE_SETTINGS; // Set this flag so the receiver of the data changed // event can distinguish between the changing of global // setting and a local change ( with SetSettings ) @@ -5999,7 +5999,7 @@ void Window::GetFontResolution( sal_Int32& nDPIX, sal_Int32& nDPIY ) const // ----------------------------------------------------------------------- -void Window::SetParentClipMode( USHORT nMode ) +void Window::SetParentClipMode( sal_uInt16 nMode ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6011,14 +6011,14 @@ void Window::SetParentClipMode( USHORT nMode ) { mpWindowImpl->mnParentClipMode = nMode; if ( nMode & PARENTCLIPMODE_CLIP ) - mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = TRUE; + mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = sal_True; } } } // ----------------------------------------------------------------------- -USHORT Window::GetParentClipMode() const +sal_uInt16 Window::GetParentClipMode() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6039,7 +6039,7 @@ void Window::SetWindowRegionPixel() else if( mpWindowImpl->mbFrame ) { mpWindowImpl->maWinRegion = Region( REGION_NULL); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; mpWindowImpl->mpFrame->ResetClipRegion(); } else @@ -6047,7 +6047,7 @@ void Window::SetWindowRegionPixel() if ( mpWindowImpl->mbWinRegion ) { mpWindowImpl->maWinRegion = Region( REGION_NULL ); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; ImplSetClipFlag(); if ( IsReallyVisible() ) @@ -6086,9 +6086,9 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) long nY; long nWidth; long nHeight; - ULONG nRectCount; + sal_uLong nRectCount; ImplRegionInfo aInfo; - BOOL bRegionRect; + sal_Bool bRegionRect; nRectCount = mpWindowImpl->maWinRegion.GetRectCount(); mpWindowImpl->mpFrame->BeginSetClipRegion( nRectCount ); @@ -6108,24 +6108,24 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) } else { - BOOL bInvalidate = FALSE; + sal_Bool bInvalidate = sal_False; if ( rRegion.GetType() == REGION_NULL ) { if ( mpWindowImpl->mbWinRegion ) { mpWindowImpl->maWinRegion = Region( REGION_NULL ); - mpWindowImpl->mbWinRegion = FALSE; + mpWindowImpl->mbWinRegion = sal_False; ImplSetClipFlag(); - bInvalidate = TRUE; + bInvalidate = sal_True; } } else { mpWindowImpl->maWinRegion = rRegion; - mpWindowImpl->mbWinRegion = TRUE; + mpWindowImpl->mbWinRegion = sal_True; ImplSetClipFlag(); - bInvalidate = TRUE; + bInvalidate = sal_True; } if ( IsReallyVisible() ) @@ -6156,7 +6156,7 @@ const Region& Window::GetWindowRegionPixel() const // ----------------------------------------------------------------------- -BOOL Window::IsWindowRegionPixel() const +sal_Bool Window::IsWindowRegionPixel() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6168,7 +6168,7 @@ BOOL Window::IsWindowRegionPixel() const // ----------------------------------------------------------------------- -Region Window::GetWindowClipRegionPixel( USHORT nFlags ) const +Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6239,7 +6239,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion ) if( ! aDevPixRegion.IsEmpty() ) { mpWindowImpl->mpPaintRegion->Union( aDevPixRegion ); - mbInitClipRegion = TRUE; + mbInitClipRegion = sal_True; } } } @@ -6274,13 +6274,13 @@ void Window::SetParent( Window* pNewParent ) // check if the taskpanelist would change and move the window pointer accordingly SystemWindow *pSysWin = ImplGetLastSystemWindow(this); SystemWindow *pNewSysWin = NULL; - BOOL bChangeTaskPaneList = FALSE; + sal_Bool bChangeTaskPaneList = sal_False; if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) ) { pNewSysWin = ImplGetLastSystemWindow( pNewParent ); if( pNewSysWin && pNewSysWin != pSysWin ) { - bChangeTaskPaneList = TRUE; + bChangeTaskPaneList = sal_True; pSysWin->GetTaskPaneList()->RemoveWindow( this ); } } @@ -6309,8 +6309,8 @@ void Window::SetParent( Window* pNewParent ) if ( mpWindowImpl->mbFrame ) mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame ); - BOOL bVisible = IsVisible(); - Show( FALSE, SHOW_NOFOCUSCHANGE ); + sal_Bool bVisible = IsVisible(); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // Testen, ob sich das Overlap-Window aendert Window* pOldOverlapWindow; @@ -6327,9 +6327,9 @@ void Window::SetParent( Window* pNewParent ) } // Fenster in der Hirachie umsetzen - BOOL bFocusOverlapWin = HasChildPathFocus( TRUE ); - BOOL bFocusWin = HasChildPathFocus(); - BOOL bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; + sal_Bool bFocusOverlapWin = HasChildPathFocus( sal_True ); + sal_Bool bFocusWin = HasChildPathFocus(); + sal_Bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; if ( bNewFrame ) { if ( mpWindowImpl->mpFrameData->mpFocusWin ) @@ -6351,7 +6351,7 @@ void Window::SetParent( Window* pNewParent ) ImplRemoveWindow( bNewFrame ); ImplInsertWindow( pNewParent ); if ( mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP ) - pNewParent->mpWindowImpl->mbClipChildren = TRUE; + pNewParent->mpWindowImpl->mbClipChildren = sal_True; ImplUpdateWindowPtr(); if ( ImplUpdatePos() ) ImplUpdateSysObjPos(); @@ -6390,7 +6390,7 @@ void Window::SetParent( Window* pNewParent ) } // Activate-Status beim naechsten Overlap-Window updaten - if ( HasChildPathFocus( TRUE ) ) + if ( HasChildPathFocus( sal_True ) ) ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow ); } @@ -6426,12 +6426,12 @@ void Window::SetParent( Window* pNewParent ) ImplGetOwnerDrawList().push_back( this ); if ( bVisible ) - Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } // ----------------------------------------------------------------------- -void Window::Show( BOOL bVisible, USHORT nFlags ) +void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6440,7 +6440,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) ImplDelData aDogTag( this ); - BOOL bRealVisibilityChanged = FALSE; + sal_Bool bRealVisibilityChanged = sal_False; mpWindowImpl->mbVisible = (bVisible != 0); if ( !bVisible ) @@ -6451,16 +6451,16 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( mpWindowImpl->mpBorderWindow ) { - BOOL bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate; + sal_Bool bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate; if ( mpWindowImpl->mbNoParentUpdate ) - mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = TRUE; - mpWindowImpl->mpBorderWindow->Show( FALSE, nFlags ); + mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = sal_True; + mpWindowImpl->mpBorderWindow->Show( sal_False, nFlags ); mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = bOldUpdate; } else if ( mpWindowImpl->mbFrame ) { - mpWindowImpl->mbSuppressAccessibilityEvents = TRUE; - mpWindowImpl->mpFrame->Show( FALSE, FALSE ); + mpWindowImpl->mbSuppressAccessibilityEvents = sal_True; + mpWindowImpl->mpFrame->Show( sal_False, sal_False ); } StateChanged( STATE_CHANGE_VISIBLE ); @@ -6468,12 +6468,12 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( mpWindowImpl->mbReallyVisible ) { Region aInvRegion( REGION_EMPTY ); - BOOL bSaveBack = FALSE; + sal_Bool bSaveBack = sal_False; if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame ) { if ( ImplRestoreOverlapBackground( aInvRegion ) ) - bSaveBack = TRUE; + bSaveBack = sal_True; } if ( !bSaveBack ) @@ -6568,7 +6568,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) ) { ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 ); - ImplFocusToTop( 0, FALSE ); + ImplFocusToTop( 0, sal_False ); } // Hintergrund sichern @@ -6583,7 +6583,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) if ( !mpWindowImpl->mbFrame ) { - USHORT nInvalidateFlags = INVALIDATE_CHILDREN; + sal_uInt16 nInvalidateFlags = INVALIDATE_CHILDREN; if( ! IsPaintTransparent() ) nInvalidateFlags |= INVALIDATE_NOTRANSPARENT; ImplInvalidate( NULL, nInvalidateFlags ); @@ -6592,7 +6592,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) } if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->Show( TRUE, nFlags ); + mpWindowImpl->mpBorderWindow->Show( sal_True, nFlags ); else if ( mpWindowImpl->mbFrame ) { ImplSVData* pSVData = ImplGetSVData(); @@ -6601,11 +6601,11 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) pSVData->mpIntroWindow->Hide(); //DBG_ASSERT( !mpWindowImpl->mbSuppressAccessibilityEvents, "Window::Show() - Frame reactivated"); - mpWindowImpl->mbSuppressAccessibilityEvents = FALSE; + mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; - mpWindowImpl->mbPaintFrame = TRUE; - BOOL bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? TRUE : FALSE; - mpWindowImpl->mpFrame->Show( TRUE, bNoActivate ); + mpWindowImpl->mbPaintFrame = sal_True; + sal_Bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; + mpWindowImpl->mpFrame->Show( sal_True, bNoActivate ); if( aDogTag.IsDelete() ) return; @@ -6726,10 +6726,10 @@ void Window::Enable( bool bEnable, bool bChild ) if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->Enable( bEnable, FALSE ); + mpWindowImpl->mpBorderWindow->Enable( bEnable, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, sal_True ); } // #i56102# restore app focus win in case the @@ -6771,7 +6771,7 @@ void Window::Enable( bool bEnable, bool bChild ) void Window::SetCallHandlersOnInputDisabled( bool bCall ) { - mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? TRUE : FALSE; + mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? sal_True : sal_False; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) @@ -6790,17 +6790,17 @@ bool Window::IsCallHandlersOnInputDisabled() const // ----------------------------------------------------------------------- -void Window::EnableInput( BOOL bEnable, BOOL bChild ) +void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bNotify = (bEnable != mpWindowImpl->mbInputDisabled); + sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->EnableInput( bEnable, FALSE ); + mpWindowImpl->mpBorderWindow->EnableInput( bEnable, sal_False ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, TRUE ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, sal_True ); } if ( (! bEnable && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled) || @@ -6858,7 +6858,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, +void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin, const Window* pExcludeWindow ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -6874,11 +6874,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, while ( pSysWin ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, sal_True ) ) pSysWin->EnableInput( bEnable, bChild ); } pSysWin = pSysWin->mpWindowImpl->mpNextOverlap; @@ -6891,11 +6891,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, if( pFrameWin->ImplIsFloatingWindow() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, sal_True ) ) pFrameWin->EnableInput( bEnable, bChild ); } } @@ -6910,11 +6910,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, while( p != rList.end() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), TRUE ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), sal_True ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) ) (*p)->EnableInput( bEnable, bChild ); } p++; @@ -6925,19 +6925,19 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, // ----------------------------------------------------------------------- -void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild ) +void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, FALSE ); + mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, sal_False ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputEnabled; if ( bAlways ) - EnableInput( TRUE, FALSE ); + EnableInput( sal_True, sal_False ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled ) { @@ -6957,19 +6957,19 @@ void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild ) +void Window::AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, FALSE ); + mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, sal_False ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled; if ( bAlways ) - EnableInput( FALSE, FALSE ); + EnableInput( sal_False, sal_False ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled ) { @@ -6989,7 +6989,7 @@ void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild ) // ----------------------------------------------------------------------- -void Window::SetActivateMode( USHORT nMode ) +void Window::SetActivateMode( sal_uInt16 nMode ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7004,9 +7004,9 @@ void Window::SetActivateMode( USHORT nMode ) if ( mpWindowImpl->mnActivateMode ) { if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) && - !HasChildPathFocus( TRUE ) ) + !HasChildPathFocus( sal_True ) ) { - mpWindowImpl->mbActive = FALSE; + mpWindowImpl->mbActive = sal_False; Deactivate(); } } @@ -7014,7 +7014,7 @@ void Window::SetActivateMode( USHORT nMode ) { if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) ) { - mpWindowImpl->mbActive = TRUE; + mpWindowImpl->mbActive = sal_True; Activate(); } } @@ -7023,7 +7023,7 @@ void Window::SetActivateMode( USHORT nMode ) // ----------------------------------------------------------------------- -void Window::ToTop( USHORT nFlags ) +void Window::ToTop( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7033,7 +7033,7 @@ void Window::ToTop( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) +void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7151,7 +7151,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) if ( mpWindowImpl->mbInitWinClipRegion || !mpWindowImpl->maWinClipRegion.IsEmpty() ) { - BOOL bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; + sal_Bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; ImplSetClipFlag(); // Wenn ClipRegion noch nicht initalisiert wurde, dann @@ -7210,7 +7210,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::EnableAlwaysOnTop( BOOL bEnable ) +void Window::EnableAlwaysOnTop( sal_Bool bEnable ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7228,16 +7228,16 @@ void Window::EnableAlwaysOnTop( BOOL bEnable ) // ----------------------------------------------------------------------- void Window::SetPosSizePixel( long nX, long nY, - long nWidth, long nHeight, USHORT nFlags ) + long nWidth, long nHeight, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - BOOL bHasValidSize = !mpWindowImpl->mbDefSize; + sal_Bool bHasValidSize = !mpWindowImpl->mbDefSize; if ( nFlags & WINDOW_POSSIZE_POS ) - mpWindowImpl->mbDefPos = FALSE; + mpWindowImpl->mbDefPos = sal_False; if ( nFlags & WINDOW_POSSIZE_SIZE ) - mpWindowImpl->mbDefSize = FALSE; + mpWindowImpl->mbDefSize = sal_False; // Oberstes BorderWindow ist das Window, welches positioniert werden soll Window* pWindow = this; @@ -7257,7 +7257,7 @@ void Window::SetPosSizePixel( long nX, long nY, nHeight = pWindow->mnOutHeight; - USHORT nSysFlags=0; + sal_uInt16 nSysFlags=0; if( nFlags & WINDOW_POSSIZE_WIDTH ) nSysFlags |= SAL_FRAME_POSSIZE_WIDTH; if( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -7471,18 +7471,18 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const { // with decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, FALSE ); + return ImplGetWindowExtentsRelative( pRelativeWindow, sal_False ); } Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const { // without decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, TRUE ); + return ImplGetWindowExtentsRelative( pRelativeWindow, sal_True ); } // ----------------------------------------------------------------------- -Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const +Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, @@ -7512,7 +7512,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bC // ----------------------------------------------------------------------- -void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags ) +void Window::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7524,7 +7524,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags ) // ----------------------------------------------------------------------- void Window::Scroll( long nHorzScroll, long nVertScroll, - const Rectangle& rRect, USHORT nFlags ) + const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7536,7 +7536,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, // ----------------------------------------------------------------------- -void Window::Invalidate( USHORT nFlags ) +void Window::Invalidate( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7548,7 +7548,7 @@ void Window::Invalidate( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Invalidate( const Rectangle& rRect, USHORT nFlags ) +void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7565,7 +7565,7 @@ void Window::Invalidate( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Invalidate( const Region& rRegion, USHORT nFlags ) +void Window::Invalidate( const Region& rRegion, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7584,7 +7584,7 @@ void Window::Invalidate( const Region& rRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( USHORT nFlags ) +void Window::Validate( sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7596,7 +7596,7 @@ void Window::Validate( USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( const Rectangle& rRect, USHORT nFlags ) +void Window::Validate( const Rectangle& rRect, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7613,7 +7613,7 @@ void Window::Validate( const Rectangle& rRect, USHORT nFlags ) // ----------------------------------------------------------------------- -void Window::Validate( const Region& rRegion, USHORT nFlags ) +void Window::Validate( const Region& rRegion, sal_uInt16 nFlags ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7632,18 +7632,18 @@ void Window::Validate( const Region& rRegion, USHORT nFlags ) // ----------------------------------------------------------------------- -BOOL Window::HasPaintEvent() const +sal_Bool Window::HasPaintEvent() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); if ( !mpWindowImpl->mbReallyVisible ) - return FALSE; + return sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) - return TRUE; + return sal_True; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT ) - return TRUE; + return sal_True; if ( !ImplIsOverlapWindow() ) { @@ -7652,12 +7652,12 @@ BOOL Window::HasPaintEvent() const { pTempWindow = pTempWindow->ImplGetParent(); if ( pTempWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINTCHILDS | IMPL_PAINT_PAINTALLCHILDS) ) - return TRUE; + return sal_True; } while ( !pTempWindow->ImplIsOverlapWindow() ); } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -7675,14 +7675,14 @@ void Window::Update() if ( !mpWindowImpl->mbReallyVisible ) return; - BOOL bFlush = FALSE; + sal_Bool bFlush = sal_False; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = TRUE; + bFlush = sal_True; } // Zuerst muessen wir alle Fenster ueberspringen, die Paint-Transparent @@ -7751,7 +7751,7 @@ void Window::Sync() // ----------------------------------------------------------------------- -void Window::SetUpdateMode( BOOL bUpdate ) +void Window::SetUpdateMode( sal_Bool bUpdate ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7770,7 +7770,7 @@ void Window::GrabFocus() // ----------------------------------------------------------------------- -BOOL Window::HasFocus() const +sal_Bool Window::HasFocus() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7812,7 +7812,7 @@ void Window::SetFakeFocus( bool bFocus ) // ----------------------------------------------------------------------- -BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const +sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7828,7 +7828,7 @@ BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; if ( pFocusWin ) return ImplIsWindowOrChild( pFocusWin, bSystemWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -7849,7 +7849,7 @@ void Window::CaptureMouse() if ( pSVData->maWinData.mpCaptureWin != this ) { pSVData->maWinData.mpCaptureWin = this; - mpWindowImpl->mpFrame->CaptureMouse( TRUE ); + mpWindowImpl->mpFrame->CaptureMouse( sal_True ); } } @@ -7867,14 +7867,14 @@ void Window::ReleaseMouse() if ( pSVData->maWinData.mpCaptureWin == this ) { pSVData->maWinData.mpCaptureWin = NULL; - mpWindowImpl->mpFrame->CaptureMouse( FALSE ); + mpWindowImpl->mpFrame->CaptureMouse( sal_False ); ImplGenerateMouseMove(); } } // ----------------------------------------------------------------------- -BOOL Window::IsMouseCaptured() const +sal_Bool Window::IsMouseCaptured() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7899,7 +7899,7 @@ void Window::SetPointer( const Pointer& rPointer ) // ----------------------------------------------------------------------- -void Window::EnableChildPointerOverwrite( BOOL bOverwrite ) +void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -7969,7 +7969,7 @@ Point Window::GetLastPointerPosPixel() // ----------------------------------------------------------------------- -void Window::ShowPointer( BOOL bVisible ) +void Window::ShowPointer( sal_Bool bVisible ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8008,7 +8008,7 @@ Window::PointerState Window::GetPointerState() // ----------------------------------------------------------------------- -BOOL Window::IsMouseOver() +sal_Bool Window::IsMouseOver() { return ImplGetWinData()->mbMouseOver; } @@ -8157,7 +8157,7 @@ const XubString& Window::GetHelpText() const if ( pHelp ) { ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this ); - mpWindowImpl->mbHelpTextDynamic = FALSE; + mpWindowImpl->mbHelpTextDynamic = sal_False; } } } @@ -8172,7 +8172,7 @@ const XubString& Window::GetHelpText() const aTxt.append( rtl::OUString( aStrHelpId ) ); mpWindowImpl->maHelpText = aTxt.makeStringAndClear(); } - mpWindowImpl->mbHelpTextDynamic = FALSE; + mpWindowImpl->mbHelpTextDynamic = sal_False; } return mpWindowImpl->maHelpText; @@ -8190,11 +8190,11 @@ Window* Window::FindWindow( const Point& rPos ) const // ----------------------------------------------------------------------- -USHORT Window::GetChildCount() const +sal_uInt16 Window::GetChildCount() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - USHORT nChildCount = 0; + sal_uInt16 nChildCount = 0; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { @@ -8207,11 +8207,11 @@ USHORT Window::GetChildCount() const // ----------------------------------------------------------------------- -Window* Window::GetChild( USHORT nChild ) const +Window* Window::GetChild( sal_uInt16 nChild ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - USHORT nChildCount = 0; + sal_uInt16 nChildCount = 0; Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { @@ -8226,7 +8226,7 @@ Window* Window::GetChild( USHORT nChild ) const // ----------------------------------------------------------------------- -Window* Window::GetWindow( USHORT nType ) const +Window* Window::GetWindow( sal_uInt16 nType ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8318,7 +8318,7 @@ Window* Window::GetWindow( USHORT nType ) const // ----------------------------------------------------------------------- -BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow ); @@ -8331,22 +8331,22 @@ BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return TRUE; + return sal_True; } while ( pWindow ); - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL Window::IsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const +sal_Bool Window::IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow ); if ( this == pWindow ) - return TRUE; + return sal_True; return ImplIsChild( pWindow, bSystemWindow ); } @@ -8385,7 +8385,7 @@ void Window::SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star:: // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( BOOL bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( sal_Bool bCreate ) { if ( !mpWindowImpl->mxWindowPeer.is() && bCreate ) { @@ -8520,7 +8520,7 @@ Reference< XDropTarget > Window::GetDropTarget() Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } else - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True; } @@ -8746,7 +8746,7 @@ Reference< XClipboard > Window::GetPrimarySelection() // Accessibility // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( BOOL bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( sal_Bool bCreate ) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy @@ -8766,7 +8766,7 @@ Reference< XClipboard > Window::GetPrimarySelection() ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::CreateAccessible() { - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( TRUE ), ::com::sun::star::uno::UNO_QUERY ); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( sal_True ), ::com::sun::star::uno::UNO_QUERY ); return xAcc; } @@ -8776,46 +8776,46 @@ void Window::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star:: } // skip all border windows that are no top level frames -BOOL Window::ImplIsAccessibleCandidate() const +sal_Bool Window::ImplIsAccessibleCandidate() const { if( !mpWindowImpl->mbBorderWin ) - return TRUE; + return sal_True; else // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } -BOOL Window::ImplIsAccessibleNativeFrame() const +sal_Bool Window::ImplIsAccessibleNativeFrame() const { if( mpWindowImpl->mbFrame ) // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable if( (mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE)) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; else - return FALSE; + return sal_False; } -USHORT Window::ImplGetAccessibleCandidateChildWindowCount( USHORT nFirstWindowType ) const +sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const { - USHORT nChildren = 0; + sal_uInt16 nChildren = 0; Window* pChild = GetWindow( nFirstWindowType ); while ( pChild ) { if( pChild->ImplIsAccessibleCandidate() ) nChildren++; else - nChildren = sal::static_int_cast<USHORT>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD )); + nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD )); pChild = pChild->mpWindowImpl->mpNext; } return nChildren; } -Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCount, USHORT nFirstWindowType, BOOL bTopLevel ) const +Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); @@ -8828,7 +8828,7 @@ Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCo Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) - pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, FALSE ); + pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, sal_False ); if ( nChild == rChildCount ) return pTmpChild; @@ -8881,9 +8881,9 @@ Window* Window::GetAccessibleParentWindow() const } /* -USHORT Window::GetAccessibleChildWindowCount() +sal_uInt16 Window::GetAccessibleChildWindowCount() { - USHORT nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ); + sal_uInt16 nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ); // Search also for SystemWindows. Window* pOverlap = GetWindow( WINDOW_OVERLAP ); @@ -8893,9 +8893,9 @@ USHORT Window::GetAccessibleChildWindowCount() } */ -USHORT Window::GetAccessibleChildWindowCount() +sal_uInt16 Window::GetAccessibleChildWindowCount() { - USHORT nChildren = 0; + sal_uInt16 nChildren = 0; Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { @@ -8941,21 +8941,21 @@ USHORT Window::GetAccessibleChildWindowCount() } /* -Window* Window::GetAccessibleChildWindow( USHORT n ) +Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) { - USHORT nChildCount; // will be set in ImplGetAccessibleCandidateChild(...) - Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, TRUE ); + sal_uInt16 nChildCount; // will be set in ImplGetAccessibleCandidateChild(...) + Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, sal_True ); if ( !pChild && ( n >= nChildCount ) ) { Window* pOverlap = GetWindow( WINDOW_OVERLAP ); - pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, FALSE ); + pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, sal_False ); } return pChild; } */ -Window* Window::GetAccessibleChildWindow( USHORT n ) +Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) { // report the menubarwindow as a the first child of THE workwindow if( GetType() == WINDOW_WORKWINDOW && ((WorkWindow *) this)->GetMenuBar() ) @@ -8971,7 +8971,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n ) } // transform n to child number including invisible children - USHORT nChildren = n; + sal_uInt16 nChildren = n; Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { @@ -9019,7 +9019,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n ) } -void Window::SetAccessibleRole( USHORT nRole ) +void Window::SetAccessibleRole( sal_uInt16 nRole ) { if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; @@ -9028,11 +9028,11 @@ void Window::SetAccessibleRole( USHORT nRole ) mpWindowImpl->mpAccessibleInfos->nAccessibleRole = nRole; } -USHORT Window::GetAccessibleRole() const +sal_uInt16 Window::GetAccessibleRole() const { using namespace ::com::sun::star; - USHORT nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF; + sal_uInt16 nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF; if ( nRole == 0xFFFF ) { switch ( GetType() ) @@ -9262,7 +9262,7 @@ String Window::GetAccessibleDescription() const return aAccessibleDescription; } -BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) +sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) { if( !bTraverseParentPath ) return mpWindowImpl->mbSuppressAccessibilityEvents; @@ -9272,11 +9272,11 @@ BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath ) while ( pParent && pParent->mpWindowImpl) { if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) - return TRUE; + return sal_True; else pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames } - return FALSE; + return sal_False; } } @@ -9296,9 +9296,9 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& // returns background color used in this control // false: could not determine color -BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) +sal_Bool Window::ImplGetCurrentBackgroundColor( Color& rCol ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch ( GetType() ) { @@ -9316,7 +9316,7 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) if( !aWall.IsGradient() && !aWall.IsBitmap() ) rCol = aWall.GetColor(); else - bRet = FALSE; + bRet = sal_False; } else rCol = GetSettings().GetStyleSettings().GetFaceColor(); @@ -9325,21 +9325,21 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) return bRet; } -void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL ); } -void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly, Color* pSelectionTextColor ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, pSelectionTextColor, NULL ); } void Window::DrawSelectionBackground( const Rectangle& rRect, - USHORT highlight, - BOOL bChecked, - BOOL bDrawBorder, - BOOL bDrawExtBorderOnly, + sal_uInt16 highlight, + sal_Bool bChecked, + sal_Bool bDrawBorder, + sal_Bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor @@ -9357,8 +9357,8 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() ); Color aSelectionFillCol( aSelectionBorderCol ); - BOOL bDark = rStyles.GetFaceColor().IsDark(); - BOOL bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); + sal_Bool bDark = rStyles.GetFaceColor().IsDark(); + sal_Bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); int c1 = aSelectionBorderCol.GetLuminance(); int c2 = GetDisplayBackground().GetColor().GetLuminance(); @@ -9366,7 +9366,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, if( !bDark && !bBright && abs( c2-c1 ) < (pPaintColor ? 40 : 75) ) { // constrast too low - USHORT h,s,b; + sal_uInt16 h,s,b; aSelectionFillCol.RGBtoHSB( h, s, b ); if( b > 50 ) b -= 40; else b += 40; @@ -9398,7 +9398,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, else SetLineColor(); - USHORT nPercent = 0; + sal_uInt16 nPercent = 0; if( !highlight ) { if( bDark ) @@ -9518,7 +9518,7 @@ Window* Window::GetPreferredKeyInputWindow() } -BOOL Window::IsScrollable() const +sal_Bool Window::IsScrollable() const { // check for scrollbars Window *pChild = mpWindowImpl->mpFirstChild; @@ -9532,24 +9532,24 @@ BOOL Window::IsScrollable() const return false; } -BOOL Window::IsTopWindow() const +sal_Bool Window::IsTopWindow() const { if ( mpWindowImpl->mbInDtor ) - return FALSE; + return sal_False; // topwindows must be frames or they must have a borderwindow which is a frame if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || (mpWindowImpl->mpBorderWindow && !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) ) - return FALSE; + return sal_False; ImplGetWinData(); - if( mpWindowImpl->mpWinData->mnIsTopWindow == (USHORT)~0) // still uninitialized + if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized { // #113722#, cache result of expensive queryInterface call Window *pThisWin = (Window*)this; Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY ); pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0; } - return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? TRUE : FALSE; + return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? sal_True : sal_False; } void Window::ImplMirrorFramePos( Point &pt ) const @@ -9558,7 +9558,7 @@ void Window::ImplMirrorFramePos( Point &pt ) const } // frame based modal counter (dialogs are not modal to the whole application anymore) -BOOL Window::IsInModalMode() const +sal_Bool Window::IsInModalMode() const { return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0); } @@ -9590,16 +9590,16 @@ void Window::ImplDecModalCount() pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow : NULL; } } -BOOL Window::ImplIsInTaskPaneList() +sal_Bool Window::ImplIsInTaskPaneList() { return mpWindowImpl->mbIsInTaskPaneList; } -void Window::ImplIsInTaskPaneList( BOOL mbIsInTaskList ) +void Window::ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ) { mpWindowImpl->mbIsInTaskPaneList = mbIsInTaskList; } -void Window::ImplNotifyIconifiedState( BOOL bIconified ) +void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) { mpWindowImpl->mpFrameWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); // #109206# notify client window as well to have toolkit topwindow listeners notified @@ -9607,15 +9607,15 @@ void Window::ImplNotifyIconifiedState( BOOL bIconified ) mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); } -BOOL Window::HasActiveChildFrame() +sal_Bool Window::HasActiveChildFrame() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWin ) { if( pFrameWin != mpWindowImpl->mpFrameWindow ) { - BOOL bDecorated = FALSE; + sal_Bool bDecorated = sal_False; Window *pChildFrame = pFrameWin->ImplGetWindow(); // #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can // be removed for ToolBoxes to influence the keyboard accessibility @@ -9627,9 +9627,9 @@ BOOL Window::HasActiveChildFrame() if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) ) if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() ) { - if( ImplIsChild( pChildFrame, TRUE ) ) + if( ImplIsChild( pChildFrame, sal_True ) ) { - bRet = TRUE; + bRet = sal_True; break; } } @@ -9644,11 +9644,11 @@ LanguageType Window::GetInputLanguage() const return mpWindowImpl->mpFrame->GetInputLanguage(); } -void Window::EnableNativeWidget( BOOL bEnable ) +void Window::EnableNativeWidget( sal_Bool bEnable ) { static const char* pNoNWF = getenv( "SAL_NO_NWF" ); if( pNoNWF && *pNoNWF ) - bEnable = FALSE; + bEnable = sal_False; if( bEnable != ImplGetWinData()->mbEnableNativeWidget ) { @@ -9673,7 +9673,7 @@ void Window::EnableNativeWidget( BOOL bEnable ) } } -BOOL Window::IsNativeWidgetEnabled() const +sal_Bool Window::IsNativeWidgetEnabled() const { return ImplGetWinData()->mbEnableNativeWidget; } @@ -9810,16 +9810,16 @@ Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpr void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rPos ) { - BOOL bRVisible = mpWindowImpl->mbReallyVisible; + sal_Bool bRVisible = mpWindowImpl->mbReallyVisible; mpWindowImpl->mbReallyVisible = mpWindowImpl->mbVisible; - BOOL bDevOutput = mbDevOutput; - mbDevOutput = TRUE; + sal_Bool bDevOutput = mbDevOutput; + mbDevOutput = sal_True; long nOldDPIX = ImplGetDPIX(); long nOldDPIY = ImplGetDPIY(); mnDPIX = i_pTargetOutDev->ImplGetDPIX(); mnDPIY = i_pTargetOutDev->ImplGetDPIY(); - BOOL bOutput = IsOutputEnabled(); + sal_Bool bOutput = IsOutputEnabled(); EnableOutput(); DBG_ASSERT( GetMapMode().GetMapUnit() == MAP_PIXEL, "MapMode must be PIXEL based" ); @@ -9952,8 +9952,8 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& / Hide(); } - BOOL bVisible = mpWindowImpl->mbVisible; - mpWindowImpl->mbVisible = TRUE; + sal_Bool bVisible = mpWindowImpl->mbVisible; + mpWindowImpl->mbVisible = sal_True; if( mpWindowImpl->mpBorderWindow ) mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos ); |