From cc827250ed249202afd97a84db13575648ed9b49 Mon Sep 17 00:00:00 2001 From: Dennis Francis Date: Thu, 25 Nov 2021 17:38:14 +0530 Subject: lokCalcRTL: shape selection: negate mouse X... as in LOK RTL mode draw objects have negated document X coordinate. Change-Id: Ie4c00fc0d1aa458a0aa6dd502be227cd6f82be3e (cherry picked from commit d423a86b3e063da02cfdb302eaa996ca54eed9d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129191 Tested-by: Jenkins Reviewed-by: Dennis Francis --- sc/source/ui/drawfunc/fusel.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sc/source/ui') diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 18ba12b792b9..46b7fc47d040 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -85,6 +86,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else aMDPos = pWindow->PixelToLogic(rMEvt.GetPosPixel()); + if (comphelper::LibreOfficeKit::isActive()) + { + ScViewData& rViewData = rViewShell.GetViewData(); + ScDocument& rDocument = rViewData.GetDocument(); + if (rDocument.IsNegativePage(rViewData.GetTabNo())) + aMDPos.setX(-aMDPos.X()); + } + if ( rMEvt.IsLeft() ) { SdrHdl* pHdl = pView->PickHandle(aMDPos); @@ -351,6 +360,9 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) ::std::vector< OUString > aExcludedChartNames; ScRangeListVector aProtectedChartRangesVector; + if (comphelper::LibreOfficeKit::isActive() && rDocument.IsNegativePage(rViewData.GetTabNo())) + aPnt.setX(-aPnt.X()); + if (pView && rMEvt.IsLeft()) { if ( pView->IsDragObj() ) -- cgit