summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-20 13:59:24 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-20 20:29:15 +0100
commit9b228790dfb771bbc24bd4c21bf26d217651bb8f (patch)
treef420948f95f0a22f17ed86d60667e353ed7f4951
parente9ed7bdd6c60ee5d3ee506a0b954d3ed6652625d (diff)
make SwWebColorConfig ConfigItem listen to the config changes.
Change-Id: I5190155eb0edb4639b09983cc58101a5a8c82f31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178929 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sw/source/uibase/config/usrpref.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 9b39b3411440..88c456ed2264 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -82,8 +82,6 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
return;
}
- if(m_pWebColorConfig)
- m_pWebColorConfig->Load();
m_aFmtAidsAutoComplConfig.Load();
}
@@ -704,12 +702,14 @@ void SwFmtAidsAutoComplConfig::Load()
void SwFmtAidsAutoComplConfig::Notify(const css::uno::Sequence<OUString>&) {}
-SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) :
- ConfigItem(u"Office.WriterWeb/Background"_ustr, ConfigItemMode::ReleaseTree),
- m_rParent(rPar),
- m_aPropNames(1)
+SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar)
+ : ConfigItem(u"Office.WriterWeb/Background"_ustr)
+ , m_rParent(rPar)
+ , m_aPropNames(1)
{
m_aPropNames.getArray()[0] = "Color";
+ Load();
+ EnableNotification(m_aPropNames);
}
SwWebColorConfig::~SwWebColorConfig()
@@ -730,7 +730,10 @@ void SwWebColorConfig::ImplCommit()
PutProperties(m_aPropNames, aValues);
}
-void SwWebColorConfig::Notify( const css::uno::Sequence< OUString >& ) {}
+void SwWebColorConfig::Notify(const css::uno::Sequence<OUString>&)
+{
+ Load();
+}
void SwWebColorConfig::Load()
{