21#include <com/sun/star/util/XModifyListener.hpp>
22#include <com/sun/star/util/XModifyBroadcaster.hpp>
40 css::util::XModifyBroadcaster,
41 css::util::XModifyListener >
48 const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
50 const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
54 const css::lang::EventObject&
aEvent )
override;
59 const css::lang::EventObject& Source )
override;
62 virtual void disposing(std::unique_lock<std::mutex>& )
override;
75template<
class InterfaceRef >
84 css::uno::Reference< css::util::XModifyBroadcaster >
85 xBroadcaster( xObject, css::uno::UNO_QUERY );
90 css::uno::Reference< css::util::XModifyListener >
m_xListener;
93template<
class InterfaceRef >
102 css::uno::Reference< css::util::XModifyBroadcaster >
103 xBroadcaster( xObject, css::uno::UNO_QUERY );
111template<
class Pair >
120 css::uno::Reference< css::util::XModifyBroadcaster >
121 xBroadcaster( aPair.second, css::uno::UNO_QUERY );
129template<
class Pair >
138 css::uno::Reference< css::util::XModifyBroadcaster >
139 xBroadcaster( aPair.second, css::uno::UNO_QUERY );
149template<
class InterfaceRef >
151 const InterfaceRef & xObject,
152 const css::uno::Reference< css::util::XModifyListener > & xListener )
163 const css::uno::Reference< css::util::XModifyListener > & xListener )
165 if( xBroadcaster && xListener )
166 xBroadcaster->addModifyListener( xListener );
169template<
class Container >
171 const Container & rContainer,
172 const css::uno::Reference< css::util::XModifyListener > & xListener )
175 std::for_each( rContainer.begin(), rContainer.end(),
182 const css::uno::Reference< css::util::XModifyListener > & xListener )
186 for (
auto const &
i : rContainer)
187 i->addModifyListener(xListener);
190template<
class Container >
192 const Container & rContainer,
193 const css::uno::Reference< css::util::XModifyListener > & xListener )
196 std::for_each( rContainer.begin(), rContainer.end(),
200template<
class InterfaceRef >
202 const InterfaceRef & xObject,
203 const css::uno::Reference< css::util::XModifyListener > & xListener )
215 const css::uno::Reference< css::util::XModifyListener > & xListener )
217 if( xBroadcaster && xListener )
218 xBroadcaster->removeModifyListener( xListener );
221template<
class Container >
223 const Container & rContainer,
224 const css::uno::Reference< css::util::XModifyListener > & xListener )
227 std::for_each( rContainer.begin(), rContainer.end(),
234 const css::uno::Reference< css::util::XModifyListener > & xListener )
238 for (
auto const &
i : rContainer)
239 i->removeModifyListener(xListener);
242template<
class Container >
244 const Container & rContainer,
245 const css::uno::Reference< css::util::XModifyListener > & xListener )
248 std::for_each( rContainer.begin(), rContainer.end(),
This helper class serves as forwarder of modify events.
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
comphelper::OInterfaceContainerHelper4< css::util::XModifyListener > m_aModifyListeners
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
void addListenerToAllMapElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void removeListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
void removeListenerFromAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListenerToAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
void removeListenerFromAllMapElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
css::uno::Reference< css::util::XModifyListener > m_xListener
void operator()(const InterfaceRef &xObject)
addListenerFunctor(css::uno::Reference< css::util::XModifyListener > xListener)
addListenerToMappedElementFunctor(css::uno::Reference< css::util::XModifyListener > xListener)
void operator()(const Pair &aPair)
css::uno::Reference< css::util::XModifyListener > m_xListener
css::uno::Reference< css::util::XModifyListener > m_xListener
void operator()(const Pair &aPair)
removeListenerFromMappedElementFunctor(css::uno::Reference< css::util::XModifyListener > xListener)
void operator()(const InterfaceRef &xObject)
removeListenerFunctor(css::uno::Reference< css::util::XModifyListener > xListener)
css::uno::Reference< css::util::XModifyListener > m_xListener