LibreOffice
LibreOffice 24.2 SDK API Reference
|
provides information about and access to the properties from an implementation. More...
import"XPropertySet.idl";
Public Member Functions | |
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo () |
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException ) |
sets the value of the property with the specified name. More... | |
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XPropertyChangeListener to the specified property. More... | |
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XPropertyChangeListener from the listener list. More... | |
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
adds an XVetoableChangeListener to the specified property with the name PropertyName. More... | |
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException ) |
removes an XVetoableChangeListener from the listener list. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
provides information about and access to the properties from an implementation.
There are three types of properties:
You can listen to changes of bound properties with the XPropertyChangeListener and you can veto changes of constrained properties with the XVetoableChangeListener.
To implement inaccurate name access, you must support the interface XExactName.
void addPropertyChangeListener | ( | [in] string | aPropertyName, |
[in] com::sun::star::beans::XPropertyChangeListener | xListener | ||
) | |||
raises | ( | com::sun::star::beans::UnknownPropertyException, | |
com::sun::star::lang::WrappedTargetException | |||
) |
adds an XPropertyChangeListener to the specified property.
An empty name ("") registers the listener to all bound properties. If the property is not bound, the behavior is not specified.
It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.
void addVetoableChangeListener | ( | [in] string | PropertyName, |
[in] com::sun::star::beans::XVetoableChangeListener | aListener | ||
) | |||
raises | ( | com::sun::star::beans::UnknownPropertyException, | |
com::sun::star::lang::WrappedTargetException | |||
) |
adds an XVetoableChangeListener to the specified property with the name PropertyName.
An empty name ("") registers the listener to all constrained properties. If the property is not constrained, the behavior is not specified.
com::sun::star::beans::XPropertySetInfo getPropertySetInfo | ( | ) |
any getPropertyValue | ( | [in] string | PropertyName | ) | |
raises | ( | com::sun::star::beans::UnknownPropertyException, | |||
com::sun::star::lang::WrappedTargetException | |||||
) |
PropertyName | This parameter specifies the name of the property. |
UnknownPropertyException | if the property does not exist. |
com::sun::star::lang::WrappedTargetException | if the implementation has an internal reason for the exception. In this case the original exception is wrapped into that com::sun::star::lang::WrappedTargetException. |
void removePropertyChangeListener | ( | [in] string | aPropertyName, |
[in] com::sun::star::beans::XPropertyChangeListener | aListener | ||
) | |||
raises | ( | com::sun::star::beans::UnknownPropertyException, | |
com::sun::star::lang::WrappedTargetException | |||
) |
removes an XPropertyChangeListener from the listener list.
It is a "noop" if the listener is not registered.
It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.
void removeVetoableChangeListener | ( | [in] string | PropertyName, |
[in] com::sun::star::beans::XVetoableChangeListener | aListener | ||
) | |||
raises | ( | com::sun::star::beans::UnknownPropertyException, | |
com::sun::star::lang::WrappedTargetException | |||
) |
removes an XVetoableChangeListener from the listener list.
It is a "noop" if the listener is not registered.
void setPropertyValue | ( | [in] string | aPropertyName, |
[in] any | aValue | ||
) | |||
raises | ( | com::sun::star::beans::UnknownPropertyException, | |
com::sun::star::beans::PropertyVetoException, | |||
com::sun::star::lang::IllegalArgumentException, | |||
com::sun::star::lang::WrappedTargetException | |||
) |
sets the value of the property with the specified name.
If it is a bound property the value will be changed before the change event is fired. If it is a constrained property a vetoable event is fired before the property value can be changed.
com::sun::star::beans::PropertyVetoException | if the property is read-only or vetoable and one of the listeners throws this exception because of an unaccepted new value. |