summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/apphdl.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5d6a0a66514a..a78ba9416e19 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -969,19 +969,20 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
}
else if ( pBrdCst == m_pColorConfig.get() )
{
- if( pBrdCst == m_pColorConfig.get() )
- SwViewOption::ApplyColorConfigValues(*m_pColorConfig);
-
//invalidate all edit windows
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while(pViewShell)
{
if(pViewShell->GetWindow())
{
- if(dynamic_cast< const SwView *>( pViewShell ) != nullptr ||
+ auto pSwView = dynamic_cast<SwView *>( pViewShell );
+ if(pSwView != nullptr ||
dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr ||
dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr)
{
+ SwViewOption aNewOptions = *pSwView->GetWrtShell().GetViewOptions();
+ aNewOptions.SetColorConfig(*m_pColorConfig);
+ pSwView->GetWrtShell().ApplyViewOptions(aNewOptions);
pViewShell->GetWindow()->Invalidate();
}
}
@@ -1044,7 +1045,7 @@ svtools::ColorConfig& SwModule::GetColorConfig()
if(!m_pColorConfig)
{
m_pColorConfig.reset(new svtools::ColorConfig);
- SwViewOption::ApplyColorConfigValues(*m_pColorConfig);
+ SwViewOption::SetInitialColorConfig(*m_pColorConfig);
m_pColorConfig->AddListener(this);
}
return *m_pColorConfig;