interface XPropertySet in module com::sun::star::beans::

(Global Index)

Syntax

interface XPropertySet : com::sun::star::uno::XInterface ;

Description

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 .

See also

XExactName

Method Summary

getPropertySetInfo

setPropertyValue sets the value of the property with the specified name.

getPropertyValue

addPropertyChangeListener adds an XPropertyChangeListener to the specified property.

removePropertyChangeListener removes an XPropertyChangeListener from the listener list.

addVetoableChangeListener adds an XVetoableChangeListener to the specified property with the name PropertyName.

removeVetoableChangeListener removes an XVetoableChangeListener from the listener list.

Method Details



getPropertySetInfo

Syntax

com::sun::star::beans::XPropertySetInfo getPropertySetInfo ();

Description

Returns

the XPropertySetInfo interface, which describes all properties of the object which supplies this interface.

Returns

NULL if the implementation cannot or will not provide information about the properties; otherwise the interface XPropertySetInfo is returned.

setPropertyValue

Syntax

void setPropertyValue (
string aPropertyName,
any aValue )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::beans::PropertyVetoException , com::sun::star::lang::IllegalArgumentException , com::sun::star::lang::WrappedTargetException );

Description

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.


getPropertyValue

Syntax

any getPropertyValue (
string PropertyName )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::lang::WrappedTargetException );

Description

Returns

the value of the property with the specified name.

Parameter PropertyName

This parameter specifies the name of the property.

Throws

UnknownPropertyException if the property does not exist.

Throws

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 WrappedTargetException .

addPropertyChangeListener

Syntax

void addPropertyChangeListener (
string aPropertyName,
com::sun::star::beans::XPropertyChangeListener xListener )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::lang::WrappedTargetException );

Description

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.

See also

removePropertyChangeListener

removePropertyChangeListener

Syntax

void removePropertyChangeListener (
string aPropertyName,
com::sun::star::beans::XPropertyChangeListener aListener )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::lang::WrappedTargetException );

Description

removes an XPropertyChangeListener from the listener list.

It is a "noop" if the listener is not registered.

See also

addPropertyChangeListener

addVetoableChangeListener

Syntax

void addVetoableChangeListener (
string PropertyName,
com::sun::star::beans::XVetoableChangeListener aListener )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::lang::WrappedTargetException );

Description

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.

See also

removeVetoableChangeListener

removeVetoableChangeListener

Syntax

void removeVetoableChangeListener (
string PropertyName,
com::sun::star::beans::XVetoableChangeListener aListener )
raises ( com::sun::star::beans::UnknownPropertyException , com::sun::star::lang::WrappedTargetException );

Description

removes an XVetoableChangeListener from the listener list.

It is a "noop" if the listener is not registered.

See also

addVetoableChangeListener
Top of Page