summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin4.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-07-12 20:01:57 +1000
committerMichael Meeks <michael.meeks@collabora.com>2019-08-05 21:06:41 -0400
commita10c3f19c0b6f81ca13d2ab4a882584f5338367f (patch)
tree491336467f9309a39bc0937cb44ddcedac458173 /sc/source/ui/view/gridwin4.cxx
parentbc404e83f7007353c5644328f230a7c49572ebd0 (diff)
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 <mike.kaganski@collabora.com>
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));