sw/source/uibase/config/usrpref.cxx | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)
New commits: commit 9b228790dfb771bbc24bd4c21bf26d217651bb8f Author: Caolán McNamara <[email protected]> AuthorDate: Fri Dec 20 13:59:24 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 20 20:29:15 2024 +0100 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 <[email protected]> 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() { commit e9ed7bdd6c60ee5d3ee506a0b954d3ed6652625d Author: Caolán McNamara <[email protected]> AuthorDate: Fri Dec 20 13:49:43 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 20 20:29:06 2024 +0100 make SwLayoutViewConfig ConfigItem listen to the config changes. Change-Id: Id86edc48c304d2ab35a5cb01a20d9dac20e04280 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178926 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index a32b82dfc4af..9b39b3411440 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -82,7 +82,6 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) : return; } - m_aLayoutConfig.Load(); if(m_pWebColorConfig) m_pWebColorConfig->Load(); m_aFmtAidsAutoComplConfig.Load(); @@ -341,12 +340,13 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() const return aNames; } -SwLayoutViewConfig::SwLayoutViewConfig(bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? u"Office.WriterWeb/Layout"_ustr : u"Office.Writer/Layout"_ustr, - ConfigItemMode::ReleaseTree), - m_rParent(rPar), - m_bWeb(bIsWeb) +SwLayoutViewConfig::SwLayoutViewConfig(bool bIsWeb, SwMasterUsrPref& rPar) + : ConfigItem(bIsWeb ? u"Office.WriterWeb/Layout"_ustr : u"Office.Writer/Layout"_ustr) + , m_rParent(rPar) + , m_bWeb(bIsWeb) { + Load(); + EnableNotification(GetPropertyNames()); } SwLayoutViewConfig::~SwLayoutViewConfig() @@ -453,7 +453,10 @@ void SwLayoutViewConfig::Load() } } -void SwLayoutViewConfig::Notify( const css::uno::Sequence< OUString >& ) {} +void SwLayoutViewConfig::Notify(const css::uno::Sequence<OUString>&) +{ + Load(); +} Sequence<OUString> SwGridConfig::GetPropertyNames() {
