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

Chris Sherlock chris.sherlock79 at gmail.com
Fri Feb 7 08:58:24 PST 2014


 include/vcl/outdev.hxx         |    8 ++++----
 vcl/source/control/ilstbox.cxx |    2 +-
 vcl/source/gdi/outdev.cxx      |   12 ++++++------
 vcl/source/gdi/outdev3.cxx     |    4 ++--
 vcl/source/window/decoview.cxx |    2 +-
 vcl/source/window/dndevdis.cxx |    2 +-
 vcl/source/window/dockmgr.cxx  |    4 ++--
 vcl/source/window/floatwin.cxx |    8 ++++----
 vcl/source/window/status.cxx   |    2 +-
 vcl/source/window/window.cxx   |   40 ++++++++++++++++++++--------------------
 vcl/source/window/window2.cxx  |    4 ++--
 vcl/source/window/winproc.cxx  |    4 ++--
 12 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 455d970206b4d5dda8120bdc1958885c2607e354
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Fri Feb 7 22:10:11 2014 +1100

    Renamed VCL's OutputDevice mirroring functions
    
    I have renamed the following functions:
    
    * ImplReMirror            -> ReMirror
    * ImplHasMirroredGraphics -> HasMirroredGraphics
    
    This has been done because these functions are definitely public
    and there is no need to prefix them with "Impl" as they are exposed
    to other objects.
    
    Change-Id: Ib52493c9824e29a038de2fc35736a5ca863c091a
    Reviewed-on: https://gerrit.libreoffice.org/7911
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index f492621..7458475 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -755,10 +755,10 @@ public:
      */
     ///@{
     SAL_DLLPRIVATE sal_Bool     ImplIsRecordLayout() const;
-    SAL_DLLPRIVATE bool         ImplHasMirroredGraphics() const;
-    SAL_DLLPRIVATE void         ImplReMirror( Point &rPoint ) const;
-    SAL_DLLPRIVATE void         ImplReMirror( Rectangle &rRect ) const;
-    SAL_DLLPRIVATE void         ImplReMirror( Region &rRegion ) const;
+    SAL_DLLPRIVATE bool         HasMirroredGraphics() const;
+    SAL_DLLPRIVATE void         ReMirror( Point &rPoint ) const;
+    SAL_DLLPRIVATE void         ReMirror( Rectangle &rRect ) const;
+    SAL_DLLPRIVATE void         ReMirror( Region &rRegion ) const;
     SAL_DLLPRIVATE SalLayout*   ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
                                             const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
                                             const sal_Int32* pLogicDXArray=NULL, bool bFilter = false ) const;
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 4b07372..a3b6912 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -3269,7 +3269,7 @@ void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking )
         const OutputDevice *pGrandparentOutDev = pGrandparent->GetOutDev();
 
         if( pGrandparent->ImplIsAntiparallel() )
-            pGrandparentOutDev->ImplReMirror( aRect );
+            pGrandparentOutDev->ReMirror( aRect );
 
         StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN );
 
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 8174379..026b4b9 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -496,7 +496,7 @@ void OutputDevice::EnableRTL( sal_Bool bEnable )
         mpAlphaVDev->EnableRTL( bEnable );
 }
 
