LibreOffice Module forms (master) 1
|
a helper class for notifying property changes in a <type>PropertySetBase</type> instance. More...
#include <propertysetbase.hxx>
Public Member Functions | |
PropertyChangeNotifier (const PropertySetBase &rPropertySet, sal_Int32 nHandle) | |
constructs a PropertyChangeNotifier More... | |
~PropertyChangeNotifier () | |
Private Attributes | |
const PropertySetBase & | m_rPropertySet |
sal_Int32 | m_nHandle |
css::uno::Any | m_aOldValue |
a helper class for notifying property changes in a <type>PropertySetBase</type> instance.
You can create an instance of this class on the stack of a method which is to programmatically change the value of a property. In its constructor, the instance will acquire the current property value, and in its destructor, it will notify the change of this property's value (if necessary).
You do not need this class if you are modifying property values by using the X(Fast|Multi)PropertSet methods, since those already care for property notifications. You only need it if you're changing the internal representation of your property directly.
Also note that usually, notifications in the UNO world should be done without a locked mutex. So if you use this class in conjunction with a <type>MutexGuard</type>, ensure that you first instantiate the <type>PropertyChangeNotifier</type>, and then the <type>MutexGuard</type>, so your mutex is released before the notification happens.
Definition at line 306 of file propertysetbase.hxx.
|
inline |
constructs a PropertyChangeNotifier
rPropertySet | the property set implementation whose property is going to be changed. Note that this property set implementation must live at least as long as the PropertyChangeNotifier instance does. |
nHandle | the handle of the property which is going to be changed. Must be a valid property handle for the given <arg>rPropertySet</arg> |
Definition at line 323 of file propertysetbase.hxx.
References PropertySetBase::getCurrentPropertyValueByHandle(), m_aOldValue, m_nHandle, m_rPropertySet, and nHandle.
|
inline |
Definition at line 329 of file propertysetbase.hxx.
References PropertySetBase::getCurrentPropertyValueByHandle(), m_aOldValue, m_nHandle, m_rPropertySet, and PropertySetBase::notifyPropertyChange().
|
private |
Definition at line 311 of file propertysetbase.hxx.
Referenced by PropertyChangeNotifier(), and ~PropertyChangeNotifier().
|
private |
Definition at line 310 of file propertysetbase.hxx.
Referenced by PropertyChangeNotifier(), and ~PropertyChangeNotifier().
|
private |
Definition at line 309 of file propertysetbase.hxx.
Referenced by PropertyChangeNotifier(), and ~PropertyChangeNotifier().