sc/source/ui/view/gridwin4.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 3bfd42d57502c20da70e19a26fd4d14fe4e6daa6
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Apr 27 16:34:54 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Tue May 2 21:04:00 2023 +0200

    lok: sc: restore edit output area
    
    The edit view output area is modified after the draw,
    restore it so the mouse can handle selection at layout RTL.
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I94dd9db385a3a9c60f015027894338504b4ce533
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151146

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 88f8596aea30..ca08892ee21c 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -34,6 +34,7 @@
 
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <comphelper/lok.hxx>
+#include <comphelper/scopeguard.hxx>
 #include <sfx2/lokhelper.hxx>
 #include <sfx2/lokcomponenthelpers.hxx>
 
@@ -1190,6 +1191,11 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                             // Avoid sending wrong cursor/selection messages 
by the 'other' view, as the output-area is going
                             // to be tweaked temporarily to match the current 
view's zoom.
                             SuppressEditViewMessagesGuard 
aGuard(*pOtherEditView);
+                            comphelper::ScopeGuard aOutputGuard(
+                                [pOtherEditView, aOrigOutputArea, bLokRTL] {
+                                    if (bLokRTL && aOrigOutputArea != 
pOtherEditView->GetOutputArea())
+                                        
pOtherEditView->SetOutputArea(aOrigOutputArea);
+                                });
 
                             aEditRect = rDevice.PixelToLogic(aEditRect);
                             if (bIsTiledRendering)

Reply via email to