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>

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 ShapeProperty _eProperty, const std::shared_ptr< IPropertyValueProvider > &_rProvider)
 registers an IPropertyValueProvider More...
 
void notifyPropertyChange (const ShapeProperty _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

std::unique_ptr< PropertyChangeNotifier_Datam_xData
 

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 100 of file shapepropertynotifier.hxx.

Constructor & Destructor Documentation

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 94 of file shapepropertynotifier.cxx.

PropertyChangeNotifier::~PropertyChangeNotifier ( )

Definition at line 99 of file shapepropertynotifier.cxx.

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

Member Function Documentation

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

Definition at line 147 of file shapepropertynotifier.cxx.

References m_xData.

void PropertyChangeNotifier::disposing ( )

is called to dispose the instance

Definition at line 159 of file shapepropertynotifier.cxx.

References m_xData.

void PropertyChangeNotifier::notifyPropertyChange ( const ShapeProperty  _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 113 of file shapepropertynotifier.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_xData, and cppu::OInterfaceContainerHelper::notifyEach().

Referenced by SdrObject::notifyShapePropertyChange().

PropertyChangeNotifier& svx::PropertyChangeNotifier::operator= ( const PropertyChangeNotifier )
privatedelete
void PropertyChangeNotifier::registerProvider ( const ShapeProperty  _eProperty,
const std::shared_ptr< IPropertyValueProvider > &  _rProvider 
)

registers an IPropertyValueProvider

Definition at line 103 of file shapepropertynotifier.cxx.

References ENSURE_OR_THROW, and m_xData.

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

Definition at line 153 of file shapepropertynotifier.cxx.

References m_xData.

Member Data Documentation

std::unique_ptr< PropertyChangeNotifier_Data > svx::PropertyChangeNotifier::m_xData
private

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