From 05dd16dd9d788372d4f0a585b3d64ce5b9207e0e Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Mon, 4 Jul 2022 14:57:18 -0400 Subject: sc: lok: fix offset other edit view Multiple view case. Signed-off-by: Henry Castro Change-Id: I8049f2f36438e77beb5fe41399007ced0d500efa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136812 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian (cherry picked from commit 59bee366f9df6df26cc9b92b19997fc7f5112c7d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136917 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137029 --- sc/source/ui/view/gridwin4.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sc/source') diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 3f7c08f401bd..d105a47a4483 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1166,8 +1166,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // to be tweaked temporarily to match the current view's zoom. SuppressEditViewMessagesGuard aGuard(*pOtherEditView); - pOtherEditView->SetOutputArea(rDevice.PixelToLogic(aEditRect)); - pOtherEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice); + aEditRect = rDevice.PixelToLogic(aEditRect); + aEditRect.Intersection(pOtherEditView->GetOutputArea()); + pOtherEditView->Paint(aEditRect, &rDevice); // Rollback the mapmode and 'output area'. rOtherWin.SetMapMode(aOrigMapMode); -- cgit