summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-31 19:51:33 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-07 10:11:59 +0100
commit4a0718047a8c69305375f652c63716143c6190ba (patch)
tree5b41bfeb1153714e5f1b0d7fd5b566dfea59a908 /chart2
parent49a5b76e9c18c9ee43cc1e1bb9de14fd50ceda77 (diff)
use ViewShell DOCCOLOR when available for charts
Change-Id: I200538bd94d60867d84b7dc37811094b65dd9aa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162853 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 1efd4e99741e69946068d0109743f37bc8c71bff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163078 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx11
1 files changed, 9 insertions, 2 deletions
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 );
}