diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-20 13:49:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-20 20:29:06 +0100 |
commit | e9ed7bdd6c60ee5d3ee506a0b954d3ed6652625d (patch) | |
tree | 7028c0b5a91e2f3947687b8673d9289cfbbb2beb | |
parent | f376ad74457fed10f0655f1028ad3bb6897dff4d (diff) |
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 <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/source/uibase/config/usrpref.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
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() { |