sw/source/uibase/config/usrpref.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit dc400c7447bbae8c75ce5c865c79f3ec494c1640
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Dec 20 13:49:43 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 6 14:02:18 2025 +0100

    make SwLayoutViewConfig ConfigItem listen to the config changes.
    
    Change-Id: Id86edc48c304d2ab35a5cb01a20d9dac20e04280
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178925
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/uibase/config/usrpref.cxx 
b/sw/source/uibase/config/usrpref.cxx
index 4da8899d0345..46122bfb0990 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -74,7 +74,6 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
         return;
     }
 
-    m_aLayoutConfig.Load();
     if(m_pWebColorConfig)
         m_pWebColorConfig->Load();
 }
@@ -291,11 +290,12 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() 
const
 }
 
 SwLayoutViewConfig::SwLayoutViewConfig(bool bIsWeb, SwMasterUsrPref& rPar) :
-    ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Layout") :  
OUString("Office.Writer/Layout"),
-        ConfigItemMode::ReleaseTree),
+    ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Layout") :  
OUString("Office.Writer/Layout")),
     m_rParent(rPar),
     m_bWeb(bIsWeb)
 {
+    Load();
+    EnableNotification(GetPropertyNames());
 }
 
 SwLayoutViewConfig::~SwLayoutViewConfig()
@@ -402,7 +402,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()
 {

Reply via email to