diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/dndevdis.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 65 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 3 |
6 files changed, 62 insertions, 31 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index c72a2940e317..4b0737291ca3 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -3265,8 +3265,11 @@ void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking ) // check if the control's parent is un-mirrored which is the case for form controls in a mirrored UI // where the document is unmirrored // because StartPopupMode() expects a rectangle in mirrored coordinates we have to re-mirror - if( GetParent()->GetParent()->ImplIsAntiparallel() ) - GetParent()->GetParent()->ImplReMirror( aRect ); + Window *pGrandparent = GetParent()->GetParent(); + const OutputDevice *pGrandparentOutDev = pGrandparent->GetOutDev(); + + if( pGrandparent->ImplIsAntiparallel() ) + pGrandparentOutDev->ImplReMirror( aRect ); StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN ); diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx index 74101c607447..e278e9554369 100644 --- a/vcl/source/window/dndevdis.cxx +++ b/vcl/source/window/dndevdis.cxx @@ -67,7 +67,10 @@ Window* DNDEventDispatcher::findTopLevelWindow(Point location) pChildWindow = pChildWindow->ImplGetClientWindow(); if( pChildWindow->ImplIsAntiparallel() ) - pChildWindow->ImplReMirror( location ); + { + const OutputDevice *pChildWinOutDev = pChildWindow->GetOutDev(); + pChildWinOutDev->ImplReMirror( location ); + } return pChildWindow; } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 8f614f31535c..e01d5f18c31e 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -454,12 +454,14 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin Point aAbsolute( rPos ); + const OutputDevice *pWindowOutDev = pReference->GetOutDev(); + // compare coordinates in absolute screen coordinates if( pReference->ImplHasMirroredGraphics() ) { if(!pReference->IsRTLEnabled() ) // --- RTL --- re-mirror back to get device coordiantes - pReference->ImplReMirror( aAbsolute ); + pWindowOutDev->ImplReMirror( aAbsolute ); Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ; aRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel( aRect ); @@ -684,6 +686,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) maFloatRect = rRect; Window *pReference = GetParent(); + const OutputDevice *pParentWinOutDev = pReference->GetOutDev(); // compare coordinates in absolute screen coordinates // Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509 @@ -691,7 +694,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) { if(!pReference->IsRTLEnabled() ) // --- RTL --- re-mirror back to get device coordiantes - pReference->ImplReMirror(maFloatRect); + pParentWinOutDev->ImplReMirror(maFloatRect); maFloatRect.SetPos(pReference->ScreenToOutputPixel(maFloatRect.TopLeft())); maFloatRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel(maFloatRect); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a836fc5ee789..0833331252a2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1452,7 +1452,8 @@ sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) if( ImplIsAntiparallel() ) { // - RTL - re-mirror frame pos at this window - ImplReMirror( aFramePos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aFramePos ); } Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); if ( !aRect.IsInside( aFramePos ) ) @@ -2463,8 +2464,9 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) // - RTL - re-mirror paint rect and region at this window if( ImplIsAntiparallel() ) { - ImplReMirror( aPaintRect ); - ImplReMirror( aPaintRegion ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aPaintRect ); + pOutDev->ImplReMirror( aPaintRegion ); } aPaintRect = ImplDevicePixelToLogic( aPaintRect); mpWindowImpl->mpPaintRegion = &aPaintRegion; @@ -2761,8 +2763,10 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) // --- RTL --- remirror region before intersecting it if ( ImplIsAntiparallel() ) { + const OutputDevice *pOutDev = GetOutDev(); + Region aRgn( *pRegion ); - ImplReMirror( aRgn ); + pOutDev->ImplReMirror( aRgn ); aRegion.Intersect( aRgn ); } else @@ -2985,7 +2989,8 @@ 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 - ImplReMirror( aRectMirror ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aRectMirror ); } // adapt paint areas @@ -3051,7 +3056,8 @@ void Window::ImplScroll( const Rectangle& rRect, if( bReMirror ) { // --- RTL --- frame coordinates require re-mirroring - ImplReMirror( aRegion ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aRegion ); } ImplSelectClipRegion( aRegion, pGraphics ); @@ -5970,7 +5976,10 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const aWinClipRegion = *pWinChildClipRegion; // --- RTL --- remirror clip region before passing it to somebody if( ImplIsAntiparallel() ) - ImplReMirror( aWinClipRegion ); + { + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aWinClipRegion ); + } } if ( nFlags & WINDOW_GETCLIPREGION_NULL ) @@ -6017,7 +6026,11 @@ void Window::ExpandPaintClipRegion( const Region& rRegion ) Region aWinChildRegion = *ImplGetWinChildClipRegion(); // --- RTL -- only this region is in frame coordinates, so re-mirror it if( ImplIsAntiparallel() ) - ImplReMirror( aWinChildRegion ); + { + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aWinChildRegion ); + } + aDevPixRegion.Intersect( aWinChildRegion ); if( ! aDevPixRegion.IsEmpty() ) { @@ -7038,6 +7051,8 @@ void Window::setPosSizePixel( long nX, long nY, sal_uInt16 nSysFlags=0; + Window *pParent = GetParent(); + if( nFlags & WINDOW_POSSIZE_WIDTH ) nSysFlags |= SAL_FRAME_POSSIZE_WIDTH; if( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -7045,16 +7060,16 @@ void Window::setPosSizePixel( long nX, long nY, if( nFlags & WINDOW_POSSIZE_X ) { nSysFlags |= SAL_FRAME_POSSIZE_X; - if( pWindow->GetParent() && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) + if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) { - Window* pParent = pWindow->GetParent(); nX += pParent->mnOutOffX; } - if( GetParent() && GetParent()->ImplIsAntiparallel() ) + if( pParent && pParent->ImplIsAntiparallel() ) { // --- RTL --- (re-mirror at parent window) Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) ); - GetParent()->ImplReMirror( aRect ); + const OutputDevice *pParentOutDev = pParent->GetOutDev(); + pParentOutDev->ImplReMirror( aRect ); nX = aRect.Left(); } } @@ -7062,7 +7077,7 @@ void Window::setPosSizePixel( long nX, long nY, { // --- RTL --- make sure the old right aligned position is not changed // system windows will always grow to the right - if( pWindow->GetParent() && pWindow->GetParent()->ImplHasMirroredGraphics() ) + if( pParent && pParent->ImplHasMirroredGraphics() ) { long myWidth = nOldWidth; if( !myWidth ) @@ -7071,10 +7086,10 @@ void Window::setPosSizePixel( long nX, long nY, myWidth = nWidth; nFlags |= WINDOW_POSSIZE_X; nSysFlags |= SAL_FRAME_POSSIZE_X; - nX = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - pWindow->GetParent()->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - + nX = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration; - nX = pWindow->GetParent()->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration + - pWindow->GetParent()->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth - myWidth - 1 - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX; + nX = pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration + + pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth - myWidth - 1 - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX; if(!(nFlags & WINDOW_POSSIZE_Y)) { nFlags |= WINDOW_POSSIZE_Y; @@ -7087,9 +7102,8 @@ void Window::setPosSizePixel( long nX, long nY, if( nFlags & WINDOW_POSSIZE_Y ) { nSysFlags |= SAL_FRAME_POSSIZE_Y; - if( pWindow->GetParent() && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) + if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) { - Window* pParent = pWindow->GetParent(); nY += pParent->mnOutOffY; } } @@ -7640,14 +7654,16 @@ void Window::SetPointerPosPixel( const Point& rPos ) if( !IsRTLEnabled() ) { // --- RTL --- (re-mirror mouse pos at this window) - ImplReMirror( aPos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aPos ); } // mirroring is required here, SetPointerPos bypasses SalGraphics mpGraphics->mirror( aPos.X(), this ); } else if( ImplIsAntiparallel() ) { - ImplReMirror( aPos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aPos ); } mpWindowImpl->mpFrame->SetPointerPos( aPos.X(), aPos.Y() ); } @@ -7661,7 +7677,8 @@ Point Window::GetPointerPosPixel() if( ImplIsAntiparallel() ) { // --- RTL --- (re-mirror mouse pos at this window) - ImplReMirror( aPos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aPos ); } return ImplFrameToOutput( aPos ); } @@ -7675,7 +7692,8 @@ Point Window::GetLastPointerPosPixel() if( ImplIsAntiparallel() ) { // --- RTL --- (re-mirror mouse pos at this window) - ImplReMirror( aPos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aPos ); } return ImplFrameToOutput( aPos ); } @@ -7710,7 +7728,8 @@ Window::PointerState Window::GetPointerState() if( ImplIsAntiparallel() ) { // --- RTL --- (re-mirror mouse pos at this window) - ImplReMirror( aSalPointerState.maPos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aSalPointerState.maPos ); } aState.maPos = ImplFrameToOutput( aSalPointerState.maPos ); aState.mnState = aSalPointerState.mnState; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 37aaa8261225..ecbd0d630cdd 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -611,7 +611,8 @@ IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer ) if( ImplIsAntiparallel() ) { // - RTL - re-mirror frame pos at pChild - ImplReMirror( aMousePos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aMousePos ); } MouseEvent aMEvt( ImplFrameToOutput( aMousePos ), mpWindowImpl->mpFrameData->mnClickCount, 0, @@ -681,7 +682,8 @@ void Window::EndTracking( sal_uInt16 nFlags ) if( ImplIsAntiparallel() ) { // - RTL - re-mirror frame pos at pChild - ImplReMirror( aMousePos ); + const OutputDevice *pOutDev = GetOutDev(); + pOutDev->ImplReMirror( aMousePos ); } MouseEvent aMEvt( ImplFrameToOutput( aMousePos ), diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index f494b5a342d6..7d6806177442 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -386,7 +386,8 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if( pChild->ImplIsAntiparallel() ) { // - RTL - re-mirror frame pos at pChild - pChild->ImplReMirror( aMousePos ); + const OutputDevice *pChildWinOutDev = pChild->GetOutDev(); + pChildWinOutDev->ImplReMirror( aMousePos ); } // no mouse messages to system object windows ? // !!!KA: Is it OK to comment this out? !!! |