summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-29 09:39:02 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-01 10:39:06 +0100
commit4edcd840aef4d1b594beecb44a0edbc0cdf5e5aa (patch)
tree727b2498461facb2208d46899c733d29009c73f3 /chart2
parentbc08b1fbbd00c6e4b086f6d95249e684ace6ae25 (diff)
set default if no ViewShell yet
Change-Id: Ib6381ec963a9dc641d880eef1f9a3e556100a98e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/model/main/PageBackground.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index b4c21df55fb4..deae689d7a2b 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -55,10 +55,10 @@ const ::chart::tPropertyValueMap& StaticPageBackgroundDefaults()
if (comphelper::LibreOfficeKit::isActive()) {
aDocColor = COL_AUTO;
} else {
- if (SfxViewShell::Current()) {
- aDocColor = SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR);
+ if (SfxViewShell* pCurrentSh = SfxViewShell::Current()) {
+ aDocColor = pCurrentSh->GetColorConfigColor(svtools::DOCCOLOR);
} else {
- SAL_WARN("chart2", "SfxViewShell::Current() returned nullptr");
+ aDocColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
}
}
::chart::PropertyHelper::setPropertyValue( aTmp, ::chart::FillProperties::PROP_FILL_COLOR, aDocColor );