sd/source/console/PresenterController.cxx                                      
 |    6 +-
 sd/source/console/PresenterFrameworkObserver.cxx                               
 |    3 -
 sd/source/ui/framework/configuration/Configuration.cxx                         
 |    8 +-
 sd/source/ui/framework/configuration/ConfigurationController.cxx               
 |    2 
 sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx    
 |   14 -----
 sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx    
 |    8 +-
 
sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx 
|   10 ---
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx                  
 |    4 -
 sd/source/ui/framework/factories/BasicPaneFactory.cxx                          
 |    5 +
 sd/source/ui/framework/module/CenterViewFocusModule.cxx                        
 |    8 +-
 sd/source/ui/framework/module/NotesPaneModule.cxx                              
 |    4 -
 sd/source/ui/framework/module/ShellStackGuard.cxx                              
 |    4 -
 sd/source/ui/framework/module/SlideSorterModule.cxx                            
 |    8 +-
 sd/source/ui/framework/module/ToolBarModule.cxx                                
 |    8 +-
 sd/source/ui/framework/module/ViewTabBarModule.cxx                             
 |    6 +-
 sd/source/ui/framework/tools/FrameworkHelper.cxx                               
 |   22 ++++----
 sd/source/ui/inc/DrawController.hxx                                            
 |    1 
 sd/source/ui/inc/framework/ConfigurationChangeEvent.hxx                        
 |   15 ++++-
 sd/source/ui/inc/framework/ConfigurationController.hxx                         
 |    3 -
 sd/source/ui/inc/framework/FrameworkHelper.hxx                                 
 |   18 +-----
 sd/source/ui/slideshow/SlideShowRestarter.cxx                                  
 |    3 -
 sd/source/ui/slideshow/slideshow.cxx                                           
 |    3 -
 sd/source/ui/tools/EventMultiplexer.cxx                                        
 |    6 +-
 sd/source/ui/unoidl/DrawController.cxx                                         
 |   27 ++++------
 sd/source/ui/view/ViewShellBase.cxx                                            
 |    3 -
 sd/source/ui/view/ViewTabBar.cxx                                               
 |    4 -
 26 files changed, 93 insertions(+), 110 deletions(-)

New commits:
commit 6ca495842c76476c2b54861f4c059c0e6477fb13
Author:     Noel Grandin <[email protected]>
AuthorDate: Sat Jun 28 15:13:33 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Jun 28 21:46:02 2025 +0200

    convert Type in ConfigurationChangeEvent to scoped enum
    
    which reveals that the ResourceDeactivationEnd event
    is unused, so remove that.
    
    and the "universal" feasture in ConfigurationControllerBroadcaster
    is also unused, so remove that too.
    
    Change-Id: I5b41ac46d767f60bc2196a685dffc90595989c7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187133
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sd/source/console/PresenterController.cxx 
b/sd/source/console/PresenterController.cxx
index 355a9a407ad2..6d80be9b8e89 100644
--- a/sd/source/console/PresenterController.cxx
+++ b/sd/source/console/PresenterController.cxx
@@ -119,15 +119,15 @@ PresenterController::PresenterController (
     {
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            u"ResourceActivation"_ustr,
+            sd::framework::ConfigurationChangeEventType::ResourceActivation,
             Any(ResourceActivationEventType));
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            u"ResourceDeactivation"_ustr,
+            sd::framework::ConfigurationChangeEventType::ResourceDeactivation,
             Any(ResourceDeactivationEventType));
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            u"ConfigurationUpdateEnd"_ustr,
+            
sd::framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
             Any(ConfigurationUpdateEndEventType));
     }
 
diff --git a/sd/source/console/PresenterFrameworkObserver.cxx 
b/sd/source/console/PresenterFrameworkObserver.cxx
index 9821e1f0f078..f8ba3e49342c 100644
--- a/sd/source/console/PresenterFrameworkObserver.cxx
+++ b/sd/source/console/PresenterFrameworkObserver.cxx
@@ -19,6 +19,7 @@
 
 #include "PresenterFrameworkObserver.hxx"
 #include <framework/ConfigurationController.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <utility>
 
@@ -42,7 +43,7 @@ PresenterFrameworkObserver::PresenterFrameworkObserver (
     {
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            u"ConfigurationUpdateEnd"_ustr,
+            
sd::framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
             Any());
     }
     else