-bool OutputDevice::ImplHasMirroredGraphics() const
+bool OutputDevice::HasMirroredGraphics() const
 {
    // HOTFIX for #i55719#
    if( meOutDevType == OUTDEV_PRINTER )
@@ -507,11 +507,11 @@ bool OutputDevice::ImplHasMirroredGraphics() const
 
 // note: the coordiantes to be remirrored are in frame coordiantes !
 
-void    OutputDevice::ImplReMirror( Point &rPoint ) const
+void    OutputDevice::ReMirror( Point &rPoint ) const
 {
     rPoint.X() = mnOutOffX + mnOutWidth - 1 - rPoint.X() + mnOutOffX;
 }
-void    OutputDevice::ImplReMirror( Rectangle &rRect ) const
+void    OutputDevice::ReMirror( Rectangle &rRect ) const
 {
     long nWidth = rRect.Right() - rRect.Left();
 
@@ -522,7 +522,7 @@ void    OutputDevice::ImplReMirror( Rectangle &rRect ) const
     rRect.Left() = mnOutOffX + mnOutWidth - nWidth - 1 - rRect.Left() + mnOutOffX;
     rRect.Right() = rRect.Left() + nWidth;
 }
-void    OutputDevice::ImplReMirror( Region &rRegion ) const
+void    OutputDevice::ReMirror( Region &rRegion ) const
 {
     RectangleVector aRectangles;
     rRegion.GetRegionRectangles(aRectangles);
@@ -530,7 +530,7 @@ void    OutputDevice::ImplReMirror( Region &rRegion ) const
 
     for(RectangleVector::iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
     {
-        ImplReMirror(*aRectIter);
+        ReMirror(*aRectIter);
         aMirroredRegion.Union(*aRectIter);
     }
 
@@ -938,7 +938,7 @@ void OutputDevice::ImplInitClipRegion()
             // --- RTL -- only this region is in frame coordinates, so re-mirror it
             // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) !
             if( ImplIsAntiparallel() )
-                ImplReMirror ( aRegion );
+                ReMirror ( aRegion );
         }
         if ( mbClipRegion )
             aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index c347f71..810241c 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4135,7 +4135,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
 void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
 {
     long nBaseX = nX;
-    if( /*ImplHasMirroredGraphics() &&*/ IsRTLEnabled() )
+    if( /*HasMirroredGraphics() &&*/ IsRTLEnabled() )
     {
         // --- RTL ---
         // add some strange offset
@@ -4505,7 +4505,7 @@ void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, sal_Bool bTextLine
             return;
 
     long nOldX = rSalLayout.DrawBase().X();
-    if( ImplHasMirroredGraphics() )
+    if( HasMirroredGraphics() )
     {
         long w = meOutDevType == OUTDEV_VIRDEV ? mnOutWidth : mpGraphics->GetGraphicsWidth();
         long x = rSalLayout.DrawBase().X();
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 1c5c42d..056296b 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -328,7 +328,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
                 nRect.Top() -= n3/2;
                 nRect.Bottom() -= n3/2;
                 // #106953# never mirror checkmarks
-                if ( pDev->ImplHasMirroredGraphics() && pDev->IsRTLEnabled() )
+                if ( pDev->HasMirroredGraphics() && pDev->IsRTLEnabled() )
                 {
                     // Draw a mirrored checkmark so that it looks "normal" in a
                     // mirrored graphics device (double mirroring!)
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index e278e95..6fe92e2 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -69,7 +69,7 @@ Window* DNDEventDispatcher::findTopLevelWindow(Point location)
     if( pChildWindow->ImplIsAntiparallel() )
     {
         const OutputDevice *pChildWinOutDev = pChildWindow->GetOutDev();
-        pChildWinOutDev->ImplReMirror( location );
+        pChildWinOutDev->ReMirror( location );
     }
 
     return pChildWindow;
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 4980edb..f33886f 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -803,7 +803,7 @@ void ImplPopupFloatWin::MouseButtonDown( const MouseEvent& rMEvt )
         // get mouse pos at a static window to have a fixed reference point
         PointerState aState = GetParent()->GetPointerState();
         const OutputDevice *pOutDev = GetOutDev();
-        if (pOutDev->ImplHasMirroredGraphics() && IsRTLEnabled())
+        if (pOutDev->HasMirroredGraphics() && IsRTLEnabled())
             ImplMirrorFramePos(aState.maPos);
         maTearOffPosition = GetWindow( WINDOW_BORDER )->GetPosPixel();
         maDelta = aState.maPos - maTearOffPosition;
@@ -829,7 +829,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
             // move the window according to mouse pos
             PointerState aState = GetParent()->GetPointerState();
             const OutputDevice *pOutDev = GetOutDev();
-            if (pOutDev->ImplHasMirroredGraphics() && IsRTLEnabled())
+            if (pOutDev->HasMirroredGraphics() && IsRTLEnabled())
                 ImplMirrorFramePos(aState.maPos);
             maTearOffPosition = aState.maPos - maDelta;
             GetWindow( WINDOW_BORDER )->SetPosPixel( maTearOffPosition );
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 60f8d16..e836e62 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -457,11 +457,11 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
     const OutputDevice *pWindowOutDev = pReference->GetOutDev();
 
     // compare coordinates in absolute screen coordinates
-    if( pWindowOutDev->ImplHasMirroredGraphics()  )
+    if( pWindowOutDev->HasMirroredGraphics()  )
     {
         if(!pReference->IsRTLEnabled() )
             // --- RTL --- re-mirror back to get device coordiantes
-            pWindowOutDev->ImplReMirror( aAbsolute );
+            pWindowOutDev->ReMirror( aAbsolute );
 
         Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ;
         aRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel( aRect );
@@ -690,11 +690,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
 
     // compare coordinates in absolute screen coordinates
     // Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509
-    if( pParentWinOutDev->ImplHasMirroredGraphics()  )
+    if( pParentWinOutDev->HasMirroredGraphics()  )
     {
         if(!pReference->IsRTLEnabled() )
             // --- RTL --- re-mirror back to get device coordiantes
-            pParentWinOutDev->ImplReMirror(maFloatRect);
+            pParentWinOutDev->ReMirror(maFloatRect);
 
         maFloatRect.SetPos(pReference->ScreenToOutputPixel(maFloatRect.TopLeft()));
         maFloatRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel(maFloatRect);
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 3e49da7..f2a9272 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -284,7 +284,7 @@ void StatusBar::ImplFormat()
         nX = STATUSBAR_OFFSET_X;
 
         const OutputDevice *pOutDev = GetOutDev();
-        if( pOutDev->ImplHasMirroredGraphics() && IsRTLEnabled() )
+        if( pOutDev->HasMirroredGraphics() && IsRTLEnabled() )
             nX += ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset;
     }
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 3b50e1e..5163cc2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1461,7 +1461,7 @@ sal_uInt16 Window::ImplHitTest( const Point& rFramePos )
     {
         // - RTL - re-mirror frame pos at this window
         const OutputDevice *pOutDev = GetOutDev();
-        pOutDev->ImplReMirror( aFramePos );
+        pOutDev->ReMirror( aFramePos );
     }
     Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
     if ( !aRect.IsInside( aFramePos ) )
@@ -2473,8 +2473,8 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
             if( ImplIsAntiparallel() )
             {
                 const OutputDevice *pOutDev = GetOutDev();
-                pOutDev->ImplReMirror( aPaintRect );
-                pOutDev->ImplReMirror( aPaintRegion );
+                pOutDev->ReMirror( aPaintRect );
+                pOutDev->ReMirror( aPaintRegion );
             }
             aPaintRect = ImplDevicePixelToLogic( aPaintRect);
             mpWindowImpl->mpPaintRegion = &aPaintRegion;
@@ -2774,7 +2774,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags )
                 const OutputDevice *pOutDev = GetOutDev();
 
                 Region aRgn( *pRegion );
-                pOutDev->ImplReMirror( aRgn );
+                pOutDev->ReMirror( aRgn );
                 aRegion.Intersect( aRgn );
             }
             else
@@ -2999,7 +2999,7 @@ void Window::ImplScroll( const Rectangle& rRect,
     {
         // --- RTL --- make sure the invalidate region of this window is
         // computed in the same coordinate space as the one from the overlap windows
-        pOutDev->ImplReMirror( aRectMirror );
+        pOutDev->ReMirror( aRectMirror );
     }
 
     // adapt paint areas
@@ -3065,7 +3065,7 @@ void Window::ImplScroll( const Rectangle& rRect,
             if( bReMirror )
             {
                 // --- RTL --- frame coordinates require re-mirroring
-                pOutDev->ImplReMirror( aRegion );
+                pOutDev->ReMirror( aRegion );
             }
 
             pOutDev->ImplSelectClipRegion( aRegion, pGraphics );
@@ -3339,7 +3339,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
         // --- RTL ---  (compare the screen coordinates)
         Point aPtDev( Point( nX+mnOutOffX, 0 ) );
         OutputDevice *pOutDev = GetOutDev();
-        if( pOutDev->ImplHasMirroredGraphics() )
+        if( pOutDev->HasMirroredGraphics() )
         {
             mpGraphics->mirror( aPtDev.X(), this );
 
@@ -5992,7 +5992,7 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const
         if( ImplIsAntiparallel() )
         {
             const OutputDevice *pOutDev = GetOutDev();
-            pOutDev->ImplReMirror( aWinClipRegion );
+            pOutDev->ReMirror( aWinClipRegion );
         }
     }
 
@@ -6042,7 +6042,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion )
         if( ImplIsAntiparallel() )
         {
             const OutputDevice *pOutDev = GetOutDev();
-            pOutDev->ImplReMirror( aWinChildRegion );
+            pOutDev->ReMirror( aWinChildRegion );
         }
 
         aDevPixRegion.Intersect( aWinChildRegion );
@@ -7083,7 +7083,7 @@ void Window::setPosSizePixel( long nX, long nY,
                 // --- RTL --- (re-mirror at parent window)
                 Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
                 const OutputDevice *pParentOutDev = pParent->GetOutDev();
-                pParentOutDev->ImplReMirror( aRect );
+                pParentOutDev->ReMirror( aRect );
                 nX = aRect.Left();
             }
         }
@@ -7094,7 +7094,7 @@ void Window::setPosSizePixel( long nX, long nY,
             if ( pParent )
             {
                 OutputDevice *pParentOutDev = pParent->GetOutDev();
-                if( pParentOutDev->ImplHasMirroredGraphics() )
+                if( pParentOutDev->HasMirroredGraphics() )
                 {
                     long myWidth = nOldWidth;
                     if( !myWidth )
@@ -7203,7 +7203,7 @@ long Window::ImplGetUnmirroredOutOffX()
     // revert mnOutOffX changes that were potentially made in ImplPosSizeWindow
     long offx = mnOutOffX;
     OutputDevice *pOutDev = GetOutDev();
-    if( pOutDev->ImplHasMirroredGraphics() )
+    if( pOutDev->HasMirroredGraphics() )
     {
         if( mpWindowImpl->mpParent && !mpWindowImpl->mpParent->mpWindowImpl->mbFrame && mpWindowImpl->mpParent->ImplIsAntiparallel() )
         {
@@ -7671,19 +7671,19 @@ void Window::SetPointerPosPixel( const Point& rPos )
 {
     Point aPos = ImplOutputToFrame( rPos );
     const OutputDevice *pOutDev = GetOutDev();
-    if( pOutDev->ImplHasMirroredGraphics() )
+    if( pOutDev->HasMirroredGraphics() )
     {
         if( !IsRTLEnabled() )
         {
             // --- RTL --- (re-mirror mouse pos at this window)
-            pOutDev->ImplReMirror( aPos );
+            pOutDev->ReMirror( aPos );
         }
         // mirroring is required here, SetPointerPos bypasses SalGraphics
         mpGraphics->mirror( aPos.X(), this );
     }
     else if( ImplIsAntiparallel() )
     {
-        pOutDev->ImplReMirror( aPos );
+        pOutDev->ReMirror( aPos );
     }
     mpWindowImpl->mpFrame->SetPointerPos( aPos.X(), aPos.Y() );
 }
@@ -7698,7 +7698,7 @@ Point Window::GetPointerPosPixel()
     {
         // --- RTL --- (re-mirror mouse pos at this window)
         const OutputDevice *pOutDev = GetOutDev();
-        pOutDev->ImplReMirror( aPos );
+        pOutDev->ReMirror( aPos );
     }
     return ImplFrameToOutput( aPos );
 }
@@ -7713,7 +7713,7 @@ Point Window::GetLastPointerPosPixel()
     {
         // --- RTL --- (re-mirror mouse pos at this window)
         const OutputDevice *pOutDev = GetOutDev();
-        pOutDev->ImplReMirror( aPos );
+        pOutDev->ReMirror( aPos );
     }
     return ImplFrameToOutput( aPos );
 }
@@ -7749,7 +7749,7 @@ Window::PointerState Window::GetPointerState()
         {
             // --- RTL --- (re-mirror mouse pos at this window)
             const OutputDevice *pOutDev = GetOutDev();
-            pOutDev->ImplReMirror( aSalPointerState.maPos );
+            pOutDev->ReMirror( aSalPointerState.maPos );
         }
         aState.maPos = ImplFrameToOutput( aSalPointerState.maPos );
         aState.mnState = aSalPointerState.mnState;
@@ -9609,7 +9609,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
         {
             long nDeltaX = pChild->mnOutOffX - mnOutOffX;
 
-            if( pOutDev->ImplHasMirroredGraphics() )
+            if( pOutDev->HasMirroredGraphics() )
                 nDeltaX = mnOutWidth - nDeltaX - pChild->mnOutWidth;
             long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel();
             Point aPos( i_rPos );
@@ -9633,7 +9633,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
 {
     // FIXME: scaling: currently this is for pixel copying only
 
-    DBG_ASSERT( ! pDev->ImplHasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
+    DBG_ASSERT( ! pDev->HasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
     DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
 
     Window* pRealParent = NULL;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index e407bcf..edd48db 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -622,7 +622,7 @@ IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer )
     {
         // - RTL - re-mirror frame pos at pChild
         const OutputDevice *pOutDev = GetOutDev();
-        pOutDev->ImplReMirror( aMousePos );
+        pOutDev->ReMirror( aMousePos );
     }
     MouseEvent      aMEvt( ImplFrameToOutput( aMousePos ),
                            mpWindowImpl->mpFrameData->mnClickCount, 0,
@@ -693,7 +693,7 @@ void Window::EndTracking( sal_uInt16 nFlags )
             {
                 // - RTL - re-mirror frame pos at pChild
                 const OutputDevice *pOutDev = GetOutDev();
-                pOutDev->ImplReMirror( aMousePos );
+                pOutDev->ReMirror( aMousePos );
             }
 
             MouseEvent      aMEvt( ImplFrameToOutput( aMousePos ),
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 5ab7b97..2d299cd 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -387,7 +387,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
         {
             // - RTL - re-mirror frame pos at pChild
             const OutputDevice *pChildWinOutDev = pChild->GetOutDev();
-            pChildWinOutDev->ImplReMirror( aMousePos );
+            pChildWinOutDev->ReMirror( aMousePos );
         }
         // no mouse messages to system object windows ?
         // !!!KA: Is it OK to comment this out? !!!
@@ -1027,7 +1027,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
     // --- RTL --- mirror cursor keys
     const OutputDevice *pChildOutDev = pChild->GetOutDev();
     if( (aKeyCode.GetCode() == KEY_LEFT || aKeyCode.GetCode() == KEY_RIGHT) &&
-      pChildOutDev->ImplHasMirroredGraphics() && pChild->IsRTLEnabled() )
+      pChildOutDev->HasMirroredGraphics() && pChild->IsRTLEnabled() )
         aKeyCode = KeyCode( aKeyCode.GetCode() == KEY_LEFT ? KEY_RIGHT : KEY_LEFT, aKeyCode.GetModifier() );
 
     // call handler


More information about the Libreoffice-commits mailing list