diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-02-07 22:10:11 +1100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-07 16:57:53 +0000 |
commit | 455d970206b4d5dda8120bdc1958885c2607e354 (patch) | |
tree | 320a9811a40f2e5193f9a084ca5c1b1962bd53a7 /vcl/source/window | |
parent | 738bd2cfd446debbc0e08fb5500004276fa28c7d (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/decoview.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dndevdis.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 40 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 |
8 files changed, 33 insertions, 33 deletions
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 1c5c42dde8bd..056296b187e2 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 e278e9554369..6fe92e26fb3c 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 4980edbf282a..f33886f327fa 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 60f8d162c5a5..e836e62d3aec 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 3e49da75f37e..f2a92727dba5 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 3b50e1ec9037..5163cc25dfdc 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 e407bcf40acf..edd48dbbf367 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 5ab7b975561c..2d299cd3faa1 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 |