diff options
Diffstat (limited to 'vcl/source/window/dndevdis.cxx')
-rw-r--r-- | vcl/source/window/dndevdis.cxx | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx index 1e779ac0eb19..21dd58b8719e 100644 --- a/vcl/source/window/dndevdis.cxx +++ b/vcl/source/window/dndevdis.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dndevdis.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: obr $ $Date: 2002-04-30 15:45:40 $ + * last change: $Author: hr $ $Date: 2003-03-27 17:58:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,10 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + + // because those coordinates come from outside, they must be mirrored if RTL layout is active + if( Application::GetSettings().GetLayoutRTL() ) + m_pTopWindow->ImplMirrorFramePos( location ); Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); if( NULL == pChildWindow ) @@ -113,6 +117,9 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) while( pChildWindow->ImplGetClientWindow() ) pChildWindow = pChildWindow->ImplGetClientWindow(); + if( pChildWindow->ImplHasMirroredGraphics() && !pChildWindow->IsRTLEnabled() ) + pChildWindow->ImplReMirror( location ); + aSolarGuard.clear(); // handle the case that drop is in an other vcl window than the last dragOver @@ -135,7 +142,6 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) if( nListeners == 0 ) { OSL_TRACE( "rejecting drop due to missing listeners." ); dtde.Context->rejectDrop(); - dtde.Context->dropComplete(sal_False); } // this is a drop -> no further drag overs @@ -155,6 +161,10 @@ void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtd // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + + // because those coordinates come from outside, they must be mirrored if RTL layout is active + if( Application::GetSettings().GetLayoutRTL() ) + m_pTopWindow->ImplMirrorFramePos( location ); Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); if( NULL == pChildWindow ) @@ -163,6 +173,9 @@ void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtd while( pChildWindow->ImplGetClientWindow() ) pChildWindow = pChildWindow->ImplGetClientWindow(); + if( pChildWindow->ImplHasMirroredGraphics() && !pChildWindow->IsRTLEnabled() ) + pChildWindow->ImplReMirror( location ); + aSolarGuard.clear(); // assume pointer write operation to be atomic @@ -211,6 +224,10 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + + // because those coordinates come from outside, they must be mirrored if RTL layout is active + if( Application::GetSettings().GetLayoutRTL() ) + m_pTopWindow->ImplMirrorFramePos( location ); Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); if( NULL == pChildWindow ) @@ -219,6 +236,9 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) while( pChildWindow->ImplGetClientWindow() ) pChildWindow = pChildWindow->ImplGetClientWindow(); + if( pChildWindow->ImplHasMirroredGraphics() && !pChildWindow->IsRTLEnabled() ) + pChildWindow->ImplReMirror( location ); + aSolarGuard.clear(); if( pChildWindow != m_pCurrentWindow ) @@ -262,6 +282,10 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + + // because those coordinates come from outside, they must be mirrored if RTL layout is active + if( Application::GetSettings().GetLayoutRTL() ) + m_pTopWindow->ImplMirrorFramePos( location ); Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); if( NULL == pChildWindow ) @@ -270,6 +294,9 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& while( pChildWindow->ImplGetClientWindow() ) pChildWindow = pChildWindow->ImplGetClientWindow(); + if( pChildWindow->ImplHasMirroredGraphics() && !pChildWindow->IsRTLEnabled() ) + pChildWindow->ImplReMirror( location ); + aSolarGuard.clear(); if( pChildWindow != m_pCurrentWindow ) @@ -313,6 +340,10 @@ void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent& // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + + // because those coordinates come from outside, they must be mirrored if RTL layout is active + if( Application::GetSettings().GetLayoutRTL() ) + m_pTopWindow->ImplMirrorFramePos( origin ); Window * pChildWindow = m_pTopWindow->ImplFindWindow( origin ); if( NULL == pChildWindow ) @@ -321,6 +352,9 @@ void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent& while( pChildWindow->ImplGetClientWindow() ) pChildWindow = pChildWindow->ImplGetClientWindow(); + if( pChildWindow->ImplHasMirroredGraphics() && !pChildWindow->IsRTLEnabled() ) + pChildWindow->ImplReMirror( origin ); + aSolarGuard.clear(); fireDragGestureEvent( pChildWindow, dge.DragSource, dge.Event, origin, dge.DragAction ); |