summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-12-06 13:55:43 +0530
committerAndras Timar <andras.timar@collabora.com>2022-01-11 11:18:09 +0100
commitbb37b46182bcff2f10edcc590cedbc4bb5820c4b (patch)
treea84db5288d80b4a52927d13995c89c1987d218f8
parentlokCalcRTL: shapes: do not send negative(X) invalidations (diff)
downloadcore-bb37b46182bcff2f10edcc590cedbc4bb5820c4b.tar.gz
core-bb37b46182bcff2f10edcc590cedbc4bb5820c4b.zip
lokCalcRTL: shapes: negate mouse-event x coordinate
Change-Id: I153334940b41859e6fd9dee64217925627f0f292
-rw-r--r--svx/source/svdraw/svdview.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 0018233533f2..2a1a27f70ee3 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -264,6 +264,14 @@ SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEve
}
Point aPnt(rMEvt.GetPosPixel());
if (pOut!=nullptr) aPnt=pOut->PixelToLogic(aPnt);
+
+ if (mbNegativeX)
+ {
+ // Shape's x coordinates are all negated,
+ // Hence negate mouse event's x coord to match.
+ aPnt.setX(-aPnt.X());
+ }
+
rVEvt.aLogicPos=aPnt;
return PickAnything(aPnt,rVEvt);
}