diff options
-rw-r--r-- | chart2/source/model/main/PageBackground.cxx | 6 |
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 ); |