LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XPropertySet Interface Referencepublished

provides information about and access to the properties from an implementation. More...

import"XPropertySet.idl";

Inheritance diagram for XPropertySet:
XInterface UnoControlModel XPrinterPropertySet PropertySet XPropertyBag ChartType DataSequence XDatabaseDataProvider RegressionEquation XFormattedString2 Chart3DBarProperties ChartArea ChartAxis ChartDataPointProperties ChartDataRowProperties ChartDocument ChartGrid ChartLine ChartPieSegmentProperties ChartStatistics Diagram PropertyHierarchy HeaderFooterSettings LinkTarget Settings DocumentSettings DrawingDocumentDrawView GenericDrawingDocument GenericDrawPage Layer Shape XLayer BaseStorage StorageStream XExtendedStorageStream ValueBinding FormComponent PropertyBrowserController DesktopTask GalleryItem GraphicDescriptor GraphicRendererVCL ImageMapObject RegistryServiceManager ServiceManager XLinguProperties XAnnotation PackageFolder PackageStream DocumentSettings OutlineView Presentation PresentationView PreviewView SlidesView XPresentation2 XFormulaParser XFunctionCategory XFunctionDescription XFormatCondition XFunction XGroup XReportComponent XReportEngine XSection ColumnSettings DatabaseAccess DatabaseAccessDataSource DatabaseDocument DatabaseEnvironment DataSource DatasourceAdministrationDialog Document DocumentDefinition SingleSelectQueryComposer TableDefinition XQueryDefinition XTextConnectionSettings PreparedStatement ResultSet Statement Column Descriptor Group Index Key Table User View CellAreaLink ConditionalFormat DatabaseRange DataPilotDescriptor DataPilotField DataPilotItem DataPilotSource DataPilotSourceDimension DataPilotSourceLevel DataPilotSourceMember DocumentSettings Scenario SheetFilterDescriptor SheetLink SpreadsheetDocumentSettings SpreadsheetViewSettings SubTotalDescriptor TableAutoFormat TableAutoFormatField TableValidation Style CellProperties TableColumn TableRow XTable BaseFrame CellProperties Defaults DocumentSettings GenericTextDocument MailMerge NumberingRules Paragraph TextCursor TextDocumentView TextField TextFieldMaster TextRange TextSection TextTableCursor TextTableRow ViewSettings ContentResultSet FileContentProvider XPersistentPropertySet NumberFormatSettings SearchDescriptor SortDescriptor XPathSettings XSearchDescriptor ViewSettings XModel2 XSubmission XDataType

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

Detailed 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
com::sun::star::beans::XExactName
Developers Guide
First Steps - Using Services - Using Properties
Professional UNO - Properties

Member Function Documentation

◆ addPropertyChangeListener()

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.

See also
removePropertyChangeListener

◆ addVetoableChangeListener()

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.

See also
removeVetoableChangeListener

◆ getPropertySetInfo()

Returns
the XPropertySetInfo interface, which describes all properties of the object which supplies this interface.
NULL if the implementation cannot or will not provide information about the properties; otherwise the interface XPropertySetInfo is returned.

◆ getPropertyValue()

any getPropertyValue ( [in] string  PropertyName)
raises ( com::sun::star::beans::UnknownPropertyException,
com::sun::star::lang::WrappedTargetException
)
Returns
the value of the property with the specified name.
Parameters
PropertyNameThis parameter specifies the name of the property.
Exceptions
UnknownPropertyExceptionif the property does not exist.
com::sun::star::lang::WrappedTargetExceptionif the implementation has an internal reason for the exception. In this case the original exception is wrapped into that com::sun::star::lang::WrappedTargetException.

◆ removePropertyChangeListener()

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.

See also
addPropertyChangeListener

◆ removeVetoableChangeListener()

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.

See also
addVetoableChangeListener

◆ setPropertyValue()

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.

Exceptions
com::sun::star::beans::PropertyVetoExceptionif the property is read-only or vetoable and one of the listeners throws this exception because of an unaccepted new value.

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