diff --git a/sd/source/ui/framework/configuration/Configuration.cxx 
b/sd/source/ui/framework/configuration/Configuration.cxx
index 30e47c4bf040..7b7684bb54b4 100644
--- a/sd/source/ui/framework/configuration/Configuration.cxx
+++ b/sd/source/ui/framework/configuration/Configuration.cxx
@@ -227,14 +227,14 @@ void Configuration::PostEvent (
     aEvent.ResourceId = rxResourceId;
     if (bActivation)
         if (mbBroadcastRequestEvents)
-            aEvent.Type = FrameworkHelper::msResourceActivationRequestEvent;
+            aEvent.Type = 
ConfigurationChangeEventType::ResourceActivationRequest;
         else
-            aEvent.Type = FrameworkHelper::msResourceActivationEvent;
+            aEvent.Type = ConfigurationChangeEventType::ResourceActivation;
     else
         if (mbBroadcastRequestEvents)
-            aEvent.Type = FrameworkHelper::msResourceDeactivationRequestEvent;
+            aEvent.Type = 
ConfigurationChangeEventType::ResourceDeactivationRequest;
         else
-            aEvent.Type = FrameworkHelper::msResourceDeactivationEvent;
+            aEvent.Type = ConfigurationChangeEventType::ResourceDeactivation;
     aEvent.Configuration = this;
 
     mxBroadcaster->notifyEvent(aEvent);
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx 
b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 783331a09cf5..4bd789b79d1d 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -169,7 +169,7 @@ void ConfigurationController::RequestSynchronousUpdate()
 
 void ConfigurationController::addConfigurationChangeListener (
     const rtl::Reference<ConfigurationChangeListener>& rxListener,
-    const OUString& rsEventType,
+    ConfigurationChangeEventType rsEventType,
     const Any& rUserData)
 {
     ::osl::MutexGuard aGuard (m_aMutex);
diff --git 
a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx 
b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
index de6fdc124be9..047c882883e3 100644
--- 
a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
+++ 
b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
@@ -40,7 +40,7 @@ 
ConfigurationControllerBroadcaster::ConfigurationControllerBroadcaster (
 
 void ConfigurationControllerBroadcaster::AddListener(
     const rtl::Reference<ConfigurationChangeListener>& rxListener,
-    const OUString& rsEventType,
+    ConfigurationChangeEventType rsEventType,
     const Any& rUserData)
 {
     if ( ! rxListener.is())
@@ -114,20 +114,10 @@ void ConfigurationControllerBroadcaster::NotifyListeners 
(const ConfigurationCha
         ListenerList aList (iMap->second.begin(), iMap->second.end());
         NotifyListeners(aList,rEvent);
     }
-
-    // Notify the universal listeners.
-    iMap = maListenerMap.find(OUString());
-    if (iMap != maListenerMap.end())
-    {
-        // Create a local list of the listeners to avoid problems with
-        // concurrent changes and to be able to remove disposed listeners.
-        ListenerList aList (iMap->second.begin(), iMap->second.end());
-        NotifyListeners(aList,rEvent);
-    }
 }
 
 void ConfigurationControllerBroadcaster::NotifyListeners (
-    const OUString& rsEventType,
+    ConfigurationChangeEventType rsEventType,
     const rtl::Reference<ResourceId>& rxResourceId,
     const rtl::Reference<AbstractResource>& rxResourceObject)
 {
diff --git 
a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx 
b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
index 9829ff93fb20..304b5d4bb94c 100644
--- 
a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
+++ 
b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
@@ -20,13 +20,13 @@
 #pragma once
 
 #include <com/sun/star/uno/Reference.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 #include <rtl/ref.hxx>
 #include <unordered_map>
 #include <vector>
 
 namespace sd::framework {
 class ConfigurationChangeListener;
-struct ConfigurationChangeEvent;
 class ConfigurationController;
 class AbstractResource;
 class ResourceId;
@@ -68,7 +68,7 @@ public:
     void AddListener(
         const rtl::Reference<
             sd::framework::ConfigurationChangeListener>& rxListener,
-        const OUString& rsEventType,
+        ConfigurationChangeEventType rsEventType,
         const css::uno::Any& rUserData);
 
     /** Remove all references to the given listener.  When one listener has
@@ -96,7 +96,7 @@ public:
         the given arguments.
     */
     void NotifyListeners (
-        const OUString& rsEventType,
+        ConfigurationChangeEventType rsEventType,
         const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
         const rtl::Reference<sd::framework::AbstractResource>& 
rxResourceObject);
 
@@ -117,7 +117,7 @@ private:
     };
     typedef std::vector<ListenerDescriptor> ListenerList;
     typedef std::unordered_map
-        <OUString,
+        <ConfigurationChangeEventType,
          ListenerList> ListenerMap;
     ListenerMap maListenerMap;
 
diff --git 
a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
 
b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index 43eed4120da8..0134774a5d26 100644
--- 
a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ 
b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -148,7 +148,7 @@ void 
ConfigurationControllerResourceManager::ActivateResource (
 
             // 5. Notify the new resource to listeners of the 
ConfigurationController.
             mpBroadcaster->NotifyListeners(
-                FrameworkHelper::msResourceActivationEvent,
+                ConfigurationChangeEventType::ResourceActivation,
                 rxResourceId,
                 xResource);
         }
@@ -190,7 +190,7 @@ void 
ConfigurationControllerResourceManager::DeactivateResource (
         {
             // 2.  Notify listeners that the resource is being deactivated.
             mpBroadcaster->NotifyListeners(
-                FrameworkHelper::msResourceDeactivationEvent,
+                ConfigurationChangeEventType::ResourceDeactivation,
                 rxResourceId,
                 aDescriptor.mxResource);
 
@@ -224,12 +224,6 @@ void 
ConfigurationControllerResourceManager::DeactivateResource (
         DBG_UNHANDLED_EXCEPTION("sd");
     }
 
-    // 5.  Notify listeners that the resource is being deactivated.
-    mpBroadcaster->NotifyListeners(
-        FrameworkHelper::msResourceDeactivationEndEvent,
-        rxResourceId,
-        nullptr);
-
 #if OSL_DEBUG_LEVEL >= 1
     if (bSuccess)
         SAL_INFO("sd.fwk", __func__ << ": successfully deactivated " <<
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx 
b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 9ea3d0b480b4..f03afd1dbee7 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -149,7 +149,7 @@ void ConfigurationUpdater::UpdateConfiguration()
 #endif
             // Notify the beginning of the update.
             ConfigurationChangeEvent aEvent;
-            aEvent.Type = FrameworkHelper::msConfigurationUpdateStartEvent;
+            aEvent.Type = 
ConfigurationChangeEventType::ConfigurationUpdateStart;
             aEvent.Configuration = mxRequestedConfiguration;
             mpBroadcaster->NotifyListeners(aEvent);
 
@@ -165,7 +165,7 @@ void ConfigurationUpdater::UpdateConfiguration()
             }
 
             // Notify the end of the update.
-            aEvent.Type = FrameworkHelper::msConfigurationUpdateEndEvent;
+            aEvent.Type = ConfigurationChangeEventType::ConfigurationUpdateEnd;
             mpBroadcaster->NotifyListeners(aEvent);
 
             CheckUpdateSuccess();
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx 
b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index ff237917f1b4..2331b4f25ecc 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -21,6 +21,7 @@
 #include <sal/config.h>
 
 #include <framework/factories/BasicPaneFactory.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 
 #include "ChildWindowPane.hxx"
 #include "FrameWindowPane.hxx"
@@ -128,11 +129,11 @@ BasicPaneFactory::BasicPaneFactory(
         {
             xCC->addConfigurationChangeListener(
                 mxListener,
-                FrameworkHelper::msConfigurationUpdateStartEvent,
+                ConfigurationChangeEventType::ConfigurationUpdateStart,
                 Any(gnConfigurationUpdateStartEvent));
             xCC->addConfigurationChangeListener(
                 mxListener,
-                FrameworkHelper::msConfigurationUpdateEndEvent,
+                ConfigurationChangeEventType::ConfigurationUpdateEnd,
                 Any(gnConfigurationUpdateEndEvent));
         }
     }
diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.cxx 
b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
index 1dbae198c6d6..2c2705112467 100644
--- a/sd/source/ui/framework/module/CenterViewFocusModule.cxx
+++ b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
@@ -63,11 +63,11 @@ CenterViewFocusModule::CenterViewFocusModule 
(rtl::Reference<sd::DrawController>
     {
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            FrameworkHelper::msConfigurationUpdateEndEvent,
+            ConfigurationChangeEventType::ConfigurationUpdateEnd,
             Any());
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            FrameworkHelper::msResourceActivationEvent,
+            ConfigurationChangeEventType::ResourceActivation,
             Any());
     }
 }
@@ -91,11 +91,11 @@ void CenterViewFocusModule::notifyConfigurationChange (
 {
     if (mbValid)
     {
-        if (rEvent.Type == FrameworkHelper::msConfigurationUpdateEndEvent)
+        if (rEvent.Type == 
ConfigurationChangeEventType::ConfigurationUpdateEnd)
         {
             HandleNewView(rEvent.Configuration);
         }
-        else if (rEvent.Type == FrameworkHelper::msResourceActivationEvent)
+        else if (rEvent.Type == 
ConfigurationChangeEventType::ResourceActivation)
         {
             if 
(rEvent.ResourceId->getResourceURL().match(FrameworkHelper::msViewURLPrefix))
                 mbNewViewCreated = true;
diff --git a/sd/source/ui/framework/module/NotesPaneModule.cxx 
b/sd/source/ui/framework/module/NotesPaneModule.cxx
index 15325441eefa..c479162021a3 100644
--- a/sd/source/ui/framework/module/NotesPaneModule.cxx
+++ b/sd/source/ui/framework/module/NotesPaneModule.cxx
@@ -51,10 +51,10 @@ NotesPaneModule::NotesPaneModule(const 
rtl::Reference<::sd::DrawController>& rxC
         return;
 
     mxConfigurationController->addConfigurationChangeListener(
-        this, FrameworkHelper::msResourceActivationRequestEvent,
+        this, ConfigurationChangeEventType::ResourceActivationRequest,
         Any(ResourceActivationRequestEvent));
     mxConfigurationController->addConfigurationChangeListener(
-        this, FrameworkHelper::msResourceDeactivationRequestEvent,
+        this, ConfigurationChangeEventType::ResourceDeactivationRequest,
         Any(ResourceDeactivationRequestEvent));
 
     if 
(officecfg::Office::Impress::MultiPaneGUI::NotesPane::Visible::ImpressView::get().value_or(
diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx 
b/sd/source/ui/framework/module/ShellStackGuard.cxx
index 764f45bb7a29..f171cfbf79fb 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -56,7 +56,7 @@ ShellStackGuard::ShellStackGuard 
(rtl::Reference<sd::DrawController> const & rxC
         // prevented in case of a printing printer.
         mxConfigurationController->addConfigurationChangeListener(
             this,
-            FrameworkHelper::msConfigurationUpdateStartEvent,
+            ConfigurationChangeEventType::ConfigurationUpdateStart,
             Any());
 
         // Prepare the printer polling.
@@ -81,7 +81,7 @@ void ShellStackGuard::disposing(std::unique_lock<std::mutex>&)
 void ShellStackGuard::notifyConfigurationChange (
     const ConfigurationChangeEvent& rEvent)
 {
-    if (rEvent.Type == FrameworkHelper::msConfigurationUpdateStartEvent)
+    if (rEvent.Type == ConfigurationChangeEventType::ConfigurationUpdateStart)
     {
         if (mpUpdateLock == nullptr && IsPrinting())
         {
diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx 
b/sd/source/ui/framework/module/SlideSorterModule.cxx
index d6b2ac370bc9..e72ad05aa7d1 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -66,11 +66,11 @@ SlideSorterModule::SlideSorterModule (
             mxConfigurationController->addEventListener(this);
             mxConfigurationController->addConfigurationChangeListener(
                 this,
-                FrameworkHelper::msResourceActivationRequestEvent,
+                ConfigurationChangeEventType::ResourceActivationRequest,
                 Any(ResourceActivationRequestEvent));
             mxConfigurationController->addConfigurationChangeListener(
                 this,
-                FrameworkHelper::msResourceDeactivationRequestEvent,
+                ConfigurationChangeEventType::ResourceDeactivationRequest,
                 Any(ResourceDeactivationRequestEvent));
         }
     }
@@ -96,7 +96,7 @@ SlideSorterModule::SlideSorterModule (
 
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceActivationEvent,
+        ConfigurationChangeEventType::ResourceActivation,
         Any());
 }
 
@@ -119,7 +119,7 @@ void SlideSorterModule::SaveResourceState()
 void SlideSorterModule::notifyConfigurationChange (
     const ConfigurationChangeEvent& rEvent)
 {
-    if (rEvent.Type == FrameworkHelper::msResourceActivationEvent)
+    if (rEvent.Type == ConfigurationChangeEventType::ResourceActivation)
     {
         if (rEvent.ResourceId->compareTo(mxViewTabBarId) == 0)
         {
diff --git a/sd/source/ui/framework/module/ToolBarModule.cxx 
b/sd/source/ui/framework/module/ToolBarModule.cxx
index 8fc000245cfb..6bc0041886eb 100644
--- a/sd/source/ui/framework/module/ToolBarModule.cxx
+++ b/sd/source/ui/framework/module/ToolBarModule.cxx
@@ -68,19 +68,19 @@ ToolBarModule::ToolBarModule (
 
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msConfigurationUpdateStartEvent,
+        ConfigurationChangeEventType::ConfigurationUpdateStart,
         Any(gnConfigurationUpdateStartEvent));
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msConfigurationUpdateEndEvent,
+        ConfigurationChangeEventType::ConfigurationUpdateEnd,
         Any(gnConfigurationUpdateEndEvent));
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceActivationRequestEvent,
+        ConfigurationChangeEventType::ResourceActivationRequest,
         Any(gnResourceActivationRequestEvent));
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceDeactivationRequestEvent,
+        ConfigurationChangeEventType::ResourceDeactivationRequest,
         Any(gnResourceDeactivationRequestEvent));
 }
 
diff --git a/sd/source/ui/framework/module/ViewTabBarModule.cxx 
b/sd/source/ui/framework/module/ViewTabBarModule.cxx
index 73c7a00ede06..e3762c4bc3d3 100644
--- a/sd/source/ui/framework/module/ViewTabBarModule.cxx
+++ b/sd/source/ui/framework/module/ViewTabBarModule.cxx
@@ -61,17 +61,17 @@ ViewTabBarModule::ViewTabBarModule (
 
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceActivationRequestEvent,
+        ConfigurationChangeEventType::ResourceActivationRequest,
         Any(ResourceActivationRequestEvent));
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceDeactivationRequestEvent,
+        ConfigurationChangeEventType::ResourceDeactivationRequest,
         Any(ResourceDeactivationRequestEvent));
 
     UpdateViewTabBar(nullptr);
     mxConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceActivationEvent,
+        ConfigurationChangeEventType::ResourceActivation,
         Any(ResourceActivationEvent));
 }
 
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx 
b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index fe76816b31e4..303d82f29ce3 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -81,7 +81,7 @@ public:
     */
     CallbackCaller (
         const ::sd::ViewShellBase& rBase,
-        OUString sEventType,
+        sd::framework::ConfigurationChangeEventType sEventType,
         ::sd::framework::FrameworkHelper::ConfigurationChangeEventFilter 
aFilter,
         ::sd::framework::FrameworkHelper::Callback aCallback);
 
@@ -92,7 +92,7 @@ public:
     virtual void notifyConfigurationChange (const 
sd::framework::ConfigurationChangeEvent& rEvent) override;
 
 private:
-    OUString msEventType;
+    sd::framework::ConfigurationChangeEventType mnEventType;
     rtl::Reference<::sd::framework::ConfigurationController> 
mxConfigurationController;
     ::sd::framework::FrameworkHelper::ConfigurationChangeEventFilter maFilter;
     ::sd::framework::FrameworkHelper::Callback maCallback;
@@ -588,7 +588,7 @@ void FrameworkHelper::HandleModeChangeSlot (
 }
 
 void FrameworkHelper::RunOnConfigurationEvent(
-    const OUString& rsEventType,
+    ConfigurationChangeEventType rsEventType,
     const Callback& rCallback)
 {
     RunOnEvent(
@@ -609,7 +609,7 @@ void FrameworkHelper::RunOnResourceActivation(
     else
     {
         RunOnEvent(
-            msResourceActivationEvent,
+            ConfigurationChangeEventType::ResourceActivation,
             FrameworkHelperResourceIdFilter(rxResourceId),
             rCallback);
     }
@@ -637,7 +637,7 @@ void FrameworkHelper::RequestSynchronousUpdate()
         mxConfigurationController->RequestSynchronousUpdate();
 }
 
-void FrameworkHelper::WaitForEvent (const OUString& rsEventType) const
+void FrameworkHelper::WaitForEvent (ConfigurationChangeEventType rsEventType) 
const
 {
     bool bConfigurationUpdateSeen (false);
 
@@ -661,11 +661,11 @@ void FrameworkHelper::WaitForEvent (const OUString& 
rsEventType) const
 
 void FrameworkHelper::WaitForUpdate() const
 {
-    WaitForEvent(msConfigurationUpdateEndEvent);
+    WaitForEvent(ConfigurationChangeEventType::ConfigurationUpdateEnd);
 }
 
 void FrameworkHelper::RunOnEvent(
-    const OUString& rsEventType,
+    ConfigurationChangeEventType rsEventType,
     const ConfigurationChangeEventFilter& rFilter,
     const Callback& rCallback) const
 {
@@ -781,10 +781,10 @@ namespace {
 
 CallbackCaller::CallbackCaller (
     const ::sd::ViewShellBase& rBase,
-    OUString  rsEventType,
+    sd::framework::ConfigurationChangeEventType rsEventType,
     ::sd::framework::FrameworkHelper::ConfigurationChangeEventFilter aFilter,
     ::sd::framework::FrameworkHelper::Callback aCallback)
-    : msEventType(std::move(rsEventType)),
+    : mnEventType(rsEventType),
       maFilter(std::move(aFilter)),
       maCallback(std::move(aCallback))
 {
@@ -797,7 +797,7 @@ CallbackCaller::CallbackCaller (
         if (mxConfigurationController.is())
         {
             if (mxConfigurationController->hasPendingRequests())
-                
mxConfigurationController->addConfigurationChangeListener(this,msEventType,Any());
+                
mxConfigurationController->addConfigurationChangeListener(this,mnEventType,Any());
             else
             {
                 // There are no requests waiting to be processed.  Therefore
@@ -846,7 +846,7 @@ void SAL_CALL CallbackCaller::disposing (const 
lang::EventObject& rEvent)
 void CallbackCaller::notifyConfigurationChange (
     const sd::framework::ConfigurationChangeEvent& rEvent)
 {
-    if (!(rEvent.Type == msEventType && maFilter(rEvent)))
+    if (!(rEvent.Type == mnEventType && maFilter(rEvent)))
         return;
 
     maCallback(true);
diff --git a/sd/source/ui/inc/framework/ConfigurationChangeEvent.hxx 
b/sd/source/ui/inc/framework/ConfigurationChangeEvent.hxx
index 96a96f2fa84b..72cca4fdc35c 100644
--- a/sd/source/ui/inc/framework/ConfigurationChangeEvent.hxx
+++ b/sd/source/ui/inc/framework/ConfigurationChangeEvent.hxx
@@ -28,6 +28,16 @@ namespace sd::framework
 class Configuration;
 class AbstractResource;
 
+enum class ConfigurationChangeEventType
+{
+    ConfigurationUpdateStart,
+    ConfigurationUpdateEnd,
+    ResourceActivation,
+    ResourceActivationRequest,
+    ResourceDeactivation,
+    ResourceDeactivationRequest
+};
+
 /** Objects of this class are used for notifying changes of the
     configuration.
 
@@ -43,11 +53,10 @@ class AbstractResource;
 */
 struct ConfigurationChangeEvent final : public ::css::lang::EventObject
 {
-    /** The type of configuration change is a free-form string.  This is the
-        only member that is always set.  The values of the other members
+    /** This is the only member that is always set.  The values of the other 
members
         depend on the configuration change type and may or may not be set.
     */
-    ::rtl::OUString Type;
+    ConfigurationChangeEventType Type;
     /** The current configuration, depending on the event type, either
         before or after the change.  May be an empty reference.
     */
diff --git a/sd/source/ui/inc/framework/ConfigurationController.hxx 
b/sd/source/ui/inc/framework/ConfigurationController.hxx
index 929cd83e0718..cb9a48d88598 100644
--- a/sd/source/ui/inc/framework/ConfigurationController.hxx
+++ b/sd/source/ui/inc/framework/ConfigurationController.hxx
@@ -35,6 +35,7 @@ namespace sd { class DrawController; }
 
 namespace sd::framework {
 class ResourceFactory;
+enum class ConfigurationChangeEventType;
 
 /** The ResourceActivationMode specifies, for example for the
     
com::sun::star::drawing::framework::XConfigurationController::requestResourceActivation(),
@@ -116,7 +117,7 @@ public:
     void addConfigurationChangeListener (
         const rtl::Reference<
             sd::framework::ConfigurationChangeListener>& rxListener,
-        const OUString& rsEventType,
+        ConfigurationChangeEventType rsEventType,
         const css::uno::Any& rUserData);
 
     void removeConfigurationChangeListener (
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx 
b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index 77bd586fad7b..503e3894c403 100644
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -38,6 +38,7 @@ struct ConfigurationChangeEvent;
 class ConfigurationController;
 class AbstractView;
 class ResourceId;
+enum class ConfigurationChangeEventType;
 
 /** The FrameworkHelper is a convenience class that simplifies the
     access to the drawing framework.
@@ -78,17 +79,6 @@ public:
     static constexpr OUString msToolBarURLPrefix = 
u"private:resource/toolbar/"_ustr;
     static const OUString msViewTabBarURL;
 
-    // Names of frequently used events.
-    static constexpr OUString msResourceActivationRequestEvent
-        = u"ResourceActivationRequested"_ustr;
-    static constexpr OUString msResourceDeactivationRequestEvent
-        = u"ResourceDeactivationRequest"_ustr;
-    static constexpr OUString msResourceActivationEvent = 
u"ResourceActivation"_ustr;
-    static constexpr OUString msResourceDeactivationEvent = 
u"ResourceDeactivation"_ustr;
-    static constexpr OUString msResourceDeactivationEndEvent = 
u"ResourceDeactivationEnd"_ustr;
-    static constexpr OUString msConfigurationUpdateStartEvent = 
u"ConfigurationUpdateStart"_ustr;
-    static constexpr OUString msConfigurationUpdateEndEvent = 
u"ConfigurationUpdateEnd"_ustr;
-
     /** Return the FrameworkHelper object that is associated with the given
         ViewShellBase.  If such an object does not yet exist, a new one is
         created.
@@ -203,7 +193,7 @@ public:
         the event it waits for has been sent.
     */
     void RunOnConfigurationEvent(
-        const OUString& rsEventType,
+        ConfigurationChangeEventType rsEventType,
         const Callback& rCallback);
 
     /** Run the given callback when the specified resource has been
@@ -235,7 +225,7 @@ public:
         controller.  When the configuration controller is not processing any
         requests the method returns immediately.
     */
-    void WaitForEvent (const OUString& rsEventName) const;
+    void WaitForEvent (ConfigurationChangeEventType rsEventName) const;
 
     /** This is a short cut for WaitForEvent(msConfigurationUpdateEndEvent).
         Call this method to execute the pending requests.
@@ -320,7 +310,7 @@ private:
             The callback functor to be called.
     */
     void RunOnEvent(
-        const OUString& rsEventType,
+        ConfigurationChangeEventType rsEventType,
         const ConfigurationChangeEventFilter& rFilter,
         const Callback& rCallback) const;
 
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx 
b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index 52f996d896f5..765fe6b195a3 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -26,6 +26,7 @@
 #include <comphelper/propertyvalue.hxx>
 #include <framework/ConfigurationController.hxx>
 #include <framework/FrameworkHelper.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
@@ -117,7 +118,7 @@ IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation, void*, 
void)
             pHelper->GetConfigurationController());
 
         pHelper->RunOnConfigurationEvent(
-            FrameworkHelper::msConfigurationUpdateEndEvent,
+            
sd::framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
             ::std::bind(&SlideShowRestarter::StartPresentation, 
shared_from_this()));
         pHelper->UpdateConfiguration();
     }
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index e2a755cf0be3..c57bacb0fd69 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -36,6 +36,7 @@
 #include <sfx2/sfxsids.hrc>
 
 #include <framework/FrameworkHelper.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 #include <comphelper/extract.hxx>
 
 #include <FrameView.hxx>
@@ -1124,7 +1125,7 @@ void SlideShow::StartInPlacePresentation()
 
             pHelper->RequestView( FrameworkHelper::msImpressViewURL, 
FrameworkHelper::msCenterPaneURL );
             pHelper->RunOnConfigurationEvent(
-                FrameworkHelper::msConfigurationUpdateEndEvent,
+                
framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
                 [this] (bool const) { return 
this->StartInPlacePresentationConfigurationCallback(); } );
             return;
         }
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx 
b/sd/source/ui/tools/EventMultiplexer.cxx
index e348d51e4b71..c0dc2642a564 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -226,15 +226,15 @@ EventMultiplexer::Implementation::Implementation 
(ViewShellBase& rBase)
 
     xConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceActivationEvent,
+        framework::ConfigurationChangeEventType::ResourceActivation,
         Any(ResourceActivationEvent));
     xConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msResourceDeactivationEvent,
+        framework::ConfigurationChangeEventType::ResourceDeactivation,
         Any(ResourceDeactivationEvent));
     xConfigurationController->addConfigurationChangeListener(
         this,
-        FrameworkHelper::msConfigurationUpdateEndEvent,
+        framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
         Any(ConfigurationUpdateEvent));
 }
 
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 72055086ae2b..b2a9f993cf05 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -47,6 +47,7 @@
 #include <ToolBarManager.hxx>
 #include <Window.hxx>
 #include <framework/ConfigurationController.hxx>
+#include <framework/ConfigurationChangeEvent.hxx>
 #include <DocumentRenderer.hxx>
 #include <optsitem.hxx>
 #include <sdmod.hxx>
@@ -1229,7 +1230,7 @@ void 
ViewShellBase::Implementation::ProcessRestoreEditingViewSlot()
     pHelper->RequestView(
         FrameworkHelper::GetViewURL(pFrameView->GetViewShellTypeOnLoad()),
         FrameworkHelper::msCenterPaneURL);
-    pHelper->RunOnConfigurationEvent(u"ConfigurationUpdateEnd"_ustr, 
CurrentPageSetter(mrBase));
+    
pHelper->RunOnConfigurationEvent(framework::ConfigurationChangeEventType::ConfigurationUpdateEnd,
 CurrentPageSetter(mrBase));
 }
 
 void ViewShellBase::Implementation::SetUserWantsTabBar(bool inValue)
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index a627e9b92bbd..7d6210b1e410 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -85,7 +85,7 @@ ViewTabBar::ViewTabBar (
         {
             mxConfigurationController->addConfigurationChangeListener(
                 mxListener,
-                    FrameworkHelper::msResourceActivationEvent,
+                    
framework::ConfigurationChangeEventType::ResourceActivation,
                 Any());
         }
     }
@@ -193,7 +193,7 @@ vcl::Window* ViewTabBar::GetAnchorWindow(
 void ViewTabBar::Listener::notifyConfigurationChange (
     const sd::framework::ConfigurationChangeEvent& rEvent)
 {
-    if (rEvent.Type == FrameworkHelper::msResourceActivationEvent
+    if (rEvent.Type == 
framework::ConfigurationChangeEventType::ResourceActivation
         && 
rEvent.ResourceId->getResourceURL().match(FrameworkHelper::msViewURLPrefix)
         && rEvent.ResourceId->isBoundTo(mrParent.mxViewTabBarId->getAnchor(), 
AnchorBindingMode_DIRECT))
     {
commit 26a3ec4e9182ddf0f28e45f4c7e77da3541c6896
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Jun 27 15:21:56 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Jun 28 21:45:52 2025 +0200

    inline ProvideFrameworkControllers
    
    it is only called from one place
    
    Change-Id: I2615ed220a8b078d9beb270cb1cd9265026b8f5b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187132
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sd/source/ui/inc/DrawController.hxx 
b/sd/source/ui/inc/DrawController.hxx
index 3f5b4306f01a..3f7bc5b807cd 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -309,7 +309,6 @@ private:
         const css::uno::Any& rNewValue,
         const css::uno::Any& rOldValue);
 
-    void ProvideFrameworkControllers();
     void DisposeFrameworkControllers();
 };
 
diff --git a/sd/source/ui/unoidl/DrawController.cxx 
b/sd/source/ui/unoidl/DrawController.cxx
index e791e734a664..8b60e6156b71 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -70,7 +70,17 @@ DrawController::DrawController (ViewShellBase& rBase) 
noexcept
       mbLayerMode(false),
       mbDisposing(false)
 {
-    ProvideFrameworkControllers();
+    SolarMutexGuard aGuard;
+    try
+    {
+        mxConfigurationController = new 
sd::framework::ConfigurationController(this);
+        mxModuleController = new sd::framework::ModuleController(this);
+    }
+    catch (const RuntimeException&)
+    {
+        mxConfigurationController = nullptr;
+        mxModuleController = nullptr;
+    }
 }
 
 DrawController::~DrawController() noexcept
@@ -795,21 +805,6 @@ void DrawController::getFastPropertyValue (
     }
 }
 
-void DrawController::ProvideFrameworkControllers()
-{
-    SolarMutexGuard aGuard;
-    try
-    {
-        mxConfigurationController = new 
sd::framework::ConfigurationController(this);
-        mxModuleController = new sd::framework::ModuleController(this);
-    }
-    catch (const RuntimeException&)
-    {
-        mxConfigurationController = nullptr;
-        mxModuleController = nullptr;
-    }
-}
-
 void DrawController::DisposeFrameworkControllers()
 {
     if (mxModuleController.is())

Reply via email to