vcl/source/window/cursor.cxx |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 027cc41b7c48b60de18c7350b88b1845bd3d6012
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Jan 13 19:58:34 2022 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jan 17 10:06:28 2022 +0100

    RTL: lok: mirror cursor position when needed
    
    Change-Id: I3e574e1b1d5e26528794c39cb631d8f5cf60e927
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128390
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

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());
     }
 

Reply via email to