diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2021-11-25 17:38:14 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-01-11 11:18:08 +0100 |
commit | d423a86b3e063da02cfdb302eaa996ca54eed9d0 (patch) | |
tree | 3889dd22177eb4d7f12ccd1f93ea3b8351a73922 /sc | |
parent | 316b7f90cb06b41e186a1a5a868e49693ba010cc (diff) |
lokCalcRTL: shape selection: negate mouse X...
as in LOK RTL mode draw objects have negated document X coordinate.
Change-Id: Ie4c00fc0d1aa458a0aa6dd502be227cd6f82be3e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/drawfunc/fusel.cxx | 12 |
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() ) |