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.

Known Services Which Export this Interface

com::sun::star::beans::PropertyBag

com::sun::star::lang::RegistryServiceManager

com::sun::star::beans::PropertyBag

com::sun::star::lang::RegistryServiceManager

com::sun::star::chart::Chart3DBarProperties

com::sun::star::chart::ChartArea

com::sun::star::chart::ChartAxis

com::sun::star::chart::ChartDataPointProperties

com::sun::star::chart::ChartDataRowProperties

com::sun::star::chart::ChartDocument

com::sun::star::chart::ChartGrid

com::sun::star::chart::ChartLine

com::sun::star::chart::ChartPieSegmentProperties

com::sun::star::chart::ChartStatistics

com::sun::star::chart::Diagram

com::sun::star::table::TableRow

com::sun::star::table::CellProperties

com::sun::star::table::TableColumn

com::sun::star::util::SearchDescriptor

com::sun::star::util::SortDescriptor

com::sun::star::util::NumberFormatSettings

com::sun::star::document::ExportFilter

com::sun::star::document::ImportFilter

com::sun::star::document::DocumentInfo

com::sun::star::document::LinkTarget

com::sun::star::form::FormComponent

com::sun::star::presentation::Presentation

com::sun::star::sdbc::PreparedStatement

com::sun::star::sdbc::ResultSet

com::sun::star::sdbc::Statement

com::sun::star::drawing::GenericDrawPage

com::sun::star::drawing::DrawingDocumentDrawView

com::sun::star::drawing::Layer

com::sun::star::drawing::DrawingDocument

com::sun::star::drawing::Shape

com::sun::star::awt::UnoControlModel

com::sun::star::ucb::FileContentProvider

com::sun::star::ucb::ContentResultSet

com::sun::star::sheet::CellAreaLink

com::sun::star::sheet::Spreadsheet

com::sun::star::sheet::DataPilotField

com::sun::star::sheet::DataPilotSource

com::sun::star::sheet::GlobalSheetSettings

com::sun::star::sheet::TableAutoFormatField

com::sun::star::sheet::SheetLink

com::sun::star::sheet::SheetFilterDescriptor

com::sun::star::sheet::DataPilotSourceLevel

com::sun::star::sheet::TableValidation

com::sun::star::sheet::TableAutoFormat

com::sun::star::sheet::SpreadsheetDocumentSettings

com::sun::star::sheet::SpreadsheetViewSettings

com::sun::star::sheet::DatabaseRange

com::sun::star::sheet::TablePageStyle

com::sun::star::sheet::SubTotalDescriptor

com::sun::star::sheet::DataPilotSourceMember

com::sun::star::sheet::DataPilotSourceDimension

com::sun::star::configuration::PropertyHierarchy

com::sun::star::sdbcx::Column

com::sun::star::sdbcx::Descriptor

com::sun::star::sdbcx::Group

com::sun::star::sdbcx::Index

com::sun::star::sdbcx::Key

com::sun::star::sdbcx::Table

com::sun::star::sdbcx::User

com::sun::star::sdbcx::View

com::sun::star::image::ImageMapObject

com::sun::star::linguistic2::LinguProperties

com::sun::star::packages::PackageFolder

com::sun::star::packages::PackageStream

com::sun::star::sdb::ColumnSettings

com::sun::star::sdb::DataSource

com::sun::star::sdb::DatabaseAccess

com::sun::star::sdb::DatabaseAccessDataSource

com::sun::star::sdb::DatabaseDocument

com::sun::star::sdb::DatabaseEnvironment

com::sun::star::sdb::DatasourceAdministrationDialog

com::sun::star::sdb::Document

com::sun::star::sdb::ErrorMessageDialog

com::sun::star::sdb::QueryDefinition

com::sun::star::text::ViewSettings

com::sun::star::text::TextTableRow

com::sun::star::text::CellProperties

com::sun::star::text::TextRange

com::sun::star::text::TextSection

com::sun::star::text::Paragraph

com::sun::star::text::TextField

com::sun::star::text::NumberingRules

com::sun::star::text::TextFieldMaster

com::sun::star::text::AdvancedTextDocument

com::sun::star::text::TextCursor

com::sun::star::text::BaseFrame

com::sun::star::text::Defaults

com::sun::star::text::TextDocument

com::sun::star::text::TextTableCursor

com::sun::star::frame::DesktopTask

com::sun::star::frame::FrameControl

com::sun::star::frame::SynchronousFrameLoader

com::sun::star::frame::Desktop

Method Details



getPropertySetInfo

Syntax

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

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.

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

getPropertyValue

Syntax

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

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