[Libreoffice-commits] core.git: 4 commits - vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Fri May 23 23:03:32 PDT 2014


 vcl/source/window/clipping.cxx |   96 -----
 vcl/source/window/window.cxx   |  731 +++++++++++++++++++----------------------
 2 files changed, 356 insertions(+), 471 deletions(-)

New commits:
commit f0d74afc781e69e1ae4d7d51cf5259cb1fcb7945
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat May 24 04:43:56 2014 +1000

    vcl: rearrange function location in window.cxx
    
    Change-Id: I37db5776a3cb28de2c4fd7938566f7f3b2e2b8b2

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 40eb76e..ea9f691 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -819,164 +819,6 @@ void Window::ReleaseGraphics( bool bRelease )
     mpNextGraphics  = NULL;
 }
 
-void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags )
-{
-    if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0)
-        return;
-
-    if (nFlags & COPYAREA_WINDOWINVALIDATE)
-    {
-        const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
-                Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight));
-
-        ImplMoveAllInvalidateRegions(aSrcRect,
-                aPosAry.mnDestX-aPosAry.mnSrcX,
-                aPosAry.mnDestY-aPosAry.mnSrcY,
-                false);
-
-        mpGraphics->CopyArea(aPosAry.mnDestX, aPosAry.mnDestY,
-                aPosAry.mnSrcX, aPosAry.mnSrcY,
-                aPosAry.mnSrcWidth, aPosAry.mnSrcHeight,
-                SAL_COPYAREA_WINDOWINVALIDATE, this);
-
-        return;
-    }
-
-    OutputDevice::CopyDeviceArea(aPosAry, nFlags);
-}
-
-void Window::ImplInitAppFontData( Window* pWindow )
-{
-    ImplSVData* pSVData = ImplGetSVData();
-    long nTextHeight = pWindow->GetTextHeight();
-    long nTextWidth = pWindow->approximate_char_width() * 8;
-    long nSymHeight = nTextHeight*4;
-    // Make the basis wider if the font is too narrow
-    // such that the dialog looks symmetrical and does not become too narrow.
-    // Add some extra space when the dialog has the same width,
-    // as a little more space is better.
-    if ( nSymHeight > nTextWidth )
-        nTextWidth = nSymHeight;
-    else if ( nSymHeight+5 > nTextWidth )
-        nTextWidth = nSymHeight+5;
-    pSVData->maGDIData.mnAppFontX = nTextWidth * 10 / 8;
-    pSVData->maGDIData.mnAppFontY = nTextHeight * 10;
-
-    // FIXME: this is currently only on OS X, check with other
-    // platforms
-    if( pSVData->maNWFData.mbNoFocusRects )
-    {
-        // try to find out whether there is a large correction
-        // of control sizes, if yes, make app font scalings larger
-        // so dialog positioning is not completely off
-        ImplControlValue aControlValue;
-        Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
-        Rectangle aBoundingRgn( aCtrlRegion );
-        Rectangle aContentRgn( aCtrlRegion );
-        if( pWindow->GetNativeControlRegion( CTRL_EDITBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
-                                             CTRL_STATE_ENABLED, aControlValue, OUString(),
-                                             aBoundingRgn, aContentRgn ) )
-        {
-            // comment: the magical +6 is for the extra border in bordered
-            // (which is the standard) edit fields
-            if( aContentRgn.GetHeight() - nTextHeight > (nTextHeight+4)/4 )
-                pSVData->maGDIData.mnAppFontY = (aContentRgn.GetHeight()-4) * 10;
-        }
-    }
-
-    pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
-    if ( pSVData->maAppData.mnDialogScaleX )
-        pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
-}
-
-bool Window::ImplCheckUIFont( const Font& rFont )
-{
-    if( ImplGetSVData()->maGDIData.mbNativeFontConfig )
-        return true;
-
-    // create a text string using the localized text of important buttons
-    OUString aTestText;
-    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 = SAL_N_ELEMENTS(aTestButtons);
-    for( int n = 0; n < nTestButtonCount; ++n )
-    {
-        OUString aButtonStr = Button::GetStandardText( aTestButtons[n] );
-        // #i115432# ignore mnemonic+accelerator part of each string
-        // TODO: use a string filtering method when it becomes available
-        const sal_Int32 nLen = aButtonStr.getLength();
-        bool bInside = false;
-        for( int i = 0; i < nLen; ++i ) {
-            const sal_Unicode c = aButtonStr[ i ];
-            if( (c == '('))
-                bInside = true;
-            if( (c == ')'))
-                bInside = false;
-            if( (c == '~')
-            ||  (c == '(') || (c == ')')
-            || ((c >= 'A') && (c <= 'Z') && bInside) )
-                aButtonStr = aButtonStr.replaceAt( i, 1, " " );
-        }
-        // append sanitized button text to test string
-        aTestText += aButtonStr;
-    }
-
-    const bool bUIFontOk = ( HasGlyphs( rFont, aTestText ) == -1 );
-    return bUIFontOk;
-}
-
-void Window::ImplInitWindowData( WindowType nType )
-{
-    // We will eventually being removing the inheritance of OutputDevice from Window.
-    // It will be replaced with a composition relationship. A Window will use an OutputDevice,
-    // it will not *be* an OutputDevice
-    mpOutputDevice = (OutputDevice*)this;
-
-    mpWindowImpl = new WindowImpl( nType );
-
-    meOutDevType        = OUTDEV_WINDOW;
-
-    mbEnableRTL         = Application::GetSettings().GetLayoutRTL();         // true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
-}
-
-static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
-{
-    sal_Int32 nResult = 1;
-
-#ifndef MACOSX
-    // Setting of HiDPI is unfortunately all only a heuristic; and to add
-    // insult to an injury, the system is constantly lying to us about
-    // the DPI and whatnot
-    // eg. fdo#77059 - set the value from which we do consider the
-    // screen hi-dpi to greater than 168
-    if (nDPI > 168)
-        nResult = std::max(sal_Int32(1), (nDPI + 48) / 96);
-#else
-    (void)nDPI;
-#endif
-
-    return nResult;
-}
-
-bool ImplDoTiledRendering()
-{
-#if !HAVE_FEATURE_DESKTOP
-    // We do tiled rendering only for iOS at the moment, actually, but
-    // let's see what happens if we assume it for Android, too.
-    return true;
-#else
-    // We need some way to know globally if this process will use
-    // tiled rendering or not. Or should this be a per-window setting?
-    // Or what?
-    return false;
-#endif
-}
-
 void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )
 {
     DBG_ASSERT( mpWindowImpl->mbFrame || pParent, "Window::Window(): pParent == NULL" );
@@ -1261,6 +1103,164 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
         GetAccessibleParentWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_CHILDCREATED, this );
 }
 
