diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-07-12 20:01:57 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-07-23 15:54:48 +0200 |
commit | 91a3f58ec3ac7998688cab665322d26d5aa3b015 (patch) | |
tree | ac817033ac4298722b8a21187da851fcdf764533 /sc | |
parent | 347b26ae3e332c206724fe5ec9d46fef38798281 (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')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 5e1280cbd98f..8fc6391a665e 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)); |