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 f0adebce7a
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.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-02-15 15:28:21 +00:00
parent 79eb7a29ab
commit 91b5b7198a

View file

@ -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);