20#include <com/sun/star/beans/XPropertySet.hpp>
22#include <osl/diagnose.h>
42 OSL_ENSURE(!
m_xAdapter.is(),
"OPropertyChangeListener::disposeAdapter: what did dispose do?");
52 std::unique_lock<std::mutex>& rGuard,
54 const Reference<XPropertySet>& _rxSet)
57 , m_pListener(_pListener)
75 Reference<XPropertyChangeListener> xPreventDelete(
this);
78 m_xSet->removePropertyChangeListener(rProp,
static_cast<XPropertyChangeListener*
>(
this));
93 Reference<XPropertyChangeListener> xPreventDelete(
this);
96 m_xSet->removePropertyChangeListener(rProp,
static_cast<XPropertyChangeListener*
>(
this));
129 m_xSet->addPropertyChangeListener(_sPropertyName,
130 static_cast<XPropertyChangeListener*
>(
this));
simple listener adapter for property sets
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &_rEvent)=0
void setAdapter(std::unique_lock< std::mutex > &rGuard, OPropertyChangeMultiplexer2 *_pAdapter)
virtual ~OPropertyChangeListener2()
void disposeAdapter(std::unique_lock< std::mutex > &rGuard)
If the derivee also owns the mutex which we know as reference, then call this within your derivee's d...
rtl::Reference< OPropertyChangeMultiplexer2 > m_xAdapter
void onListenerDestruction()
sal_Int32 locked() const
get the lock count
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
void dispose(std::unique_lock< std::mutex > &rGuard)
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
void addProperty(const OUString &aPropertyName)
css::uno::Reference< css::beans::XPropertySet > m_xSet
OPropertyChangeMultiplexer2(std::mutex &rMutex, std::unique_lock< std::mutex > &rGuard, OPropertyChangeListener2 *_pListener, const css::uno::Reference< css::beans::XPropertySet > &_rxSet)
OPropertyChangeListener2 * m_pListener
virtual ~OPropertyChangeMultiplexer2() override
std::vector< OUString > m_aProperties
void unlock()
incremental unlock
void lock()
incremental lock