Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3912

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/12/3912/1

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
---
M sc/source/ui/drawfunc/fuconstr.cxx
1 file changed, 7 insertions(+), 0 deletions(-)



diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index 5d8f270..381aeb4 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -83,6 +83,7 @@
         // 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 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;
 }

-- 
To view, visit https://gerrit.libreoffice.org/3912
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cc8eabf474918968bea026dba9c5add2bb4f28e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Faisal al-otaibi <fmalotaibi@kacst.edu.sa>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.