sc/qa/unit/tiledrendering/tiledrendering.cxx |    3 ++-
 sfx2/source/appl/appserv.cxx                 |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit d5a973fee90820b529e5fbafbef35917625ffd19
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Jun 9 15:27:12 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jun 11 22:16:30 2023 +0200

    Related: tdf#155507 don't broadcast UI Theme change unless it did change
    
    a problem since:
    
https://github.com/CollaboraOnline/online/commit/b6d4c88f9011845acae5c8537c0826055c8327a2
    
    Change-Id: Iac1189ba7b892324b5f000f5f6240787b3209892
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152799
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 6eb2aa134e69..fd2413e9f0af 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -3058,9 +3058,10 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoReorderingMulti)
 
 CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testGetViewRenderState)
 {
-    // Add an empty dark scheme to avoid a warning
+    // Add a pair of schemes, last added is the default
     svtools::EditableColorConfig aColorConfig;
     aColorConfig.AddScheme(u"Dark");
+    aColorConfig.AddScheme(u"Light");
 
     ScModelObj* pModelObj = createDoc("empty.ods");
     int nFirstViewId = SfxLokHelper::getView();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7b233434dc57..2d57c7e562dc 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -583,8 +583,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
                 SAL_WARN("sfx.appl", "FN_CHANGE_THEME: no theme name");
                 break;
             }
+            const OUString& rSchemeName = pNewThemeArg->GetValue();
             svtools::EditableColorConfig aEditableConfig;
-            aEditableConfig.LoadScheme(pNewThemeArg->GetValue());
+            if (aEditableConfig.GetCurrentSchemeName() != rSchemeName)
+                aEditableConfig.LoadScheme(rSchemeName);
             break;
         }
 

Reply via email to