chart2/source/controller/drawinglayer/DrawViewWrapper.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit 4a0718047a8c69305375f652c63716143c6190ba Author: Caolán McNamara <[email protected]> AuthorDate: Wed Jan 31 19:51:33 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Feb 7 10:11:59 2024 +0100 use ViewShell DOCCOLOR when available for charts Change-Id: I200538bd94d60867d84b7dc37811094b65dd9aa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162853 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 1efd4e99741e69946068d0109743f37bc8c71bff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163078 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index 1cd90c06b7ad..40b9eb3ef3c7 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/drawing/XShape.hpp> #include <sfx2/objsh.hxx> +#include <sfx2/viewsh.hxx> #include <svx/helperhittest3d.hxx> #include <officecfg/Office/Calc.hxx> @@ -212,8 +213,14 @@ void DrawViewWrapper::setMarkHandleProvider( MarkHandleProvider* pMarkHandleProv void DrawViewWrapper::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* /* pRedirector */) { - svtools::ColorConfig aColorConfig; - Color aFillColor( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor ); + Color aFillColor; + if (const SfxViewShell* pViewShell = SfxViewShell::Current()) + aFillColor = pViewShell->GetColorConfigColor(svtools::DOCCOLOR); + else + { + svtools::ColorConfig aColorConfig; + aFillColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; + } SetApplicationBackgroundColor(aFillColor); E3dView::CompleteRedraw( pOut, rReg ); }
