21#include <com/sun/star/lang/XComponent.hpp>
30namespace EventListenerHelper
36template<
class InterfaceRef >
45 css::uno::Reference< css::lang::XComponent >
46 xBroadcaster( xObject, css::uno::UNO_QUERY );
54template<
class InterfaceRef >
63 css::uno::Reference< css::lang::XComponent >
64 xBroadcaster( xObject, css::uno::UNO_QUERY );
74template<
class InterfaceRef >
76 const InterfaceRef & xObject,
77 const css::uno::Reference< css::lang::XEventListener > & xListener )
86template<
class Container >
88 const Container & rContainer,
89 const css::uno::Reference< css::lang::XEventListener > & xListener )
92 std::for_each( rContainer.begin(), rContainer.end(),
96template<
class InterfaceRef >
98 const InterfaceRef & xObject,
99 const css::uno::Reference< css::lang::XEventListener > & xListener )
108template<
class Container >
110 const Container & rContainer,
111 const css::uno::Reference< css::lang::XEventListener > & xListener )
114 std::for_each( rContainer.begin(), rContainer.end(),
void addListenerToAllElements(const Container &rContainer, const css::uno::Reference< css::lang::XEventListener > &xListener)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::lang::XEventListener > &xListener)
void removeListener(const InterfaceRef &xObject, const css::uno::Reference< css::lang::XEventListener > &xListener)
void removeListenerFromAllElements(const Container &rContainer, const css::uno::Reference< css::lang::XEventListener > &xListener)
addListenerFunctor(css::uno::Reference< css::lang::XEventListener > xListener)
css::uno::Reference< css::lang::XEventListener > m_xListener
void operator()(const InterfaceRef &xObject)
css::uno::Reference< css::lang::XEventListener > m_xListener
removeListenerFunctor(css::uno::Reference< css::lang::XEventListener > xListener)
void operator()(const InterfaceRef &xObject)