diff options
author | Henry Castro <hcastro@collabora.com> | 2023-04-27 16:34:54 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-06-20 15:58:42 +0200 |
commit | e7f486f10fd21bee78dea0d2eda241dd094d783d (patch) | |
tree | b3d149775137b5b335ae80b1be4d4572497c5855 /sc | |
parent | 72e70088dc45fbe15f809abf5263247b13d937ac (diff) |
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 <hcastro@collabora.com>
Change-Id: I94dd9db385a3a9c60f015027894338504b4ce533
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151146
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151972
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153325
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 787d989f3b47..83cffbd44b2f 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -35,6 +35,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <comphelper/scopeguard.hxx> #include <sfx2/lokhelper.hxx> #include <sfx2/lokcomponenthelpers.hxx> @@ -1210,6 +1211,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) |