diff options
Diffstat (limited to 'configmgr/source')
-rw-r--r-- | configmgr/source/broadcaster.cxx | 25 | ||||
-rw-r--r-- | configmgr/source/broadcaster.hxx | 3 | ||||
-rw-r--r-- | configmgr/source/rootaccess.cxx | 2 |
3 files changed, 19 insertions, 11 deletions
diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx index 03bcf8f273de..365e25f9eb02 100644 --- a/configmgr/source/broadcaster.cxx +++ b/configmgr/source/broadcaster.cxx @@ -97,9 +97,12 @@ void Broadcaster::addPropertiesChangeNotification( void Broadcaster::addChangesNotification( css::uno::Reference< css::util::XChangesListener > const & listener, - css::util::ChangesEvent const & event) + css::util::ChangesEvent const & event, bool bRootListener) { - changesNotifications_.emplace_back(listener, event); + if (bRootListener) + rootChangesNotifications_.emplace_back(listener, event); + else + changesNotifications_.emplace_back(listener, event); } void Broadcaster::send() { @@ -164,13 +167,17 @@ void Broadcaster::send() { appendMessage(messages, e); } } - for (auto& rNotification : changesNotifications_) { - try { - rNotification.listener->changesOccurred(rNotification.event); - } catch (css::lang::DisposedException &) { - } catch (css::uno::Exception & e) { - exception = cppu::getCaughtException(); - appendMessage(messages, e); + // First root listeners, then the rest + for (const auto& container : { rootChangesNotifications_ , changesNotifications_}) + { + for (auto& rNotification : container) { + try { + rNotification.listener->changesOccurred(rNotification.event); + } catch (css::lang::DisposedException &) { + } catch (css::uno::Exception & e) { + exception = cppu::getCaughtException(); + appendMessage(messages, e); + } } } if (exception.hasValue()) { diff --git a/configmgr/source/broadcaster.hxx b/configmgr/source/broadcaster.hxx index d0c461e731d8..711e7a83bd9e 100644 --- a/configmgr/source/broadcaster.hxx +++ b/configmgr/source/broadcaster.hxx @@ -72,7 +72,7 @@ public: void addChangesNotification( css::uno::Reference< css::util::XChangesListener > const & listener, - css::util::ChangesEvent const & event); + css::util::ChangesEvent const & event, bool bRootListener); void send(); @@ -131,6 +131,7 @@ private: std::vector< ContainerNotification > containerElementReplacedNotifications_; std::vector< PropertyChangeNotification > propertyChangeNotifications_; std::vector< PropertiesChangeNotification > propertiesChangeNotifications_; + std::vector< ChangesNotification > rootChangesNotifications_; std::vector< ChangesNotification > changesNotifications_; }; diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx index e2455556b6db..94be58e8660b 100644 --- a/configmgr/source/rootaccess.cxx +++ b/configmgr/source/rootaccess.cxx @@ -87,7 +87,7 @@ void RootAccess::initBroadcaster( broadcaster->addChangesNotification( changesListener, css::util::ChangesEvent( - pSource, css::uno::Any( xBase ), set)); + pSource, css::uno::Any( xBase ), set), path_.empty()); } } |