[PATCH] fdo#64011 fix the position and the drawing from left to righ...
Faisal al-otaibi (via Code Review)
gerrit at gerrit.libreoffice.org
Tue May 14 22:56:34 PDT 2013
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 at kacst.edu.sa>
More information about the LibreOffice
mailing list