[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 2 commits - sc/source

Faisal M. Al-Otaibi fmalotaibi at kacst.edu.sa
Tue May 21 16:02:56 PDT 2013


 sc/source/ui/drawfunc/fuconstr.cxx |    7 +++++++
 sc/source/ui/view/drawview.cxx     |    3 +++
 2 files changed, 10 insertions(+)

New commits:
commit 8adeb170d695ff61af81f31ad5392e5543a12d39
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Wed May 15 08:51:26 2013 +0300

    fdo#64011 fix the position and the drawing from left to right in RTL sheet
    
    this will fix the start position for drawing and you can draw shapes
    from left to right when the Sheet are RTL
    
    Change-Id: I5cc8eabf474918968bea026dba9c5add2bb4f28e
    Reviewed-on: https://gerrit.libreoffice.org/3912
    Reviewed-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    Tested-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    (cherry picked from commit 3661c3eb0124d6f4799fe7c4393d4576e1613bfb)

diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index c566dfb..0eed428 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -83,6 +83,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
         // involved. Lets calculate where aPos would be at 100% zoom
         // that's the actual correct position for the object ( when you
         // restore the zoom.
+        sal_Bool bNegative = pDoc->IsNegativePage(pView->GetTab());
         Rectangle aObjRect( rInOutPos, rInOutPos );
         ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect );
         ScAddress aOldStt = aRange.aStart;
@@ -98,6 +99,12 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
         Point aOff = ( rInOutPos - aCurPosHmm );
         rInOutPos = aOldPos + aOff;
         aRetGridOff = aCurPosHmm - aOldPos;
+        // fdo#64011 fix the X position when the sheet are RTL
+        if ( bNegative )
+        {
+            aRetGridOff.setX( aCurPosHmm.getX() + aOldPos.getX() );
+            rInOutPos.setX( aOff.getX() - aOldPos.getX() );
+        }
     }
     return aRetGridOff;
 }
commit 6aae162ce83f61b11aab3fcd74a8274657bb474f
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Sat May 18 08:33:11 2013 +0300

    fdo#63878 fix the zoom bug on RTL sheet
    
    fix the X position after check if the sheet are RTL
    
    Change-Id: Icbb9ce44508698e0f03898b202e033c07ae2de70
    Reviewed-on: https://gerrit.libreoffice.org/3954
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>
    (cherry picked from commit a53efad8dea0b0d78a5ff2b84aa2f09a4c178fd6)

diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 6900932..dc9978e 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -791,6 +791,9 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
         Point aCurPos =  pViewData->GetScrPos(  aOldStt.Col(), aOldStt.Row(), eWhich, sal_True );
         Point aCurPosHmm = pGridWin->PixelToLogic(aCurPos, aDrawMode );
         Point aGridOff = ( aCurPosHmm - aOldPos );
+        // fdo#63878 Fix the X position for RTL Sheet
+        if( pDoc->IsNegativePage( GetTab() ) )
+            aGridOff.setX( aCurPosHmm.getX() + aOldPos.getX() );
         pObj->SetGridOffset( aGridOff );
     }
 }


More information about the Libreoffice-commits mailing list