summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r--sc/source/ui/view/gridwin4.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 99329375b2c2..4d89d32dc755 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -527,6 +527,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
ScDocument& rDoc = *pViewData->GetDocument();
const ScViewOptions& rOpts = pViewData->GetOptions();
bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
+ bool bNoBackgroundAndGrid = bIsTiledRendering
+ && comphelper::LibreOfficeKit::isCompatFlagSet(
+ comphelper::LibreOfficeKit::Compat::scNoGridBackground);
SCTAB nTab = aOutputData.nTab;
SCCOL nX1 = aOutputData.nX1;
@@ -710,16 +713,16 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
DrawRedraw( aOutputData, SC_LAYER_BACK );
}
else
- aOutputData.SetSolidBackground(true);
+ aOutputData.SetSolidBackground(!bNoBackgroundAndGrid);
aOutputData.DrawDocumentBackground();
- if ( bGridFirst && ( bGrid || bPage ) )
+ if (bGridFirst && (bGrid || bPage) && !bNoBackgroundAndGrid)
aOutputData.DrawGrid(*pContentDev, bGrid, bPage);
aOutputData.DrawBackground(*pContentDev);
- if ( !bGridFirst && ( bGrid || bPage ) )
+ if (!bGridFirst && (bGrid || bPage) && !bNoBackgroundAndGrid)
aOutputData.DrawGrid(*pContentDev, bGrid, bPage);
pContentDev->SetMapMode(MapMode(MapUnit::MapPixel));