sc/source/ui/view/gridwin4.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit e7f486f10fd21bee78dea0d2eda241dd094d783d Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Apr 27 16:34:54 2023 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Jun 20 15:58:42 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 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151972 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153325 Tested-by: Jenkins 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)