LibreOffice LibreOffice 6.0 SDK API Reference

Public Member Functions | List of all members
XPropertyContainer Interface Referencepublished

makes it possible to add and remove properties to or from an object. More...

`import"XPropertyContainer.idl";`

Inheritance diagram for XPropertyContainer:

## Public Member Functions
void | addProperty ([in] string Name, [in] short Attributes, [in] any DefaultValue) raises ( com::sun::star::beans::PropertyExistException, com::sun::star::beans::IllegalTypeException, com::sun::star::lang::IllegalArgumentException )
| adds a property to the object. More...
void | removeProperty ([in] string Name) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::NotRemoveableException )
| removes a property from the object. 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...

## Detailed Description

makes it possible to add and remove properties to or from an object.

Some scripting engines cannot access properties directly when the property set is changed. Please use XPropertySet::getPropertyValue() etc. in this case.

Developers Guide
  UCB - Services and Interfaces

## Member Function Documentation

## ◆ addProperty()

void addProperty | ( | [in] string | Name,
|  | [in] short | Attributes,
|  | [in] any | DefaultValue
| ) |  |
raises | ( | com::sun::star::beans::PropertyExistException,
|  | com::sun::star::beans::IllegalTypeException,
|  | com::sun::star::lang::IllegalArgumentException
| ) |  |

adds a property to the object.

Parameters

  Name | specifies the name of the new property.
  Attributes | specifies the property attributes, see PropertyAttribute.
  DefaultValue | specifies the type of the new property and a potential default value.

Exceptions

  PropertyExistException | if a property with the same name already exists.
  IllegalTypeException | if the specified type is not allowed.

## ◆ removeProperty()

void removeProperty | ( | [in] string | Name | ) |
raises | ( | com::sun::star::beans::UnknownPropertyException,
|  | com::sun::star::beans::NotRemoveableException
| ) |  |

removes a property from the object.

Parameters

  Name | specified the name of the property.

Exceptions

  UnknownPropertyException | if the property does not exist.

The documentation for this interface was generated from the following file:

- com/sun/star/beans/XPropertyContainer.idl