summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-01-13 19:58:34 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-01-17 10:06:28 +0100
commit027cc41b7c48b60de18c7350b88b1845bd3d6012 (patch)
tree4286e78ce6cb520ada0430fdcff5851af44a1e94
parentRTL: lok: render tunneled dialogs mirrored (diff)
downloadcore-027cc41b7c48b60de18c7350b88b1845bd3d6012.tar.gz
core-027cc41b7c48b60de18c7350b88b1845bd3d6012.zip
RTL: lok: mirror cursor position when needed
Change-Id: I3e574e1b1d5e26528794c39cb631d8f5cf60e927 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128390 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--vcl/source/window/cursor.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 18773be22698..54a3152f4ea9 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -257,7 +257,19 @@ void vcl::Cursor::LOKNotify( vcl::Window* pWindow, const OUString& rAction )
if (!aSize.Width())
aSize.setWidth( pWindow->GetSettings().GetStyleSettings().GetCursorSize() );
- const tools::Rectangle aRect(Point(nX, nY), aSize);
+ Point aPos(nX, nY);
+
+ if (pWindow->IsRTLEnabled() && !pWindow->ImplIsAntiparallel() && pParent->GetOutDev())
+ pParent->GetOutDev()->ReMirror(aPos);
+
+ if (!pWindow->IsRTLEnabled() && pWindow->ImplIsAntiparallel()
+ && pWindow->GetOutDev() && pParent->GetOutDev())
+ {
+ pWindow->GetOutDev()->ReMirror(aPos);
+ pParent->GetOutDev()->ReMirror(aPos);
+ }
+
+ const tools::Rectangle aRect(aPos, aSize);
aItems.emplace_back("rectangle", aRect.toString());
}