24#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
25#include <com/sun/star/beans/XPropertyChangeListener.hpp>
26#include <com/sun/star/container/XContainerListener.hpp>
27#include <com/sun/star/lang/DisposedException.hpp>
28#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
29#include <com/sun/star/lang/XEventListener.hpp>
30#include <com/sun/star/uno/Any.hxx>
31#include <com/sun/star/uno/Exception.hpp>
32#include <com/sun/star/uno/Reference.hxx>
33#include <com/sun/star/uno/XInterface.hpp>
34#include <com/sun/star/util/XChangesListener.hpp>
36#include <rtl/ustrbuf.hxx>
37#include <rtl/ustring.hxx>
47 OUStringBuffer & buffer, css::uno::Exception
const & exception)
50 buffer.append(exception.Message);
56 css::uno::Reference< css::lang::XEventListener >
const & listener,
57 css::lang::EventObject
const & event)
63 css::uno::Reference< css::container::XContainerListener >
const & listener,
64 css::container::ContainerEvent
const & event)
70 css::uno::Reference< css::container::XContainerListener >
const & listener,
71 css::container::ContainerEvent
const & event)
77 css::uno::Reference< css::container::XContainerListener >
const & listener,
78 css::container::ContainerEvent
const & event)
84 css::uno::Reference< css::beans::XPropertyChangeListener >
const & listener,
85 css::beans::PropertyChangeEvent
const & event)
91 css::uno::Reference< css::beans::XPropertiesChangeListener >
const &
93 css::uno::Sequence< css::beans::PropertyChangeEvent >
const & event)
99 css::uno::Reference< css::util::XChangesListener >
const & listener,
100 css::util::ChangesEvent
const & event)
106 css::uno::Any exception;
107 OUStringBuffer messages;
110 rNotification.listener->disposing(rNotification.event);
111 }
catch (css::lang::DisposedException &) {
112 }
catch (css::uno::Exception & e) {
114 appendMessage(messages, e);
120 rNotification.listener->elementInserted(rNotification.event);
121 }
catch (css::lang::DisposedException &) {
122 }
catch (css::uno::Exception & e) {
124 appendMessage(messages, e);
130 rNotification.listener->elementRemoved(rNotification.event);
131 }
catch (css::lang::DisposedException &) {
132 }
catch (css::uno::Exception & e) {
134 appendMessage(messages, e);
140 rNotification.listener->elementReplaced(rNotification.event);
141 }
catch (css::lang::DisposedException &) {
142 }
catch (css::uno::Exception & e) {
144 appendMessage(messages, e);
150 rNotification.listener->propertyChange(rNotification.event);
151 }
catch (css::lang::DisposedException &) {
152 }
catch (css::uno::Exception & e) {
154 appendMessage(messages, e);
160 rNotification.listener->propertiesChange(rNotification.event);
161 }
catch (css::lang::DisposedException &) {
162 }
catch (css::uno::Exception & e) {
164 appendMessage(messages, e);
169 rNotification.listener->changesOccurred(rNotification.event);
170 }
catch (css::lang::DisposedException &) {
171 }
catch (css::uno::Exception & e) {
173 appendMessage(messages, e);
176 if (exception.hasValue()) {
177 throw css::lang::WrappedTargetRuntimeException(
178 (
"configmgr exceptions during listener notification" +
180 css::uno::Reference< css::uno::XInterface >(),
186 css::uno::Reference< css::lang::XEventListener >
const & theListener,
187 css::lang::EventObject theEvent):
188 listener(theListener), event(
std::move(theEvent))
190 assert(theListener.is());
194 css::uno::Reference< css::container::XContainerListener >
const &
196 css::container::ContainerEvent theEvent):
197 listener(theListener), event(
std::move(theEvent))
199 assert(theListener.is());
203 css::uno::Reference< css::beans::XPropertyChangeListener >
const &
205 css::beans::PropertyChangeEvent theEvent):
206 listener(theListener), event(
std::move(theEvent))
208 assert(theListener.is());
212 css::uno::Reference< css::beans::XPropertiesChangeListener >
const &
214 css::uno::Sequence< css::beans::PropertyChangeEvent >
const & theEvent):
215 listener(theListener), event(theEvent)
217 assert(theListener.is());
221 css::uno::Reference< css::util::XChangesListener >
const & theListener,
222 css::util::ChangesEvent theEvent):
223 listener(theListener), event(
std::move(theEvent))
225 assert(theListener.is());
void addContainerElementRemovedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
std::vector< ContainerNotification > containerElementRemovedNotifications_
std::vector< ChangesNotification > changesNotifications_
void addContainerElementReplacedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
std::vector< ContainerNotification > containerElementReplacedNotifications_
void addContainerElementInsertedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
std::vector< ContainerNotification > containerElementInsertedNotifications_
void addPropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &listener, css::beans::PropertyChangeEvent const &event)
std::vector< PropertiesChangeNotification > propertiesChangeNotifications_
void addDisposeNotification(css::uno::Reference< css::lang::XEventListener > const &listener, css::lang::EventObject const &event)
void addPropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &listener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &event)
void addChangesNotification(css::uno::Reference< css::util::XChangesListener > const &listener, css::util::ChangesEvent const &event)
std::vector< PropertyChangeNotification > propertyChangeNotifications_
std::vector< DisposeNotification > disposeNotifications_
Any SAL_CALL getCaughtException()
ChangesNotification(css::uno::Reference< css::util::XChangesListener > const &theListener, css::util::ChangesEvent theEvent)
ContainerNotification(css::uno::Reference< css::container::XContainerListener > const &theListener, css::container::ContainerEvent theEvent)
DisposeNotification(css::uno::Reference< css::lang::XEventListener > const &theListener, css::lang::EventObject theEvent)
PropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &theListener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &theEvent)
PropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &theListener, css::beans::PropertyChangeEvent theEvent)