summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-25 17:38:14 +0530
committerDennis Francis <dennis.francis@collabora.com>2022-02-02 10:13:00 +0100
commitcc827250ed249202afd97a84db13575648ed9b49 (patch)
treec1999c53b167c2f0656fc5d10679e996519f5bca /sc/source/ui
parenta1e4dad6b98a2a5d4b4ef5db479d6f520331f1d1 (diff)
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 <dennis.francis@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx12
1 files changed, 12 insertions, 0 deletions
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 <sfx2/app.hxx>
#include <sfx2/ipclient.hxx>
#include <sfx2/viewfrm.hxx>
+#include <comphelper/lok.hxx>
#include <fusel.hxx>
#include <sc.hrc>
@@ -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() )