[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Jan 4 12:56:00 PST 2012


 sw/source/ui/docvw/PageBreakWin.cxx |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit a0fa723ed5761609d2c31061fdd0282a2f1df6e7
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Wed Jan 4 21:54:05 2012 +0100

    Page Break: fixed position of tab in RTL and added dirty hack for freezes

diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx
index aa1085c..b16e51f 100644
--- a/sw/source/ui/docvw/PageBreakWin.cxx
+++ b/sw/source/ui/docvw/PageBreakWin.cxx
@@ -142,8 +142,11 @@ namespace
             m_pWin->Fade( true );
         }
 
-        Point* pPtr = new Point( rMEvt.GetPosPixel() );
-        m_pWin->UpdatePosition( pPtr );
+        if ( !rMEvt.IsSynthetic() )
+        {
+            Point* pPtr = new Point( rMEvt.GetPosPixel() );
+            m_pWin->UpdatePosition( pPtr );
+        }
     }
 
     void SwBreakDashedLine::MouseButtonDown( const MouseEvent& rMEvt )
@@ -450,7 +453,14 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt )
     if ( m_pMousePt )
     {
         nBtnLeft = nLineLeft + m_pMousePt->X();
-        if ( ( nBtnLeft + aBtnSize.getWidth() ) > nLineRight )
+
+        if ( Application::GetSettings().GetLayoutRTL() )
+        {
+            nBtnLeft -= aBtnSize.getWidth();
+            if ( nBtnLeft < nLineLeft )
+                nBtnLeft = nLineLeft;
+        }
+        else if ( ( nBtnLeft + aBtnSize.getWidth() ) > nLineRight )
             nBtnLeft = nLineRight - aBtnSize.getWidth();
     }
 


More information about the Libreoffice-commits mailing list