summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-25 17:38:14 +0530
committerAndras Timar <andras.timar@collabora.com>2022-01-11 11:18:08 +0100
commitd423a86b3e063da02cfdb302eaa996ca54eed9d0 (patch)
tree3889dd22177eb4d7f12ccd1f93ea3b8351a73922
parentlokCalcRTL: ensure +ve X coords in shape handles/selections msgs (diff)
downloadcore-d423a86b3e063da02cfdb302eaa996ca54eed9d0.tar.gz
core-d423a86b3e063da02cfdb302eaa996ca54eed9d0.zip
lokCalcRTL: shape selection: negate mouse X...
as in LOK RTL mode draw objects have negated document X coordinate. Change-Id: Ie4c00fc0d1aa458a0aa6dd502be227cd6f82be3e
-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 164332f060d6..20d785a7221a 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -31,6 +31,7 @@
#include <sfx2/app.hxx>
#include <sfx2/ipclient.hxx>
#include <sfx2/viewfrm.hxx>
+#include <comphelper/lok.hxx>
#include <fusel.hxx>
#include <sc.hrc>
@@ -84,6 +85,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);
@@ -350,6 +359,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() )