LibreOffice Module svx (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
svx::PropertyChangeNotifier Class Reference

helper class for notifying XPropertyChangeListeners More...

#include <shapepropertynotifier.hxx>

Collaboration diagram for svx::PropertyChangeNotifier:
[legend]

Public Member Functions

 PropertyChangeNotifier (::cppu::OWeakObject &_rOwner, ::osl::Mutex &_rMutex)
 constructs a notifier instance More...
 
 ~PropertyChangeNotifier ()
 
void addPropertyChangeListener (const OUString &_rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener)
 
void removePropertyChangeListener (const OUString &_rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener)
 
void registerProvider (const ShapePropertyProviderId _eProperty, std::unique_ptr< PropertyValueProvider > _rProvider)
 registers an PropertyValueProvider More...
 
void notifyPropertyChange (const ShapePropertyProviderId _eProperty) const
 notifies changes in the given property to all registered listeners More...
 
void disposing ()
 is called to dispose the instance More...
 

Private Member Functions

 PropertyChangeNotifier (const PropertyChangeNotifier &)=delete
 
PropertyChangeNotifieroperator= (const PropertyChangeNotifier &)=delete
 

Private Attributes

::cppu::OWeakObjectm_rContext
 
o3tl::enumarray< ShapePropertyProviderId, std::unique_ptr< PropertyValueProvider > > m_aProviders
 
comphelper::OMultiTypeInterfaceContainerHelperVar3< css::beans::XPropertyChangeListener, OUString > m_aPropertyChangeListeners
 

Detailed Description

helper class for notifying XPropertyChangeListeners

The class is intended to be held as member of the class which does the property change broadcasting.

Definition at line 96 of file shapepropertynotifier.hxx.

Constructor & Destructor Documentation

◆ PropertyChangeNotifier() [1/2]

PropertyChangeNotifier::PropertyChangeNotifier ( ::cppu::OWeakObject _rOwner,
::osl::Mutex &  _rMutex 
)

constructs a notifier instance

Parameters
_rOwnerthe owner instance of the notifier. Will be used as css.lang.EventObject.Source when notifying events.

Definition at line 66 of file shapepropertynotifier.cxx.

References m_rContext.

◆ ~PropertyChangeNotifier()

PropertyChangeNotifier::~PropertyChangeNotifier ( )

Definition at line 72 of file shapepropertynotifier.cxx.

◆ PropertyChangeNotifier() [2/2]

svx::PropertyChangeNotifier::PropertyChangeNotifier ( const PropertyChangeNotifier )
privatedelete

Member Function Documentation

◆ addPropertyChangeListener()

void PropertyChangeNotifier::addPropertyChangeListener ( const OUString &  _rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  _rxListener 
)

◆ disposing()

void PropertyChangeNotifier::disposing ( )

◆ notifyPropertyChange()

void PropertyChangeNotifier::notifyPropertyChange ( const ShapePropertyProviderId  _eProperty) const

notifies changes in the given property to all registered listeners

If no property value provider for the given property ID is registered, this is worth an assertion in a non-product build, and otherwise ignored.

Definition at line 86 of file shapepropertynotifier.cxx.

References aEvent, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::OMultiTypeInterfaceContainerHelperVar3< class listener, class key, class equalImpl >::getContainer(), m_aPropertyChangeListeners, m_aProviders, m_rContext, and comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach().

Referenced by SdrObject::notifyShapePropertyChange().

◆ operator=()

PropertyChangeNotifier & svx::PropertyChangeNotifier::operator= ( const PropertyChangeNotifier )
privatedelete

◆ registerProvider()

void PropertyChangeNotifier::registerProvider ( const ShapePropertyProviderId  _eProperty,
std::unique_ptr< PropertyValueProvider _rProvider 
)

registers an PropertyValueProvider

Definition at line 76 of file shapepropertynotifier.cxx.

References m_aProviders.

◆ removePropertyChangeListener()

void PropertyChangeNotifier::removePropertyChangeListener ( const OUString &  _rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  _rxListener 
)

Member Data Documentation

◆ m_aPropertyChangeListeners

comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> svx::PropertyChangeNotifier::m_aPropertyChangeListeners
private

◆ m_aProviders

o3tl::enumarray<ShapePropertyProviderId, std::unique_ptr<PropertyValueProvider> > svx::PropertyChangeNotifier::m_aProviders
private

Definition at line 132 of file shapepropertynotifier.hxx.

Referenced by notifyPropertyChange(), and registerProvider().

◆ m_rContext

::cppu::OWeakObject& svx::PropertyChangeNotifier::m_rContext
private

Definition at line 131 of file shapepropertynotifier.hxx.

Referenced by disposing(), and notifyPropertyChange().


The documentation for this class was generated from the following files: