summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx1423
1 files changed, 726 insertions, 697 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index b20a82d1dc7b..5a5379da2ffa 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -34,14 +34,12 @@
#include "vcl/salinst.hxx"
#include "vcl/salgtype.hxx"
#include "vcl/salgdi.hxx"
-#include "vcl/salctrlhandle.hxx"
#include "vcl/unohelp.hxx"
#include "tools/time.hxx"
#include "tools/debug.hxx"
#include "tools/rc.h"
#include "vcl/svdata.hxx"
-#include "vcl/windata.hxx"
#include "vcl/dbggui.hxx"
#include "vcl/outfont.hxx"
#include "vcl/outdev.h"
@@ -65,6 +63,7 @@
#include "unotools/fontcfg.hxx"
#include "vcl/sysdata.hxx"
#include "vcl/sallayout.hxx"
+#include "vcl/salctype.hxx"
#include "vcl/button.hxx" // Button::GetStandardText
#include "vcl/taskpanelist.hxx"
#include "com/sun/star/awt/XWindowPeer.hpp"
@@ -87,7 +86,6 @@
#include "vcl/unowrap.hxx"
#include "vcl/dndlcon.hxx"
#include "vcl/dndevdis.hxx"
-#include "vcl/impbmpconv.hxx"
#include "unotools/confignode.hxx"
#include "vcl/gdimtf.hxx"
#include <sal/macros.h>
@@ -114,12 +112,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)
// -----------------------------------------------------------------------
@@ -134,25 +132,21 @@ struct ImplCalcToTopData
Region* mpInvalidateRegion;
};
-struct ImplAccessibleInfos
+ImplAccessibleInfos::ImplAccessibleInfos()
{
- USHORT nAccessibleRole;
- String* pAccessibleName;
- String* pAccessibleDescription;
-
- ImplAccessibleInfos()
- {
- nAccessibleRole = 0xFFFF;
- pAccessibleName = NULL;
- pAccessibleDescription = NULL;
- }
+ nAccessibleRole = 0xFFFF;
+ pAccessibleName = NULL;
+ pAccessibleDescription = NULL;
+ pLabeledByWindow = NULL;
+ pLabelForWindow = NULL;
+ pMemberOfWindow = NULL;
+}
- ~ImplAccessibleInfos()
- {
- delete pAccessibleName;
- delete pAccessibleDescription;
- }
-};
+ImplAccessibleInfos::~ImplAccessibleInfos()
+{
+ delete pAccessibleName;
+ delete pAccessibleDescription;
+}
// -----------------------------------------------------------------------
@@ -268,29 +262,53 @@ bool Window::ImplCheckUIFont( const Font& rFont )
if( ImplGetSVData()->maGDIData.mbNativeFontConfig )
return true;
+ // create a text string using the localized text of important buttons
String aTestText;
- aTestText.Append( Button::GetStandardText( BUTTON_OK ) );
- aTestText.Append( Button::GetStandardText( BUTTON_CANCEL ) );
- aTestText.Append( Button::GetStandardText( BUTTON_YES ) );
- aTestText.Append( Button::GetStandardText( BUTTON_NO ) );
- aTestText.Append( Button::GetStandardText( BUTTON_RETRY ) );
- aTestText.Append( Button::GetStandardText( BUTTON_HELP ) );
- aTestText.Append( Button::GetStandardText( BUTTON_CLOSE ) );
- aTestText.Append( Button::GetStandardText( BUTTON_MORE ) );
- aTestText.Append( Button::GetStandardText( BUTTON_LESS ) );
- aTestText.Append( Button::GetStandardText( BUTTON_ABORT ) );
+ static const StandardButtonType aTestButtons[] =
+ {
+ BUTTON_OK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_ABORT,
+ BUTTON_YES, BUTTON_NO, BUTTON_MORE, BUTTON_IGNORE,
+ BUTTON_RETRY, BUTTON_HELP
+ };
+
+ const int nTestButtonCount = sizeof(aTestButtons)/sizeof(*aTestButtons);
+ for( int n = 0; n < nTestButtonCount; ++n )
+ {
+ String aButtonStr = Button::GetStandardText( aTestButtons[n] );
+ // #i115432# ignore mnemonic+accelerator part of each string
+ // TODO: use a string filtering method when it becomes available
+ const int nLen = aButtonStr.Len();
+ bool bInside = false;
+ for( int i = 0; i < nLen; ++i ) {
+ const sal_Unicode c = aButtonStr.GetChar( i );
+ if( (c == '('))
+ bInside = true;
+ if( (c == ')'))
+ bInside = false;
+ if( (c == '~')
+ || (c == '(') || (c == ')')
+ || ((c >= 'A') && (c <= 'Z') && bInside) )
+ aButtonStr.SetChar( i, ' ' );
+ }
+ // append sanitized button text to test string
+ aTestText.Append( aButtonStr );
+ }
- return HasGlyphs( rFont, aTestText ) >= aTestText.Len();
+ const int nFirstChar = HasGlyphs( rFont, aTestText );
+ const bool bUIFontOk = (nFirstChar >= aTestText.Len());
+ return bUIFontOk;
}
// -----------------------------------------------------------------------
-void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
+void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl )
{
StyleSettings aTmpSt( rSettings.GetStyleSettings() );
- aTmpSt.SetHighContrastMode( FALSE );
+ aTmpSt.SetHighContrastMode( sal_False );
rSettings.SetStyleSettings( aTmpSt );
ImplGetFrame()->UpdateSettings( rSettings );
+ // reset default border width for layouters
+ ImplGetSVData()->maAppData.mnDefaultLayoutBorder = -1;
// Verify availability of the configured UI font, otherwise choose "Andale Sans UI"
String aUserInterfaceFont;
@@ -490,7 +508,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
|| rSettings.GetStyleSettings().GetWindowColor().IsDark() )
{
aStyleSettings = rSettings.GetStyleSettings();
- aStyleSettings.SetHighContrastMode( TRUE );
+ aStyleSettings.SetHighContrastMode( sal_True );
aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST );
rSettings.SetStyleSettings( aStyleSettings );
}
@@ -500,7 +518,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 );
aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST );
rSettings.SetStyleSettings( aStyleSettings );
}
@@ -595,6 +613,7 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mpDlgCtrlDownWindow = NULL; // window for dialog control
mpWindowImpl->mpFirstDel = NULL; // Dtor notification list
mpWindowImpl->mpUserData = NULL; // user data
+ mpWindowImpl->mpExtImpl = NULL; // extended implementation data
mpWindowImpl->mpCursor = NULL; // cursor
mpWindowImpl->mpControlFont = NULL; // font propertie
mpWindowImpl->mpVCLXWindow = NULL;
@@ -608,8 +627,6 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mnX = 0; // X-Position to Parent
mpWindowImpl->mnY = 0; // Y-Position to Parent
mpWindowImpl->mnAbsScreenX = 0; // absolute X-position on screen, used for RTL window positioning
- mpWindowImpl->mnHelpId = 0; // help id
- mpWindowImpl->mnUniqId = 0; // unique id
mpWindowImpl->mpChildClipRegion = NULL; // Child-Clip-Region when ClipChildren
mpWindowImpl->mpPaintRegion = NULL; // Paint-ClipRegion
mpWindowImpl->mnStyle = 0; // style (init in ImplInitWindow)
@@ -625,83 +642,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
}
// -----------------------------------------------------------------------
@@ -728,7 +745,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
@@ -746,8 +763,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
@@ -762,7 +779,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;
}
@@ -773,7 +790,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;
@@ -879,21 +896,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() )
{
@@ -938,7 +955,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
@@ -964,7 +981,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();
@@ -1025,7 +1042,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() )
@@ -1064,7 +1081,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 )
@@ -1117,7 +1134,7 @@ void Window::ImplRemoveWindow( BOOL bRemoveFrameData )
void Window::ImplCallResize()
{
- mpWindowImpl->mbCallResize = FALSE;
+ mpWindowImpl->mbCallResize = sal_False;
if( GetBackground().IsGradient() )
Invalidate();
@@ -1127,13 +1144,15 @@ void Window::ImplCallResize()
// #88419# Most classes don't call the base class in Resize() and Move(),
// => Call ImpleResize/Move instead of Resize/Move directly...
ImplCallEventListeners( VCLEVENT_WINDOW_RESIZE );
+
+ ImplExtResize();
}
// -----------------------------------------------------------------------
void Window::ImplCallMove()
{
- mpWindowImpl->mbCallMove = FALSE;
+ mpWindowImpl->mbCallMove = sal_False;
if( mpWindowImpl->mbFrame )
{
@@ -1175,20 +1194,14 @@ void Window::ImplCallMove()
// -----------------------------------------------------------------------
-static ULONG ImplAutoHelpID( ResMgr* pResMgr )
+static rtl::OString ImplAutoHelpID( ResMgr* pResMgr )
{
- if ( !Application::IsAutoHelpIdEnabled() )
- return 0;
+ rtl::OString aRet;
- ULONG nHID = 0;
+ if( pResMgr && Application::IsAutoHelpIdEnabled() )
+ aRet = pResMgr->GetAutoHelpId();
- DBG_ASSERT( pResMgr, "No res mgr for auto help id" );
- if( ! pResMgr )
- return 0;
-
- nHID = pResMgr->GetAutoHelpId();
-
- return nHID;
+ return aRet;
}
// -----------------------------------------------------------------------
@@ -1208,25 +1221,26 @@ WinBits Window::ImplInitRes( const ResId& rResId )
void Window::ImplLoadRes( const ResId& rResId )
{
- // newer move this line after IncrementRes
- char* pRes = (char*)GetClassRes();
- pRes += 12;
- sal_uInt32 nHelpId = (sal_uInt32)GetLongRes( (void*)pRes );
- if ( !nHelpId )
- nHelpId = ImplAutoHelpID( rResId.GetResMgr() );
- SetHelpId( nHelpId );
+ sal_uLong nObjMask = ReadLongRes();
- 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
+ // so we always create an auto help id that might be overwritten later
+ // HelpId
+ rtl::OString aHelpId = ImplAutoHelpID( rResId.GetResMgr() );
// ResourceStyle
- ULONG nRSStyle = ReadLongRes();
+ sal_uLong nRSStyle = ReadLongRes();
// WinBits
ReadLongRes();
- // HelpId
- ReadLongRes();
- BOOL bPos = FALSE;
- BOOL bSize = FALSE;
+ if( nObjMask & WINDOW_HELPID )
+ aHelpId = ReadByteStringRes();
+
+ SetHelpId( aHelpId );
+
+ sal_Bool bPos = sal_False;
+ sal_Bool bSize = sal_False;
Point aPos;
Size aSize;
@@ -1235,7 +1249,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();
@@ -1250,7 +1264,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();
@@ -1276,14 +1290,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() );
@@ -1293,11 +1307,11 @@ void Window::ImplLoadRes( const ResId& rResId )
SetData( (void*)nRes );
}
if ( nObjMask & WINDOW_UNIQUEID )
- SetUniqueId( (ULONG)ReadLongRes() );
+ SetUniqueId( ReadByteStringRes() );
if ( nObjMask & WINDOW_BORDER_STYLE )
{
- USHORT nBorderStyle = (USHORT)ReadLongRes();
+ sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes();
SetBorderStyle( nBorderStyle );
}
}
@@ -1318,11 +1332,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->mpSmartHelpId = NULL;
- mpWindowImpl->mpWinData->mpSmartUniqueId = NULL;
+ 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;
@@ -1333,7 +1345,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();
@@ -1363,7 +1375,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
@@ -1387,7 +1399,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() )
@@ -1407,7 +1419,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;
@@ -1415,22 +1427,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
{
@@ -1440,19 +1452,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 );
}
@@ -1482,15 +1494,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;
}
// -----------------------------------------------------------------------
@@ -1498,7 +1510,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();
@@ -1518,7 +1530,7 @@ PointerStyle Window::ImplGetMousePointer() const
if ( pWindow->mpWindowImpl->mnWaitCount )
{
ePointerStyle = POINTER_WAIT;
- bWait = TRUE;
+ bWait = sal_True;
}
else
{
@@ -1541,11 +1553,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.
@@ -1582,11 +1594,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.
@@ -1618,10 +1630,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 )
@@ -1677,7 +1689,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() );
@@ -1703,7 +1715,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() )
{
@@ -1730,7 +1742,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 );
@@ -1754,9 +1766,9 @@ 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 )
{
@@ -1781,7 +1793,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();
@@ -1800,9 +1812,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 );
@@ -1816,7 +1828,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
}
}
else
- bVisibleState = FALSE;
+ bVisibleState = sal_False;
}
// Visible-Status updaten
@@ -1880,31 +1892,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 )
@@ -1912,14 +1924,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;
}
}
@@ -1928,15 +1940,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;
}
@@ -1945,18 +1957,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
@@ -1966,7 +1978,7 @@ BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller )
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
}
@@ -2046,7 +2058,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 );
@@ -2081,21 +2093,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;
@@ -2149,13 +2161,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;
}
// -----------------------------------------------------------------------
@@ -2180,7 +2192,7 @@ void Window::ImplInitWinChildClipRegion()
ImplClipChilds( *mpWindowImpl->mpChildClipRegion );
}
- mpWindowImpl->mbInitChildRegion = FALSE;
+ mpWindowImpl->mbInitChildRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -2261,7 +2273,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 )
@@ -2333,13 +2345,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);
@@ -2393,8 +2405,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 );
@@ -2434,11 +2446,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
@@ -2464,7 +2476,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;
@@ -2531,14 +2543,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();
@@ -2596,7 +2608,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 );
@@ -2626,7 +2638,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
@@ -2634,7 +2646,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;
@@ -2647,7 +2659,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
{
pOpaqueWindow = pTempWindow;
nFlags |= INVALIDATE_CHILDREN;
- bInvalidateAll = FALSE;
+ bInvalidateAll = sal_False;
break;
}
@@ -2659,7 +2671,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 )
@@ -2668,7 +2680,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
@@ -2687,7 +2699,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;
@@ -2714,7 +2726,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 )
{
@@ -2729,7 +2741,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;
}
}
@@ -2739,7 +2751,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 );
@@ -2767,7 +2779,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 );
@@ -2777,7 +2789,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();
@@ -2822,11 +2834,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 )
@@ -2835,7 +2847,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
@@ -2844,7 +2856,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;
@@ -2864,7 +2876,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;
@@ -2882,7 +2894,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 )
@@ -2892,14 +2904,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 )
@@ -2914,7 +2926,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
@@ -2924,7 +2936,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) )
{
@@ -2946,7 +2958,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 )
@@ -2997,7 +3009,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 )
@@ -3027,24 +3039,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
@@ -3103,9 +3115,9 @@ void Window::ImplUpdateWindowPtr()
// -----------------------------------------------------------------------
-void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame )
+void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame )
{
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
Show( false );
ImplRemoveWindow( bNewFrame );
Window* pRealParent = mpWindowImpl->mpRealParent;
@@ -3132,9 +3144,9 @@ void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame )
// -----------------------------------------------------------------------
-BOOL Window::ImplUpdatePos()
+sal_Bool Window::ImplUpdatePos()
{
- BOOL bSysChild = FALSE;
+ sal_Bool bSysChild = sal_False;
if ( ImplIsOverlapWindow() )
{
@@ -3153,12 +3165,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;
}
@@ -3180,11 +3192,11 @@ 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 bCopyBits = FALSE;
+ sal_Bool bNewPos = sal_False;
+ sal_Bool bNewSize = sal_False;
+ sal_Bool bCopyBits = sal_False;
long nOldOutOffX = mnOutOffX;
long nOldOutOffY = mnOutOffY;
long nOldOutWidth = mnOutWidth;
@@ -3206,17 +3218,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 )
@@ -3224,8 +3236,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nWidth != mnOutWidth )
{
mnOutWidth = nWidth;
- bNewSize = TRUE;
- bCopyBits = FALSE;
+ bNewSize = sal_True;
+ bCopyBits = sal_False;
}
}
if ( nFlags & WINDOW_POSSIZE_HEIGHT )
@@ -3235,8 +3247,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nHeight != mnOutHeight )
{
mnOutHeight = nHeight;
- bNewSize = TRUE;
- bCopyBits = FALSE;
+ bNewSize = sal_True;
+ bCopyBits = sal_False;
}
}
@@ -3286,12 +3298,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 )
@@ -3304,11 +3316,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;
}
}
@@ -3324,7 +3336,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
*/
if ( bNewPos || bNewSize )
{
- BOOL bUpdateSysObjPos = FALSE;
+ sal_Bool bUpdateSysObjPos = sal_False;
if ( bNewPos )
bUpdateSysObjPos = ImplUpdatePos();
@@ -3351,7 +3363,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
}
else
{
- mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = TRUE;
+ mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = sal_True;
}
}
}
@@ -3377,12 +3389,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 )
@@ -3393,7 +3405,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 ?
@@ -3401,8 +3413,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() )
@@ -3412,7 +3424,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 );
@@ -3424,7 +3436,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 )
{
@@ -3437,10 +3449,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() )
@@ -3448,10 +3460,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 );
}
@@ -3463,7 +3475,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 );
}
@@ -3476,7 +3488,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 );
}
@@ -3567,7 +3579,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" );
@@ -3584,7 +3596,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 )
@@ -3607,7 +3619,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 )
{
@@ -3620,7 +3632,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()) ||
@@ -3661,7 +3673,7 @@ void Window::ImplToTop( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ImplStartToTop( USHORT nFlags )
+void Window::ImplStartToTop( sal_uInt16 nFlags )
{
ImplCalcToTopData aStartData;
ImplCalcToTopData* pCurData;
@@ -3716,7 +3728,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) )
@@ -3735,7 +3747,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();
}
@@ -3753,7 +3765,7 @@ void Window::ImplShowAllOverlaps()
if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible )
{
pOverlapWindow->Show( true, SHOW_NOACTIVATE );
- pOverlapWindow->mpWindowImpl->mbOverlapVisible = FALSE;
+ pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_False;
}
pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
@@ -3769,7 +3781,7 @@ void Window::ImplHideAllOverlaps()
{
if ( pOverlapWindow->IsVisible() )
{
- pOverlapWindow->mpWindowImpl->mbOverlapVisible = TRUE;
+ pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_True;
pOverlapWindow->Show( false );
}
@@ -3779,24 +3791,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;
@@ -3843,8 +3855,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();
@@ -3855,7 +3867,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
!pNewRealWindow->GetActivateMode() )
{
pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow;
- bCallDeactivate = FALSE;
+ bCallDeactivate = sal_False;
}
}
else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) ||
@@ -3864,15 +3876,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();
}
}
@@ -3884,14 +3896,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();
}
}
@@ -3900,14 +3912,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();
}
}
@@ -3929,7 +3941,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 )
@@ -3987,13 +3999,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;
@@ -4001,7 +4013,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;
@@ -4011,7 +4023,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;
@@ -4072,11 +4084,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();
}
}
@@ -4106,7 +4118,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
@@ -4123,7 +4135,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
if( !aDogTag.IsDelete() )
{
mpWindowImpl->mnGetFocusFlags = 0;
- mpWindowImpl->mbInFocusHdl = FALSE;
+ mpWindowImpl->mbInFocusHdl = sal_False;
}
}
}
@@ -4243,6 +4255,8 @@ namespace
Window::~Window()
{
+ ImplFreeExtWindowImpl();
+
vcl::LazyDeletor<Window>::Undelete( this );
DBG_DTOR( Window, ImplDbgCheckWindow );
@@ -4254,7 +4268,7 @@ Window::~Window()
// Dispose of the canvas implementation (which, currently, has an
// own wrapper window as a child to this one.
- Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
+ uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
if( xCanvas.is() )
{
uno::Reference < lang::XComponent > xCanvasComponent( xCanvas,
@@ -4263,7 +4277,7 @@ Window::~Window()
xCanvasComponent->dispose();
}
- mpWindowImpl->mbInDtor = TRUE;
+ mpWindowImpl->mbInDtor = sal_True;
ImplCallEventListeners( VCLEVENT_OBJECT_DYING );
@@ -4299,12 +4313,12 @@ Window::~Window()
// deregister drop target listener
if( mpWindowImpl->mpFrameData->mxDropTargetListener.is() )
{
- Reference< XDragGestureRecognizer > xDragGestureRecognizer =
- Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
+ uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer =
+ uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
if( xDragGestureRecognizer.is() )
{
xDragGestureRecognizer->removeDragGestureListener(
- Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
+ uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
}
mpWindowImpl->mpFrameData->mxDropTarget->removeDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener );
@@ -4312,7 +4326,7 @@ Window::~Window()
}
// shutdown drag and drop for this frame window
- Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY );
+ uno::Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY );
// DNDEventDispatcher does not hold a reference of the DropTarget,
// so it's ok if it does not support XComponent
@@ -4326,7 +4340,7 @@ Window::~Window()
}
}
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False );
if ( pWrapper )
pWrapper->WindowDestroyed( this );
@@ -4362,16 +4376,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;
@@ -4386,13 +4400,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;
@@ -4499,11 +4513,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 );
@@ -4589,18 +4603,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();
@@ -4626,10 +4640,6 @@ Window::~Window()
delete mpWindowImpl->mpWinData->mpFocusRect;
if ( mpWindowImpl->mpWinData->mpTrackRect )
delete mpWindowImpl->mpWinData->mpTrackRect;
- if ( mpWindowImpl->mpWinData->mpSmartHelpId )
- delete mpWindowImpl->mpWinData->mpSmartHelpId;
- if ( mpWindowImpl->mpWinData->mpSmartUniqueId )
- delete mpWindowImpl->mpWinData->mpSmartUniqueId;
delete mpWindowImpl->mpWinData;
}
@@ -4683,17 +4693,24 @@ void Window::doLazyDelete()
vcl::LazyDeletor<Window>::Delete( this );
}
-USHORT Window::GetIndicatorState() const
+sal_uInt16 Window::GetIndicatorState() const
{
return mpWindowImpl->mpFrame->GetIndicatorState().mnState;
}
-void Window::SimulateKeyPress( USHORT nKeyCode ) const
+void Window::SimulateKeyPress( sal_uInt16 nKeyCode ) const
{
mpWindowImpl->mpFrame->SimulateKeyPress(nKeyCode);
}
// -----------------------------------------------------------------------
+void Window::InterceptChildWindowKeyDown( sal_Bool bIntercept )
+{
+ if( mpWindowImpl->mpSysObj )
+ mpWindowImpl->mpSysObj->InterceptChildWindowKeyDown( bIntercept );
+}
+
+// -----------------------------------------------------------------------
void Window::MouseMove( const MouseEvent& rMEvt )
{
@@ -4703,7 +4720,7 @@ void Window::MouseMove( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEMOVE, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseMove = TRUE;
+ mpWindowImpl->mbMouseMove = sal_True;
}
// -----------------------------------------------------------------------
@@ -4716,7 +4733,7 @@ void Window::MouseButtonDown( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONDOWN, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonDown = TRUE;
+ mpWindowImpl->mbMouseButtonDown = sal_True;
}
// -----------------------------------------------------------------------
@@ -4729,7 +4746,7 @@ void Window::MouseButtonUp( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONUP, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonUp = TRUE;
+ mpWindowImpl->mbMouseButtonUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4742,7 +4759,7 @@ void Window::KeyInput( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYINPUT, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyInput = TRUE;
+ mpWindowImpl->mbKeyInput = sal_True;
}
// -----------------------------------------------------------------------
@@ -4755,7 +4772,7 @@ void Window::KeyUp( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYUP, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyUp = TRUE;
+ mpWindowImpl->mbKeyUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4777,7 +4794,13 @@ void Window::Paint( const Rectangle& rRect )
// -----------------------------------------------------------------------
-void Window::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void Window::PostPaint()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uLong )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -4881,29 +4904,18 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
}
else
{
- SmartId aSmartId = GetSmartHelpId();
-
- ULONG nNumHelpId = 0;
- String aStrHelpId;
- if( aSmartId.HasString() )
- aStrHelpId = aSmartId.GetStr();
- if( aSmartId.HasNumeric() )
- nNumHelpId = aSmartId.GetNum();
-
- if ( !nNumHelpId && aStrHelpId.Len() == 0 && ImplGetParent() )
+ String aStrHelpId( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ if ( aStrHelpId.Len() == 0 && ImplGetParent() )
ImplGetParent()->RequestHelp( rHEvt );
else
{
- if ( !nNumHelpId && aStrHelpId.Len() == 0 )
- nNumHelpId = OOO_HELP_INDEX;
-
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if( aStrHelpId.Len() > 0 )
pHelp->Start( aStrHelpId, this );
else
- pHelp->Start( nNumHelpId, this );
+ pHelp->Start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OOO_HELP_INDEX ) ), this );
}
}
}
@@ -4921,7 +4933,7 @@ void Window::Command( const CommandEvent& rCEvt )
NotifyEvent aNEvt( EVENT_COMMAND, this, &rCEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbCommand = TRUE;
+ mpWindowImpl->mbCommand = sal_True;
}
// -----------------------------------------------------------------------
@@ -4937,7 +4949,7 @@ void Window::Tracking( const TrackingEvent& rTEvt )
// -----------------------------------------------------------------------
-void Window::UserEvent( ULONG, void* )
+void Window::UserEvent( sal_uLong, void* )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -5065,7 +5077,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 );
@@ -5073,11 +5085,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 ) )
@@ -5085,11 +5097,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 ) )
@@ -5112,7 +5124,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
@@ -5122,27 +5134,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() )
@@ -5159,7 +5171,7 @@ long Window::Notify( NotifyEvent& rNEvt )
}
pWrapper->ImplStartDocking( aPos );
}
- return TRUE;
+ return sal_True;
}
}
else if( rNEvt.GetType() == EVENT_KEYINPUT )
@@ -5177,7 +5189,7 @@ long Window::Notify( NotifyEvent& rNEvt )
*/
if( pWrapper->IsFloatingMode() )
ToTop( TOTOP_GRABFOCUSONLY );
- return TRUE;
+ return sal_True;
}
}
}
@@ -5200,7 +5212,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();
@@ -5219,7 +5231,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
@@ -5232,7 +5244,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 );
@@ -5302,25 +5314,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 );
@@ -5329,23 +5341,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 );
@@ -5354,23 +5366,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 );
@@ -5387,14 +5399,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;
}
@@ -5404,28 +5416,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;
}
// -----------------------------------------------------------------------
@@ -5483,7 +5495,7 @@ SystemWindow* Window::GetSystemWindow() const
// -----------------------------------------------------------------------
-void Window::SetBorderStyle( USHORT nBorderStyle )
+void Window::SetBorderStyle( sal_uInt16 nBorderStyle )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5526,7 +5538,7 @@ void Window::SetBorderStyle( USHORT nBorderStyle )
// -----------------------------------------------------------------------
-USHORT Window::GetBorderStyle() const
+sal_uInt16 Window::GetBorderStyle() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5574,7 +5586,7 @@ long Window::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void Window::EnableClipSiblings( BOOL bClipSiblings )
+void Window::EnableClipSiblings( sal_Bool bClipSiblings )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5586,7 +5598,7 @@ void Window::EnableClipSiblings( BOOL bClipSiblings )
// -----------------------------------------------------------------------
-void Window::SetMouseTransparent( BOOL bTransparent )
+void Window::SetMouseTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5601,7 +5613,7 @@ void Window::SetMouseTransparent( BOOL bTransparent )
// -----------------------------------------------------------------------
-void Window::SetPaintTransparent( BOOL bTransparent )
+void Window::SetPaintTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5628,7 +5640,7 @@ void Window::SetInputContext( const InputContext& rInputContext )
// -----------------------------------------------------------------------
-void Window::EndExtTextInput( USHORT nFlags )
+void Window::EndExtTextInput( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5686,24 +5698,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();
@@ -5727,20 +5739,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 )
@@ -5830,7 +5842,7 @@ Font Window::GetPointFont() const
// -----------------------------------------------------------------------
-void Window::SetParentClipMode( USHORT nMode )
+void Window::SetParentClipMode( sal_uInt16 nMode )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5842,14 +5854,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 );
@@ -5870,7 +5882,7 @@ void Window::SetWindowRegionPixel()
else if( mpWindowImpl->mbFrame )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL);
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
mpWindowImpl->mpFrame->ResetClipRegion();
}
else
@@ -5878,7 +5890,7 @@ void Window::SetWindowRegionPixel()
if ( mpWindowImpl->mbWinRegion )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL );
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
ImplSetClipFlag();
if ( IsReallyVisible() )
@@ -5917,9 +5929,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 );
@@ -5944,14 +5956,14 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
if ( mpWindowImpl->mbWinRegion )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL );
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
ImplSetClipFlag();
}
}
else
{
mpWindowImpl->maWinRegion = rRegion;
- mpWindowImpl->mbWinRegion = TRUE;
+ mpWindowImpl->mbWinRegion = sal_True;
ImplSetClipFlag();
}
@@ -5983,7 +5995,7 @@ const Region& Window::GetWindowRegionPixel() const
// -----------------------------------------------------------------------
-BOOL Window::IsWindowRegionPixel() const
+sal_Bool Window::IsWindowRegionPixel() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5995,7 +6007,7 @@ BOOL Window::IsWindowRegionPixel() const
// -----------------------------------------------------------------------
-Region Window::GetWindowClipRegionPixel( USHORT nFlags ) const
+Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6066,7 +6078,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion )
if( ! aDevPixRegion.IsEmpty() )
{
mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
}
}
@@ -6101,13 +6113,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 );
}
}
@@ -6136,7 +6148,7 @@ void Window::SetParent( Window* pNewParent )
if ( mpWindowImpl->mbFrame )
mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame );
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
Show( false, SHOW_NOFOCUSCHANGE );
// Testen, ob sich das Overlap-Window aendert
@@ -6154,9 +6166,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 )
@@ -6178,7 +6190,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();
@@ -6217,7 +6229,7 @@ void Window::SetParent( Window* pNewParent )
}
// Activate-Status beim naechsten Overlap-Window updaten
- if ( HasChildPathFocus( TRUE ) )
+ if ( HasChildPathFocus( sal_True ) )
ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow );
}
@@ -6258,7 +6270,7 @@ void Window::SetParent( Window* pNewParent )
// -----------------------------------------------------------------------
-void Window::Show( BOOL bVisible, USHORT nFlags )
+void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6267,7 +6279,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 )
@@ -6280,14 +6292,14 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
{
bool bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate;
if ( mpWindowImpl->mbNoParentUpdate )
- mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = TRUE;
+ mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = sal_True;
mpWindowImpl->mpBorderWindow->Show( 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 );
@@ -6295,12 +6307,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 )
@@ -6395,7 +6407,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
@@ -6410,7 +6422,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 );
@@ -6437,11 +6449,11 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
}
//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;
@@ -6562,10 +6574,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
@@ -6607,7 +6619,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 )
@@ -6626,17 +6638,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) ||
@@ -6694,7 +6706,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 );
@@ -6710,11 +6722,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;
@@ -6727,11 +6739,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 );
}
}
@@ -6746,11 +6758,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++;
@@ -6761,19 +6773,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 )
{
@@ -6793,19 +6805,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 )
{
@@ -6825,7 +6837,7 @@ void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::SetActivateMode( USHORT nMode )
+void Window::SetActivateMode( sal_uInt16 nMode )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6840,9 +6852,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();
}
}
@@ -6850,7 +6862,7 @@ void Window::SetActivateMode( USHORT nMode )
{
if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) )
{
- mpWindowImpl->mbActive = TRUE;
+ mpWindowImpl->mbActive = sal_True;
Activate();
}
}
@@ -6859,7 +6871,7 @@ void Window::SetActivateMode( USHORT nMode )
// -----------------------------------------------------------------------
-void Window::ToTop( USHORT nFlags )
+void Window::ToTop( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6869,7 +6881,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 );
@@ -6987,7 +6999,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
@@ -7046,7 +7058,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::EnableAlwaysOnTop( BOOL bEnable )
+void Window::EnableAlwaysOnTop( sal_Bool bEnable )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7064,16 +7076,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;
@@ -7093,7 +7105,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 )
@@ -7307,18 +7319,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,
@@ -7348,7 +7360,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 );
@@ -7360,7 +7372,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 );
@@ -7372,7 +7384,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll,
// -----------------------------------------------------------------------
-void Window::Invalidate( USHORT nFlags )
+void Window::Invalidate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7384,7 +7396,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 );
@@ -7401,7 +7413,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 );
@@ -7420,7 +7432,7 @@ void Window::Invalidate( const Region& rRegion, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Validate( USHORT nFlags )
+void Window::Validate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7432,7 +7444,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 );
@@ -7449,7 +7461,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 );
@@ -7468,18 +7480,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() )
{
@@ -7488,12 +7500,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;
}
// -----------------------------------------------------------------------
@@ -7511,14 +7523,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
@@ -7587,7 +7599,7 @@ void Window::Sync()
// -----------------------------------------------------------------------
-void Window::SetUpdateMode( BOOL bUpdate )
+void Window::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7606,7 +7618,7 @@ void Window::GrabFocus()
// -----------------------------------------------------------------------
-BOOL Window::HasFocus() const
+sal_Bool Window::HasFocus() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7648,7 +7660,7 @@ void Window::SetFakeFocus( bool bFocus )
// -----------------------------------------------------------------------
-BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
+sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7664,7 +7676,7 @@ BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin;
if ( pFocusWin )
return ImplIsWindowOrChild( pFocusWin, bSystemWindow );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -7685,7 +7697,7 @@ void Window::CaptureMouse()
if ( pSVData->maWinData.mpCaptureWin != this )
{
pSVData->maWinData.mpCaptureWin = this;
- mpWindowImpl->mpFrame->CaptureMouse( TRUE );
+ mpWindowImpl->mpFrame->CaptureMouse( sal_True );
}
}
@@ -7703,14 +7715,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 );
@@ -7735,7 +7747,7 @@ void Window::SetPointer( const Pointer& rPointer )
// -----------------------------------------------------------------------
-void Window::EnableChildPointerOverwrite( BOOL bOverwrite )
+void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7805,7 +7817,7 @@ Point Window::GetLastPointerPosPixel()
// -----------------------------------------------------------------------
-void Window::ShowPointer( BOOL bVisible )
+void Window::ShowPointer( sal_Bool bVisible )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7844,7 +7856,7 @@ Window::PointerState Window::GetPointerState()
// -----------------------------------------------------------------------
-BOOL Window::IsMouseOver()
+sal_Bool Window::IsMouseOver()
{
return ImplGetWinData()->mbMouseOver;
}
@@ -7922,7 +7934,7 @@ void Window::SetText( const XubString& rStr )
// name change.
if ( IsReallyVisible() )
{
- Window* pWindow = GetLabelFor();
+ Window* pWindow = GetAccessibleRelationLabelFor();
if ( pWindow && pWindow != this )
pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle );
}
@@ -7982,32 +7994,22 @@ const XubString& Window::GetHelpText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- SmartId aSmartId = GetSmartHelpId();
-
- ULONG nNumHelpId = 0;
- String aStrHelpId;
- if( aSmartId.HasString() )
- aStrHelpId = aSmartId.GetStr();
- if( aSmartId.HasNumeric() )
- nNumHelpId = aSmartId.GetNum();
+ String aStrHelpId( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
bool bStrHelpId = (aStrHelpId.Len() > 0);
- if ( !mpWindowImpl->maHelpText.Len() && (nNumHelpId || bStrHelpId) )
+ if ( !mpWindowImpl->maHelpText.Len() && bStrHelpId )
{
if ( !IsDialog() && (mpWindowImpl->mnType != WINDOW_TABPAGE) && (mpWindowImpl->mnType != WINDOW_FLOATINGWINDOW) )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- if( bStrHelpId )
- ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
- else
- ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this );
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
}
}
- else if( mpWindowImpl->mbHelpTextDynamic && (nNumHelpId || bStrHelpId) )
+ else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId )
{
static const char* pEnv = getenv( "HELP_DEBUG" );
if( pEnv && *pEnv )
@@ -8015,13 +8017,10 @@ const XubString& Window::GetHelpText() const
rtl::OUStringBuffer aTxt( 64+mpWindowImpl->maHelpText.Len() );
aTxt.append( mpWindowImpl->maHelpText );
aTxt.appendAscii( "\n------------------\n" );
- if( bStrHelpId )
- aTxt.append( rtl::OUString( aStrHelpId ) );
- else
- aTxt.append( sal_Int32( nNumHelpId ) );
+ aTxt.append( rtl::OUString( aStrHelpId ) );
mpWindowImpl->maHelpText = aTxt.makeStringAndClear();
}
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
return mpWindowImpl->maHelpText;
@@ -8039,11 +8038,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 )
{
@@ -8056,11 +8055,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 )
{
@@ -8075,7 +8074,7 @@ Window* Window::GetChild( USHORT nChild ) const
// -----------------------------------------------------------------------
-Window* Window::GetWindow( USHORT nType ) const
+Window* Window::GetWindow( sal_uInt16 nType ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8167,7 +8166,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 );
@@ -8180,22 +8179,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 );
}
@@ -8234,7 +8233,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 )
{
@@ -8331,7 +8330,7 @@ void Window::ImplStartDnd()
// -----------------------------------------------------------------------
-Reference< XDropTarget > Window::GetDropTarget()
+uno::Reference< XDropTarget > Window::GetDropTarget()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8344,7 +8343,7 @@ Reference< XDropTarget > Window::GetDropTarget()
if( ! mpWindowImpl->mpFrameData->mxDropTarget.is() )
{
// initialization is done in GetDragSource
- Reference< XDragSource > xDragSource = GetDragSource();
+ uno::Reference< XDragSource > xDragSource = GetDragSource();
}
if( mpWindowImpl->mpFrameData->mxDropTarget.is() )
@@ -8360,16 +8359,16 @@ Reference< XDropTarget > Window::GetDropTarget()
mpWindowImpl->mpFrameData->mxDropTarget->addDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener );
// register also as drag gesture listener if directly supported by drag source
- Reference< XDragGestureRecognizer > xDragGestureRecognizer =
- Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
+ uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer =
+ uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
if( xDragGestureRecognizer.is() )
{
xDragGestureRecognizer->addDragGestureListener(
- Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
+ uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
}
else
- mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE;
+ mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True;
}
@@ -8388,12 +8387,12 @@ Reference< XDropTarget > Window::GetDropTarget()
}
// this object is located in the same process, so there will be no runtime exception
- return Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY );
+ return uno::Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY );
}
// -----------------------------------------------------------------------
-Reference< XDragSource > Window::GetDragSource()
+uno::Reference< XDragSource > Window::GetDragSource()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8403,7 +8402,7 @@ Reference< XDragSource > Window::GetDragSource()
{
try
{
- Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
+ uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
if ( xFactory.is() )
{
const SystemEnvData * pEnvData = GetSystemData();
@@ -8437,10 +8436,10 @@ Reference< XDragSource > Window::GetDragSource()
aDropTargetAL[ 2 ] = makeAny( vcl::createBmpConverter() );
#endif
if( aDragSourceSN.getLength() )
- mpWindowImpl->mpFrameData->mxDragSource = Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxDragSource = uno::Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY );
if( aDropTargetSN.getLength() )
- mpWindowImpl->mpFrameData->mxDropTarget = Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxDropTarget = uno::Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY );
}
}
}
@@ -8457,12 +8456,12 @@ Reference< XDragSource > Window::GetDragSource()
return mpWindowImpl->mpFrameData->mxDragSource;
}
- return Reference< XDragSource > ();
+ return uno::Reference< XDragSource > ();
}
// -----------------------------------------------------------------------
-void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Reference< XDropTarget > &xDropTarget )
+void Window::GetDragSourceDropTarget(uno::Reference< XDragSource >& xDragSource, uno::Reference< XDropTarget > &xDropTarget )
// only for RVP transmission
{
if( mpWindowImpl->mpFrameData )
@@ -8480,14 +8479,14 @@ void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Refe
// -----------------------------------------------------------------------
-Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer()
+uno::Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer()
{
- return Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY );
+ return uno::Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY );
}
// -----------------------------------------------------------------------
-Reference< XClipboard > Window::GetClipboard()
+uno::Reference< XClipboard > Window::GetClipboard()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8497,19 +8496,19 @@ Reference< XClipboard > Window::GetClipboard()
{
try
{
- Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
+ uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
if( xFactory.is() )
{
- mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboardExt")) ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboardExt")) ), UNO_QUERY );
if( !mpWindowImpl->mpFrameData->mxClipboard.is() )
- mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")) ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")) ), UNO_QUERY );
#if defined(UNX) && !defined(QUARTZ) // unix clipboard needs to be initialized
if( mpWindowImpl->mpFrameData->mxClipboard.is() )
{
- Reference< XInitialization > xInit = Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY );
+ uno::Reference< XInitialization > xInit = uno::Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY );
if( xInit.is() )
{
@@ -8541,7 +8540,7 @@ Reference< XClipboard > Window::GetClipboard()
// -----------------------------------------------------------------------
-Reference< XClipboard > Window::GetPrimarySelection()
+uno::Reference< XClipboard > Window::GetPrimarySelection()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8551,7 +8550,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
{
try
{
- Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
+ uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
if( xFactory.is() )
{
@@ -8561,16 +8560,16 @@ Reference< XClipboard > Window::GetPrimarySelection()
aArgumentList[ 1 ] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("PRIMARY")) );
aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() );
- mpWindowImpl->mpFrameData->mxSelection = Reference< XClipboard >( xFactory->createInstanceWithArguments(
+ mpWindowImpl->mpFrameData->mxSelection = uno::Reference< XClipboard >( xFactory->createInstanceWithArguments(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")), aArgumentList ), UNO_QUERY );
# else
- static Reference< XClipboard > s_xSelection;
+ static uno::Reference< XClipboard > s_xSelection;
if ( !s_xSelection.is() )
- s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboardExt")) ), UNO_QUERY );
+ s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboardExt")) ), UNO_QUERY );
if ( !s_xSelection.is() )
- s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")) ), UNO_QUERY );
+ s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")) ), UNO_QUERY );
mpWindowImpl->mpFrameData->mxSelection = s_xSelection;
# endif
@@ -8595,7 +8594,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
@@ -8615,7 +8614,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;
}
@@ -8625,46 +8624,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 );
@@ -8677,7 +8676,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;
@@ -8730,9 +8729,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 );
@@ -8742,9 +8741,9 @@ USHORT Window::GetAccessibleChildWindowCount()
}
*/
-USHORT Window::GetAccessibleChildWindowCount()
+sal_uInt16 Window::GetAccessibleChildWindowCount()
{
- USHORT nChildren = 0;
+ sal_uInt16 nChildren = 0;
Window* pChild = mpWindowImpl->mpFirstChild;
while( pChild )
{
@@ -8790,21 +8789,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() )
@@ -8820,7 +8819,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 )
{
@@ -8868,7 +8867,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n )
}
-void Window::SetAccessibleRole( USHORT nRole )
+void Window::SetAccessibleRole( sal_uInt16 nRole )
{
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
@@ -8877,11 +8876,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() )
@@ -8983,6 +8982,7 @@ USHORT Window::GetAccessibleRole() const
case WINDOW_HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
+ case WINDOW_RULER: nRole = accessibility::AccessibleRole::RULER; break;
case WINDOW_WINDOW:
case WINDOW_CONTROL:
case WINDOW_BORDERWINDOW:
@@ -9009,7 +9009,7 @@ void Window::SetAccessibleName( const String& rName )
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
- DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName, "AccessibleName already set!" );
+ DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName || !rName.Len(), "AccessibleName already set!" );
delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName );
}
@@ -9050,9 +9050,9 @@ String Window::GetAccessibleName() const
case WINDOW_LISTBOX:
case WINDOW_MULTILISTBOX:
case WINDOW_TREELISTBOX:
-
+ case WINDOW_METRICBOX:
{
- Window *pLabel = GetLabeledBy();
+ Window *pLabel = GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != this )
aAccessibleName = pLabel->GetText();
}
@@ -9111,7 +9111,28 @@ String Window::GetAccessibleDescription() const
return aAccessibleDescription;
}
-BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath )
+void Window::SetAccessibleRelationLabeledBy( Window* pLabeledBy )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy;
+}
+
+void Window::SetAccessibleRelationLabelFor( Window* pLabelFor )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor;
+}
+
+void Window::SetAccessibleRelationMemberOf( Window* pMemberOfWin )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin;
+}
+
+sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath )
{
if( !bTraverseParentPath )
return mpWindowImpl->mbSuppressAccessibilityEvents;
@@ -9121,14 +9142,19 @@ 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;
}
}
+void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed)
+{
+ mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed;
+}
+
void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
{
if( ! mpOutDevData )
@@ -9145,9 +9171,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() )
{
@@ -9165,7 +9191,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();
@@ -9174,21 +9200,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
@@ -9206,8 +9232,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();
@@ -9215,7 +9241,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;
@@ -9247,13 +9273,13 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
else
SetLineColor();
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
if( !highlight )
{
if( bDark )
aSelectionFillCol = COL_BLACK;
else
- nPercent = bRoundEdges ? 90 : 80; // just checked (light)
+ nPercent = 80; // just checked (light)
}
else
{
@@ -9268,7 +9294,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 50 : 20; // selected, pressed or checked ( very dark )
+ nPercent = bRoundEdges ? 40 : 20; // selected, pressed or checked ( very dark )
}
else if( bChecked || highlight == 1 )
{
@@ -9281,7 +9307,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 70 : 35; // selected, pressed or checked ( very dark )
+ nPercent = bRoundEdges ? 60 : 35; // selected, pressed or checked ( very dark )
}
else
{
@@ -9297,7 +9323,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 80 : 70; // selected ( dark )
+ nPercent = 70; // selected ( dark )
}
}
@@ -9367,7 +9393,7 @@ Window* Window::GetPreferredKeyInputWindow()
}
-BOOL Window::IsScrollable() const
+sal_Bool Window::IsScrollable() const
{
// check for scrollbars
Window *pChild = mpWindowImpl->mpFirstChild;
@@ -9381,24 +9407,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 );
+ uno::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
@@ -9407,7 +9433,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);
}
@@ -9439,16 +9465,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
@@ -9456,15 +9482,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
@@ -9476,9 +9502,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;
}
}
@@ -9493,11 +9519,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 )
{
@@ -9522,7 +9548,7 @@ void Window::EnableNativeWidget( BOOL bEnable )
}
}
-BOOL Window::IsNativeWidgetEnabled() const
+sal_Bool Window::IsNativeWidgetEnabled() const
{
return ImplGetWinData()->mbEnableNativeWidget;
}
@@ -9531,12 +9557,12 @@ BOOL Window::IsNativeWidgetEnabled() const
#include <salframe.h>
#endif
-Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
+uno::Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
bool bFullscreen,
bool bSpriteCanvas ) const
{
// try to retrieve hard reference from weak member
- Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
+ uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
// canvas still valid? Then we're done.
if( xCanvas.is() )
@@ -9575,21 +9601,24 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi
aArg[ 2 ] = makeAny( ::com::sun::star::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) );
aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop ? sal_True : sal_False );
- aArg[ 4 ] = makeAny( Reference< awt::XWindow >(
+ aArg[ 4 ] = makeAny( uno::Reference< awt::XWindow >(
const_cast<Window*>(this)->GetComponentInterface(),
uno::UNO_QUERY ));
- Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
+ uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
// Create canvas instance with window handle
// =========================================
if ( xFactory.is() )
{
- static Reference<lang::XMultiServiceFactory> xCanvasFactory(
- xFactory->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star."
- "rendering.CanvasFactory") ) ), UNO_QUERY );
+ static ::vcl::DeleteUnoReferenceOnDeinit<lang::XMultiServiceFactory> xStaticCanvasFactory(
+ uno::Reference<lang::XMultiServiceFactory>(
+ xFactory->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.rendering.CanvasFactory") ) ),
+ UNO_QUERY ));
+ uno::Reference<lang::XMultiServiceFactory> xCanvasFactory(xStaticCanvasFactory.get());
+
if(xCanvasFactory.is())
{
#ifdef WNT
@@ -9635,37 +9664,37 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi
return xCanvas;
}
-Reference< rendering::XCanvas > Window::GetCanvas() const
+uno::Reference< rendering::XCanvas > Window::GetCanvas() const
{
return ImplGetCanvas( Size(), false, false );
}
-Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const
+uno::Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const
{
- Reference< rendering::XSpriteCanvas > xSpriteCanvas(
+ uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas(
ImplGetCanvas( Size(), false, true ), uno::UNO_QUERY );
return xSpriteCanvas;
}
-Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const
+uno::Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const
{
- Reference< rendering::XSpriteCanvas > xSpriteCanvas(
+ uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas(
ImplGetCanvas( rFullscreenSize, true, true ), uno::UNO_QUERY );
return xSpriteCanvas;
}
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" );
@@ -9795,8 +9824,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 );