summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-30 16:06:51 +0530
committerDennis Francis <dennis.francis@collabora.com>2022-02-02 13:48:22 +0100
commit26a22407124314479c99b44559ffbbce8c261fa5 (patch)
tree0a4839711af37b34c0db2647aaad3baa935786ba /sc/source/ui/drawfunc
parentbff5d1a68a8b6f5776c5edb4ef0f919af1194d03 (diff)
lokCalcRTL: negate the +ve shape handle X coordinate...
...from lok client as all shape X coordinates are negative in lok-RTL mode. Conflicts: sc/source/ui/drawfunc/drawsh.cxx Change-Id: Ic4ba064888901109c85760bb0afda609b5d5942c (cherry picked from commit 3df583520ee03bad42df09db7dde4c0c683a228b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129193 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index f35f20caf84a..348fb56d53d6 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -59,6 +59,7 @@
#include <svx/xflclit.hxx>
#include <svx/xflgrit.hxx>
#include <tools/UnitConversion.hxx>
+#include <comphelper/lok.hxx>
#include <vcl/unohelp2.hxx>
using namespace css;
@@ -219,7 +220,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
const sal_uLong handleNum = handleNumItem->GetValue();
const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
- pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY), OrdNum ? OrdNum->GetValue() : -1);
+
+ bool bNegateX = comphelper::LibreOfficeKit::isActive() && rViewData.GetDocument().IsLayoutRTL(rViewData.GetTabNo());
+ pView->MoveShapeHandle(handleNum, Point(bNegateX ? -static_cast<tools::Long>(newPosX) : newPosX, newPosY), OrdNum ? OrdNum->GetValue() : -1);
}
}
break;