+void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags )
+{
+    if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0)
+        return;
+
+    if (nFlags & COPYAREA_WINDOWINVALIDATE)
+    {
+        const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
+                Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight));
+
+        ImplMoveAllInvalidateRegions(aSrcRect,
+                aPosAry.mnDestX-aPosAry.mnSrcX,
+                aPosAry.mnDestY-aPosAry.mnSrcY,
+                false);
+
+        mpGraphics->CopyArea(aPosAry.mnDestX, aPosAry.mnDestY,
+                aPosAry.mnSrcX, aPosAry.mnSrcY,
+                aPosAry.mnSrcWidth, aPosAry.mnSrcHeight,
+                SAL_COPYAREA_WINDOWINVALIDATE, this);
+
+        return;
+    }
+
+    OutputDevice::CopyDeviceArea(aPosAry, nFlags);
+}
+
+void Window::ImplInitAppFontData( Window* pWindow )
+{
+    ImplSVData* pSVData = ImplGetSVData();
+    long nTextHeight = pWindow->GetTextHeight();
+    long nTextWidth = pWindow->approximate_char_width() * 8;
+    long nSymHeight = nTextHeight*4;
+    // Make the basis wider if the font is too narrow
+    // such that the dialog looks symmetrical and does not become too narrow.
+    // Add some extra space when the dialog has the same width,
+    // as a little more space is better.
+    if ( nSymHeight > nTextWidth )
+        nTextWidth = nSymHeight;
+    else if ( nSymHeight+5 > nTextWidth )
+        nTextWidth = nSymHeight+5;
+    pSVData->maGDIData.mnAppFontX = nTextWidth * 10 / 8;
+    pSVData->maGDIData.mnAppFontY = nTextHeight * 10;
+
+    // FIXME: this is currently only on OS X, check with other
+    // platforms
+    if( pSVData->maNWFData.mbNoFocusRects )
+    {
+        // try to find out whether there is a large correction
+        // of control sizes, if yes, make app font scalings larger
+        // so dialog positioning is not completely off
+        ImplControlValue aControlValue;
+        Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
+        Rectangle aBoundingRgn( aCtrlRegion );
+        Rectangle aContentRgn( aCtrlRegion );
+        if( pWindow->GetNativeControlRegion( CTRL_EDITBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
+                                             CTRL_STATE_ENABLED, aControlValue, OUString(),
+                                             aBoundingRgn, aContentRgn ) )
+        {
+            // comment: the magical +6 is for the extra border in bordered
+            // (which is the standard) edit fields
+            if( aContentRgn.GetHeight() - nTextHeight > (nTextHeight+4)/4 )
+                pSVData->maGDIData.mnAppFontY = (aContentRgn.GetHeight()-4) * 10;
+        }
+    }
+
+    pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
+    if ( pSVData->maAppData.mnDialogScaleX )
+        pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
+}
+
+bool Window::ImplCheckUIFont( const Font& rFont )
+{
+    if( ImplGetSVData()->maGDIData.mbNativeFontConfig )
+        return true;
+
+    // create a text string using the localized text of important buttons
+    OUString aTestText;
+    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 = SAL_N_ELEMENTS(aTestButtons);
+    for( int n = 0; n < nTestButtonCount; ++n )
+    {
+        OUString aButtonStr = Button::GetStandardText( aTestButtons[n] );
+        // #i115432# ignore mnemonic+accelerator part of each string
+        // TODO: use a string filtering method when it becomes available
+        const sal_Int32 nLen = aButtonStr.getLength();
+        bool bInside = false;
+        for( int i = 0; i < nLen; ++i ) {
+            const sal_Unicode c = aButtonStr[ i ];
+            if( (c == '('))
+                bInside = true;
+            if( (c == ')'))
+                bInside = false;
+            if( (c == '~')
+            ||  (c == '(') || (c == ')')
+            || ((c >= 'A') && (c <= 'Z') && bInside) )
+                aButtonStr = aButtonStr.replaceAt( i, 1, " " );
+        }
+        // append sanitized button text to test string
+        aTestText += aButtonStr;
+    }
+
+    const bool bUIFontOk = ( HasGlyphs( rFont, aTestText ) == -1 );
+    return bUIFontOk;
+}
+
+void Window::ImplInitWindowData( WindowType nType )
+{
+    // We will eventually being removing the inheritance of OutputDevice from Window.
+    // It will be replaced with a composition relationship. A Window will use an OutputDevice,
+    // it will not *be* an OutputDevice
+    mpOutputDevice = (OutputDevice*)this;
+
+    mpWindowImpl = new WindowImpl( nType );
+
+    meOutDevType        = OUTDEV_WINDOW;
+
+    mbEnableRTL         = Application::GetSettings().GetLayoutRTL();         // true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
+}
+
+static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
+{
+    sal_Int32 nResult = 1;
+
+#ifndef MACOSX
+    // Setting of HiDPI is unfortunately all only a heuristic; and to add
+    // insult to an injury, the system is constantly lying to us about
+    // the DPI and whatnot
+    // eg. fdo#77059 - set the value from which we do consider the
+    // screen hi-dpi to greater than 168
+    if (nDPI > 168)
+        nResult = std::max(sal_Int32(1), (nDPI + 48) / 96);
+#else
+    (void)nDPI;
+#endif
+
+    return nResult;
+}
+
+bool ImplDoTiledRendering()
+{
+#if !HAVE_FEATURE_DESKTOP
+    // We do tiled rendering only for iOS at the moment, actually, but
+    // let's see what happens if we assume it for Android, too.
+    return true;
+#else
+    // We need some way to know globally if this process will use
+    // tiled rendering or not. Or should this be a per-window setting?
+    // Or what?
+    return false;
+#endif
+}
+
 void Window::ImplSetFrameParent( const Window* pParent )
 {
     Window* pFrameWindow = ImplGetSVData()->maWinData.mpFirstFrame;
commit 18a68697eecfe318bc88e303fed4e5e17457b0ca
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat May 24 04:37:35 2014 +1000

    vcl: tabify WindowImpl
    
    Change-Id: Id348b2d2d4003777172df1c921e7ea6db5c11762

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 833a0a4..40eb76e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -564,153 +564,153 @@ Window::~Window()
 
 WindowImpl::WindowImpl( WindowType nType )
 {
-    maZoom              = Fraction( 1, 1 );
-    maWinRegion         = Region(true);
-    maWinClipRegion     = Region(true);
-    mpWinData           = NULL;         // Extra Window Data, that we dont need for all windows
-    mpOverlapData       = NULL;         // Overlap Data
-    mpFrameData         = NULL;         // Frame Data
-    mpFrame             = NULL;         // Pointer to frame window
-    mpSysObj            = NULL;
-    mpFrameWindow       = NULL;         // window to top level parent (same as frame window)
-    mpOverlapWindow     = NULL;         // first overlap parent
-    mpBorderWindow      = NULL;         // Border-Window
-    mpClientWindow      = NULL;         // Client-Window of a FrameWindow
-    mpParent            = NULL;         // parent (inkl. BorderWindow)
-    mpRealParent        = NULL;         // real parent (exkl. BorderWindow)
-    mpFirstChild        = NULL;         // first child window
-    mpLastChild         = NULL;         // last child window
-    mpFirstOverlap      = NULL;         // first overlap window (only set in overlap windows)
-    mpLastOverlap       = NULL;         // last overlap window (only set in overlap windows)
-    mpPrev              = NULL;         // prev window
-    mpNext              = NULL;         // next window
-    mpNextOverlap       = NULL;         // next overlap window of frame
-    mpLastFocusWindow   = NULL;         // window for focus restore
-    mpDlgCtrlDownWindow = NULL;         // window for dialog control
-    mpFirstDel          = NULL;         // Dtor notification list
-    mpUserData          = NULL;         // user data
-    mpCursor            = NULL;         // cursor
-    mpControlFont       = NULL;         // font propertie
-    mpVCLXWindow        = NULL;
-    mpAccessibleInfos   = NULL;
-    maControlForeground = Color( COL_TRANSPARENT );     // no foreground set
-    maControlBackground = Color( COL_TRANSPARENT );     // no background set
-    mnLeftBorder        = 0;            // left border
-    mnTopBorder         = 0;            // top border
-    mnRightBorder       = 0;            // right border
-    mnBottomBorder      = 0;            // bottom border
-    mnWidthRequest      = -1;           // width request
-    mnHeightRequest     = -1;           // height request
-    mnX                 = 0;            // X-Position to Parent
-    mnY                 = 0;            // Y-Position to Parent
-    mnAbsScreenX        = 0;            // absolute X-position on screen, used for RTL window positioning
-    mpChildClipRegion   = NULL;         // Child-Clip-Region when ClipChildren
-    mpPaintRegion       = NULL;         // Paint-ClipRegion
-    mnStyle             = 0;            // style (init in ImplInitWindow)
-    mnPrevStyle         = 0;            // prevstyle (set in SetStyle)
-    mnExtendedStyle     = 0;            // extended style (init in ImplInitWindow)
-    mnPrevExtendedStyle = 0;            // prevstyle (set in SetExtendedStyle)
-    mnType              = nType;        // type
-    mnGetFocusFlags     = 0;            // Flags fuer GetFocus()-Aufruf
-    mnWaitCount         = 0;            // Wait-Count (>1 == Warte-MousePointer)
-    mnPaintFlags        = 0;            // Flags for ImplCallPaint
-    mnParentClipMode    = 0;            // Flags for Parent-ClipChildren-Mode
-    mnActivateMode      = 0;            // Will be converted in System/Overlap-Windows
-    mnDlgCtrlFlags      = 0;            // DialogControl-Flags
-    mnLockCount         = 0;            // LockCount
-    meAlwaysInputMode   = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called
-    meHalign            = VCL_ALIGN_FILL;
-    meValign            = VCL_ALIGN_FILL;
-    mePackType          = VCL_PACK_START;
-    mnPadding           = 0;
-    mnGridHeight        = 1;
-    mnGridLeftAttach    = -1;
-    mnGridTopAttach     = -1;
-    mnGridWidth         = 1;
-    mnBorderWidth       = 0;
-    mnMarginLeft        = 0;
-    mnMarginRight       = 0;
-    mnMarginTop         = 0;
-    mnMarginBottom      = 0;
-    mbFrame             = false;        // true: Window is a frame window
-    mbBorderWin         = false;        // true: Window is a border window
-    mbOverlapWin        = false;        // true: Window is a overlap window
-    mbSysWin            = false;        // true: SystemWindow is the base class
-    mbDialog            = false;        // true: Dialog is the base class
-    mbDockWin           = false;        // true: DockingWindow is the base class
-    mbFloatWin          = false;        // true: FloatingWindow is the base class
-    mbPushButton        = false;        // true: PushButton is the base class
-    mbToolBox           = false;      // true: ToolBox is the base class
-    mbMenuFloatingWindow= false;      // true: MenuFloatingWindow is the base class
-    mbToolbarFloatingWindow= false;       // true: ImplPopupFloatWin is the base class, used for subtoolbars
-    mbSplitter          = false;      // true: Splitter is the base class
-    mbVisible           = false;        // true: Show( true ) called
-    mbOverlapVisible    = false;        // true: Hide called for visible window from ImplHideAllOverlapWindow()
-    mbDisabled          = false;        // true: Enable( false ) called
-    mbInputDisabled     = false;        // true: EnableInput( false ) called
-    mbDropDisabled      = false;        // true: Drop is enabled
-    mbNoUpdate          = false;        // true: SetUpdateMode( false ) called
-    mbNoParentUpdate    = false;        // true: SetParentUpdateMode( false ) called
-    mbActive            = false;        // true: Window Active
-    mbParentActive      = false;        // true: OverlapActive from Parent
-    mbReallyVisible     = false;        // true: this and all parents to an overlapped window are visible
-    mbReallyShown       = false;        // true: this and all parents to an overlapped window are shown
-    mbInInitShow        = false;        // true: we are in InitShow
-    mbChildNotify       = false;        // true: ChildNotify
-    mbChildPtrOverwrite = false;        // true: PointerStyle overwrites Child-Pointer
-    mbNoPtrVisible      = false;        // true: ShowPointer( false ) called
-    mbMouseMove         = false;        // true: BaseMouseMove called
-    mbPaintFrame        = false;        // true: Paint is visible, but not painted
-    mbInPaint           = false;        // true: Inside PaintHdl
-    mbMouseButtonDown   = false;        // true: BaseMouseButtonDown called
-    mbMouseButtonUp     = false;        // true: BaseMouseButtonUp called
-    mbKeyInput          = false;        // true: BaseKeyInput called
-    mbKeyUp             = false;        // true: BaseKeyUp called
-    mbCommand           = false;        // true: BaseCommand called
-    mbDefPos            = true;         // true: Position is not Set
-    mbDefSize           = true;         // true: Size is not Set
-    mbCallMove          = true;         // true: Move must be called by Show
-    mbCallResize        = true;         // true: Resize must be called by Show
-    mbWaitSystemResize  = true;         // true: Wait for System-Resize
-    mbInitWinClipRegion = true;         // true: Calc Window Clip Region
-    mbInitChildRegion   = false;        // true: InitChildClipRegion
-    mbWinRegion         = false;        // true: Window Region
-    mbClipChildren      = false;        // true: Child-window should be clipped
-    mbClipSiblings      = false;        // true: Adjacent Child-window should be clipped
-    mbChildTransparent  = false;        // true: Child-windows are allowed to switch to transparent (incl. Parent-CLIPCHILDREN)
-    mbPaintTransparent  = false;        // true: Paints should be executed on the Parent
-    mbMouseTransparent  = false;        // true: Window is transparent for Mouse
-    mbDlgCtrlStart      = false;        // true: From here on own Dialog-Control
-    mbFocusVisible      = false;        // true: Focus Visible
-    mbUseNativeFocus    = false;
-    mbNativeFocusVisible= false;        // true: native Focus Visible
-    mbInShowFocus       = false;        // prevent recursion
-    mbInHideFocus       = false;        // prevent recursion
-    mbTrackVisible      = false;        // true: Tracking Visible
-    mbControlForeground = false;        // true: Foreground-Property set
-    mbControlBackground = false;        // true: Background-Property set
-    mbAlwaysOnTop       = false;        // true: always visible for all others windows
-    mbCompoundControl   = false;        // true: Composite Control => Listener...
-    mbCompoundControlHasFocus = false;  // true: Composite Control has focus somewhere
-    mbPaintDisabled     = false;        // true: Paint should not be executed
-    mbAllResize         = false;        // true: Also sent ResizeEvents with 0,0
-    mbInDtor            = false;        // true: We're still in Window-Dtor
-    mbExtTextInput      = false;        // true: ExtTextInput-Mode is active
-    mbInFocusHdl        = false;        // true: Within GetFocus-Handler
-    mbCreatedWithToolkit = false;
-    mbSuppressAccessibilityEvents = false; // true: do not send any accessibility events
-    mbDrawSelectionBackground = false;    // true: draws transparent window background to indicate (toolbox) selection
-    mbIsInTaskPaneList = false;           // true: window was added to the taskpanelist in the topmost system window
-    mnNativeBackground  = 0;              // initialize later, depends on type
-    mbCallHandlersDuringInputDisabled = false; // true: call event handlers even if input is disabled
-    mbHelpTextDynamic = false;          // true: append help id in HELP_DEBUG case
-    mbFakeFocusSet = false; // true: pretend as if the window has focus.
-    mbHexpand = false;
-    mbVexpand = false;
-    mbExpand = false;
-    mbFill = true;
-    mbSecondary = false;
-    mbNonHomogeneous = false;
+    maZoom                              = Fraction( 1, 1 );
+    maWinRegion                         = Region(true);
+    maWinClipRegion                     = Region(true);
+    mpWinData                           = NULL;                      // Extra Window Data, that we dont need for all windows
+    mpOverlapData                       = NULL;                      // Overlap Data
+    mpFrameData                         = NULL;                      // Frame Data
+    mpFrame                             = NULL;                      // Pointer to frame window
+    mpSysObj                            = NULL;
+    mpFrameWindow                       = NULL;                      // window to top level parent (same as frame window)
+    mpOverlapWindow                     = NULL;                      // first overlap parent
+    mpBorderWindow                      = NULL;                      // Border-Window
+    mpClientWindow                      = NULL;                      // Client-Window of a FrameWindow
+    mpParent                            = NULL;                      // parent (inkl. BorderWindow)
+    mpRealParent                        = NULL;                      // real parent (exkl. BorderWindow)
+    mpFirstChild                        = NULL;                      // first child window
+    mpLastChild                         = NULL;                      // last child window
+    mpFirstOverlap                      = NULL;                      // first overlap window (only set in overlap windows)
+    mpLastOverlap                       = NULL;                      // last overlap window (only set in overlap windows)
+    mpPrev                              = NULL;                      // prev window
+    mpNext                              = NULL;                      // next window
+    mpNextOverlap                       = NULL;                      // next overlap window of frame
+    mpLastFocusWindow                   = NULL;                      // window for focus restore
+    mpDlgCtrlDownWindow                 = NULL;                      // window for dialog control
+    mpFirstDel                          = NULL;                      // Dtor notification list
+    mpUserData                          = NULL;                      // user data
+    mpCursor                            = NULL;                      // cursor
+    mpControlFont                       = NULL;                      // font properties
+    mpVCLXWindow                        = NULL;
+    mpAccessibleInfos                   = NULL;
+    maControlForeground                 = Color( COL_TRANSPARENT );  // no foreground set
+    maControlBackground                 = Color( COL_TRANSPARENT );  // no background set
+    mnLeftBorder                        = 0;                         // left border
+    mnTopBorder                         = 0;                         // top border
+    mnRightBorder                       = 0;                         // right border
+    mnBottomBorder                      = 0;                         // bottom border
+    mnWidthRequest                      = -1;                        // width request
+    mnHeightRequest                     = -1;                        // height request
+    mnX                                 = 0;                         // X-Position to Parent
+    mnY                                 = 0;                         // Y-Position to Parent
+    mnAbsScreenX                        = 0;                         // absolute X-position on screen, used for RTL window positioning
+    mpChildClipRegion                   = NULL;                      // Child-Clip-Region when ClipChildren
+    mpPaintRegion                       = NULL;                      // Paint-ClipRegion
+    mnStyle                             = 0;                         // style (init in ImplInitWindow)
+    mnPrevStyle                         = 0;                         // prevstyle (set in SetStyle)
+    mnExtendedStyle                     = 0;                         // extended style (init in ImplInitWindow)
+    mnPrevExtendedStyle                 = 0;                         // prevstyle (set in SetExtendedStyle)
+    mnType                              = nType;                     // type
+    mnGetFocusFlags                     = 0;                         // Flags fuer GetFocus()-Aufruf
+    mnWaitCount                         = 0;                         // Wait-Count (>1 == Warte-MousePointer)
+    mnPaintFlags                        = 0;                         // Flags for ImplCallPaint
+    mnParentClipMode                    = 0;                         // Flags for Parent-ClipChildren-Mode
+    mnActivateMode                      = 0;                         // Will be converted in System/Overlap-Windows
+    mnDlgCtrlFlags                      = 0;                         // DialogControl-Flags
+    mnLockCount                         = 0;                         // LockCount
+    meAlwaysInputMode                   = AlwaysInputNone;           // neither AlwaysEnableInput nor AlwaysDisableInput called
+    meHalign                            = VCL_ALIGN_FILL;
+    meValign                            = VCL_ALIGN_FILL;
+    mePackType                          = VCL_PACK_START;
+    mnPadding                           = 0;
+    mnGridHeight                        = 1;
+    mnGridLeftAttach                    = -1;
+    mnGridTopAttach                     = -1;
+    mnGridWidth                         = 1;
+    mnBorderWidth                       = 0;
+    mnMarginLeft                        = 0;
+    mnMarginRight                       = 0;
+    mnMarginTop                         = 0;
+    mnMarginBottom                      = 0;
+    mbFrame                             = false;                     // true: Window is a frame window
+    mbBorderWin                         = false;                     // true: Window is a border window
+    mbOverlapWin                        = false;                     // true: Window is a overlap window
+    mbSysWin                            = false;                     // true: SystemWindow is the base class
+    mbDialog                            = false;                     // true: Dialog is the base class
+    mbDockWin                           = false;                     // true: DockingWindow is the base class
+    mbFloatWin                          = false;                     // true: FloatingWindow is the base class
+    mbPushButton                        = false;                     // true: PushButton is the base class
+    mbToolBox                           = false;                     // true: ToolBox is the base class
+    mbMenuFloatingWindow                = false;                     // true: MenuFloatingWindow is the base class
+    mbToolbarFloatingWindow             = false;                     // true: ImplPopupFloatWin is the base class, used for subtoolbars
+    mbSplitter                          = false;                     // true: Splitter is the base class
+    mbVisible                           = false;                     // true: Show( true ) called
+    mbOverlapVisible                    = false;                     // true: Hide called for visible window from ImplHideAllOverlapWindow()
+    mbDisabled                          = false;                     // true: Enable( false ) called
+    mbInputDisabled                     = false;                     // true: EnableInput( false ) called
+    mbDropDisabled                      = false;                     // true: Drop is enabled
+    mbNoUpdate                          = false;                     // true: SetUpdateMode( false ) called
+    mbNoParentUpdate                    = false;                     // true: SetParentUpdateMode( false ) called
+    mbActive                            = false;                     // true: Window Active
+    mbParentActive                      = false;                     // true: OverlapActive from Parent
+    mbReallyVisible                     = false;                     // true: this and all parents to an overlapped window are visible
+    mbReallyShown                       = false;                     // true: this and all parents to an overlapped window are shown
+    mbInInitShow                        = false;                     // true: we are in InitShow
+    mbChildNotify                       = false;                     // true: ChildNotify
+    mbChildPtrOverwrite                 = false;                     // true: PointerStyle overwrites Child-Pointer
+    mbNoPtrVisible                      = false;                     // true: ShowPointer( false ) called
+    mbMouseMove                         = false;                     // true: BaseMouseMove called
+    mbPaintFrame                        = false;                     // true: Paint is visible, but not painted
+    mbInPaint                           = false;                     // true: Inside PaintHdl
+    mbMouseButtonDown                   = false;                     // true: BaseMouseButtonDown called
+    mbMouseButtonUp                     = false;                     // true: BaseMouseButtonUp called
+    mbKeyInput                          = false;                     // true: BaseKeyInput called
+    mbKeyUp                             = false;                     // true: BaseKeyUp called
+    mbCommand                           = false;                     // true: BaseCommand called
+    mbDefPos                            = true;                      // true: Position is not Set
+    mbDefSize                           = true;                      // true: Size is not Set
+    mbCallMove                          = true;                      // true: Move must be called by Show
+    mbCallResize                        = true;                      // true: Resize must be called by Show
+    mbWaitSystemResize                  = true;                      // true: Wait for System-Resize
+    mbInitWinClipRegion                 = true;                      // true: Calc Window Clip Region
+    mbInitChildRegion                   = false;                     // true: InitChildClipRegion
+    mbWinRegion                         = false;                     // true: Window Region
+    mbClipChildren                      = false;                     // true: Child-window should be clipped
+    mbClipSiblings                      = false;                     // true: Adjacent Child-window should be clipped
+    mbChildTransparent                  = false;                     // true: Child-windows are allowed to switch to transparent (incl. Parent-CLIPCHILDREN)
+    mbPaintTransparent                  = false;                     // true: Paints should be executed on the Parent
+    mbMouseTransparent                  = false;                     // true: Window is transparent for Mouse
+    mbDlgCtrlStart                      = false;                     // true: From here on own Dialog-Control
+    mbFocusVisible                      = false;                     // true: Focus Visible
+    mbUseNativeFocus                    = false;
+    mbNativeFocusVisible                = false;                     // true: native Focus Visible
+    mbInShowFocus                       = false;                     // prevent recursion
+    mbInHideFocus                       = false;                     // prevent recursion
+    mbTrackVisible                      = false;                     // true: Tracking Visible
+    mbControlForeground                 = false;                     // true: Foreground-Property set
+    mbControlBackground                 = false;                     // true: Background-Property set
+    mbAlwaysOnTop                       = false;                     // true: always visible for all others windows
+    mbCompoundControl                   = false;                     // true: Composite Control => Listener...
+    mbCompoundControlHasFocus           = false;                     // true: Composite Control has focus somewhere
+    mbPaintDisabled                     = false;                     // true: Paint should not be executed
+    mbAllResize                         = false;                     // true: Also sent ResizeEvents with 0,0
+    mbInDtor                            = false;                     // true: We're still in Window-Dtor
+    mbExtTextInput                      = false;                     // true: ExtTextInput-Mode is active
+    mbInFocusHdl                        = false;                     // true: Within GetFocus-Handler
+    mbCreatedWithToolkit                = false;
+    mbSuppressAccessibilityEvents       = false;                     // true: do not send any accessibility events
+    mbDrawSelectionBackground           = false;                     // true: draws transparent window background to indicate (toolbox) selection
+    mbIsInTaskPaneList                  = false;                     // true: window was added to the taskpanelist in the topmost system window
+    mnNativeBackground                  = 0;                         // initialize later, depends on type
+    mbCallHandlersDuringInputDisabled   = false;                     // true: call event handlers even if input is disabled
+    mbHelpTextDynamic                   = false;                     // true: append help id in HELP_DEBUG case
+    mbFakeFocusSet                      = false;                     // true: pretend as if the window has focus.
+    mbHexpand                           = false;
+    mbVexpand                           = false;
+    mbExpand                            = false;
+    mbFill                              = true;
+    mbSecondary                         = false;
+    mbNonHomogeneous                    = false;
 }
 
 WindowImpl::~WindowImpl()
commit 94261e6382951f9d71f4ca30ccae97fb034c0007
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat May 24 04:28:04 2014 +1000

    vcl: remove unnecessary headers from window.cxx
    
    Change-Id: I80d9d456dc9cf99bf9bfa05571d42774f43ce577

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 513eb6f..833a0a4 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -19,82 +19,51 @@
 
 #include <config_features.h>
 
-#include <i18nlangtag/mslangid.hxx>
-
-#include "tools/time.hxx"
-#include "tools/debug.hxx"
-#include "tools/rc.h"
-
-#include "unotools/fontcfg.hxx"
-#include "unotools/confignode.hxx"
-
-#include "vcl/layout.hxx"
-#include "vcl/salgtype.hxx"
-#include "vcl/event.hxx"
-#include "vcl/fixed.hxx"
-#include "vcl/help.hxx"
-#include "vcl/cursor.hxx"
-#include "vcl/svapp.hxx"
-#include "vcl/window.hxx"
-#include "vcl/syswin.hxx"
-#include "vcl/syschild.hxx"
-#include "vcl/dockwin.hxx"
-#include "vcl/menu.hxx"
-#include "vcl/wrkwin.hxx"
-#include "vcl/wall.hxx"
-#include "vcl/gradient.hxx"
-#include "vcl/button.hxx"
-#include "vcl/taskpanelist.hxx"
-#include "vcl/dialog.hxx"
-#include "vcl/unowrap.hxx"
-#include "vcl/gdimtf.hxx"
-#include "vcl/pdfextoutdevdata.hxx"
-#include "vcl/popupmenuwindow.hxx"
-#include "vcl/lazydelete.hxx"
-#include "vcl/virdev.hxx"
-#include "vcl/settings.hxx"
-
-// declare system types in sysdata.hxx
-#include "svsys.h"
-#include "vcl/sysdata.hxx"
-
-#include "salframe.hxx"
-#include "salobj.hxx"
-#include "salinst.hxx"
-#include "salgdi.hxx"
-#include "svdata.hxx"
-#include "dbggui.hxx"
-#include "outfont.hxx"
-#include "window.h"
-#include "toolbox.h"
-#include "outdev.h"
-#include "PhysicalFontCollection.hxx"
-#include "brdwin.hxx"
-#include "helpwin.hxx"
-#include "sallayout.hxx"
-#include "dndlcon.hxx"
-#include "dndevdis.hxx"
-
-#include "com/sun/star/accessibility/XAccessible.hpp"
-#include "com/sun/star/accessibility/AccessibleRole.hpp"
-#include "com/sun/star/awt/XWindowPeer.hpp"
-#include "com/sun/star/awt/XTopWindow.hpp"
-#include "com/sun/star/awt/XWindow.hpp"
-#include "com/sun/star/awt/XDisplayConnection.hpp"
-#include "com/sun/star/datatransfer/dnd/XDragSource.hpp"
-#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp"
-#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
-#include "com/sun/star/datatransfer/clipboard/SystemClipboard.hpp"
-#include "com/sun/star/lang/XInitialization.hpp"
-#include "com/sun/star/lang/XComponent.hpp"
-#include "com/sun/star/lang/XServiceName.hpp"
-#include "com/sun/star/rendering/CanvasFactory.hpp"
-#include "com/sun/star/rendering/XCanvas.hpp"
-#include "com/sun/star/rendering/XSpriteCanvas.hpp"
-#include "comphelper/processfactory.hxx"
-
-#include <sal/macros.h>
-#include <rtl/strbuf.hxx>
+#include <tools/rc.h>
+
+#include <sal/types.h>
+
+#include <vcl/salgtype.hxx>
+#include <vcl/event.hxx>
+#include <vcl/help.hxx>
+#include <vcl/cursor.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <vcl/syswin.hxx>
+#include <vcl/syschild.hxx>
+#include <vcl/dockwin.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/gradient.hxx>
+#include <vcl/button.hxx>
+#include <vcl/taskpanelist.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/unowrap.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/lazydelete.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/sysdata.hxx>
+
+#include <salframe.hxx>
+#include <salobj.hxx>
+#include <salinst.hxx>
+#include <salgdi.hxx>
+#include <svdata.hxx>
+#include <dbggui.hxx>
+#include <window.h>
+#include <toolbox.h>
+#include <outdev.h>
+#include <brdwin.hxx>
+#include <helpwin.hxx>
+#include <dndlcon.hxx>
+
+#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/XDisplayConnection.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
+#include <com/sun/star/rendering/CanvasFactory.hpp>
+#include <com/sun/star/rendering/XSpriteCanvas.hpp>
+#include <comphelper/processfactory.hxx>
 
 #include <set>
 #include <typeinfo>
commit 91c8afc0650884ac82cb5625dd0c9b5af45dd377
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat May 24 03:53:31 2014 +1000

    vcl: remove unnecessary headers in clipping.cxx
    
    Change-Id: I9b654b9ce51509bb84c7ac22c0e008e47adf1921

diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 51ea523..a7c2eba 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -17,96 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_features.h>
-
-#include <i18nlangtag/mslangid.hxx>
-
-#include "tools/time.hxx"
-#include "tools/debug.hxx"
-#include "tools/rc.h"
-
-#include "unotools/fontcfg.hxx"
-#include "unotools/confignode.hxx"
-
-#include "vcl/layout.hxx"
-#include "vcl/salgtype.hxx"
-#include "vcl/event.hxx"
-#include "vcl/fixed.hxx"
-#include "vcl/help.hxx"
-#include "vcl/cursor.hxx"
-#include "vcl/svapp.hxx"
-#include "vcl/window.hxx"
-#include "vcl/syswin.hxx"
-#include "vcl/syschild.hxx"
-#include "vcl/dockwin.hxx"
-#include "vcl/menu.hxx"
-#include "vcl/wrkwin.hxx"
-#include "vcl/wall.hxx"
-#include "vcl/gradient.hxx"
-#include "vcl/button.hxx"
-#include "vcl/taskpanelist.hxx"
-#include "vcl/dialog.hxx"
-#include "vcl/unowrap.hxx"
-#include "vcl/gdimtf.hxx"
-#include "vcl/pdfextoutdevdata.hxx"
-#include "vcl/popupmenuwindow.hxx"
-#include "vcl/lazydelete.hxx"
-#include "vcl/virdev.hxx"
-#include "vcl/settings.hxx"
-
-// declare system types in sysdata.hxx
-#include "svsys.h"
-#include "vcl/sysdata.hxx"
-
-#include "salframe.hxx"
-#include "salobj.hxx"
-#include "salinst.hxx"
-#include "salgdi.hxx"
-#include "svdata.hxx"
-#include "dbggui.hxx"
-#include "outfont.hxx"
-#include "window.h"
-#include "toolbox.h"
-#include "outdev.h"
-#include "PhysicalFontCollection.hxx"
-#include "brdwin.hxx"
-#include "helpwin.hxx"
-#include "sallayout.hxx"
-#include "dndlcon.hxx"
-#include "dndevdis.hxx"
-
-#include "com/sun/star/accessibility/XAccessible.hpp"
-#include "com/sun/star/accessibility/AccessibleRole.hpp"
-#include "com/sun/star/awt/XWindowPeer.hpp"
-#include "com/sun/star/awt/XTopWindow.hpp"
-#include "com/sun/star/awt/XWindow.hpp"
-#include "com/sun/star/awt/XDisplayConnection.hpp"
-#include "com/sun/star/datatransfer/dnd/XDragSource.hpp"
-#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp"
-#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
-#include "com/sun/star/datatransfer/clipboard/SystemClipboard.hpp"
-#include "com/sun/star/lang/XInitialization.hpp"
-#include "com/sun/star/lang/XComponent.hpp"
-#include "com/sun/star/lang/XServiceName.hpp"
-#include "com/sun/star/rendering/CanvasFactory.hpp"
-#include "com/sun/star/rendering/XCanvas.hpp"
-#include "com/sun/star/rendering/XSpriteCanvas.hpp"
-#include "comphelper/processfactory.hxx"
-
-#include <sal/macros.h>
-#include <rtl/strbuf.hxx>
-
-#include <set>
-#include <typeinfo>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::datatransfer::clipboard;
-using namespace ::com::sun::star::datatransfer::dnd;
-using namespace ::com::sun::star;
-using namespace com::sun;
-
-using ::com::sun::star::awt::XTopWindow;
+#include <vcl/window.hxx>
+
+#include <sal/types.h>
+
+#include <salobj.hxx>
+#include <window.h>
 
 void Window::InitClipRegion()
 {


More information about the Libreoffice-commits mailing list