diff options
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 06dfc49798be..8c54bd049acb 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -30,6 +30,7 @@ #include <vcl/toolbox.hxx> #include <vcl/weld.hxx> #include <svl/intitem.hxx> +#include <svtools/colorcfg.hxx> #include <svtools/langhelp.hxx> #include <com/sun/star/awt/XPopupMenu.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> @@ -3316,10 +3317,11 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const return pEditWin; } -::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry) const +::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry eEntry) const { SAL_WARN("sfx.view", "SfxViewShell::GetColorConfigColor not overridden!"); - return {}; + svtools::ColorConfig aColorConfig; + return aColorConfig.GetColorValue(eEntry).nColor; } void SfxViewShell::SetLOKLanguageTag(const OUString& rBcp47LanguageTag) diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 99137d28b4da..d154fd982901 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -31,6 +31,7 @@ #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> +#include <sfx2/viewsh.hxx> #include <svtools/colorcfg.hxx> #include <svx/svdetc.hxx> #include <svx/svdobj.hxx> @@ -1768,8 +1769,13 @@ Color SdrPage::GetPageBackgroundColor( SdrPageView const * pView, bool bScreenDi if(bScreenDisplay && (!pView || pView->GetApplicationDocumentColor() == COL_AUTO)) { - svtools::ColorConfig aColorConfig; - aColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor; + if (const SfxViewShell* pViewShell = SfxViewShell::Current()) + aColor = pViewShell->GetColorConfigColor(svtools::DOCCOLOR); + else + { + svtools::ColorConfig aColorConfig; + aColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor; + } } else { |