sc/source/ui/view/gridwin4.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 91b5b7198acd0a0eac8e0634a18f102c297b31da Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Feb 15 15:28:21 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Feb 15 21:03:03 2024 +0100 kit: cell in editing mode shown with dark view bg in light view open a calc doc in light mode (view 1) and again in another view (view 2) and toggle the second view to dark mode. Now edit a cell in the dark mode view and in the light move view the edited cell background is drawn as dark. bisected this to: commit f0adebce7a64b6c7dd57e10811cbe45767c6a540 Date: Wed Dec 13 17:50:44 2023 +0100 lok: calc: fix for rendering issues on in place editing Change-Id: I5bdd0c1afaf5fa942c1b1f8bc1009b9057656840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163401 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 785cf19d5e04..f4aeabfc1447 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1115,8 +1115,11 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI Color aCellColor = pPattern->GetItem(ATTR_BACKGROUND).GetColor(); if (aCellColor.IsTransparent()) { - const ScViewRenderingOptions& rViewRenderingOptions = pTabViewShell->GetViewRenderingData(); - aCellColor = rViewRenderingOptions.GetDocColor(); + if (ScTabViewShell* pCurrentViewShell = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current())) + { + const ScViewRenderingOptions& rViewRenderingOptions = pCurrentViewShell->GetViewRenderingData(); + aCellColor = rViewRenderingOptions.GetDocColor(); + } } rDevice.SetFillColor(aCellColor); pOtherEditView->SetBackgroundColor(aCellColor);