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

New commits:
commit f6c584a0992c4f2efa6f97acffb6b42a0a7492bb
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Dec 20 13:59:24 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 6 16:53:12 2025 +0100

    make SwWebColorConfig ConfigItem listen to the config changes.
    
    Change-Id: I5190155eb0edb4639b09983cc58101a5a8c82f31
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178928
    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 46122bfb0990..6bbb381fea9f 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -73,9 +73,6 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
         m_nDefTabInMm100 = 1250;
         return;
     }
-
-    if(m_pWebColorConfig)
-        m_pWebColorConfig->Load();
 }
 
 SwMasterUsrPref::~SwMasterUsrPref()
@@ -585,11 +582,13 @@ void SwCursorConfig::Notify(const 
css::uno::Sequence<OUString>& )
 }
 
 SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) :
-    ConfigItem("Office.WriterWeb/Background", ConfigItemMode::ReleaseTree),
+    ConfigItem("Office.WriterWeb/Background"),
     m_rParent(rPar),
     m_aPropNames(1)
 {
     m_aPropNames.getArray()[0] = "Color";
+    Load();
+    EnableNotification(m_aPropNames);
 }
 
 SwWebColorConfig::~SwWebColorConfig()
@@ -610,7 +609,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()
 {

Reply via email to