From a10c3f19c0b6f81ca13d2ab4a882584f5338367f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 12 Jul 2019 20:01:57 +1000 Subject: Don't draw gridlines and document background in Online server process ... see https://gerrit.libreoffice.org/72417 They will be drawn client-side. Borders and explicit cell background are still drawn in core. This mode is activated using "sc_no_grid_bg" option in SAL_LOK_OPTIONS environment variable. Change-Id: Ie10e7770b8168ec648d44ae5af0a0a0602d89ee6 Reviewed-on: https://gerrit.libreoffice.org/75484 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sc/source/ui/view/gridwin4.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sc/source/ui/view/gridwin4.cxx') 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)); -- cgit