LibreOffice LibreOffice 26.2 SDK API Reference

Exported Interfaces | Public Attributes | List of all members
ValueBinding Service Reference

defines a component which allows access to a single value More...

`import"ValueBinding.idl";`

Inheritance diagram for ValueBinding:

## Exported Interfaces
interface | com::sun::star::beans::XPropertySet
| allows access to the properties of the binding More...
interface | XValueBinding
| allows read and write access to the value represented by this binding More...
interface | com::sun::star::util::XModifyBroadcaster
| allows other components to be notified when the value represented by the ValueBinding instance changes. More...
interface | com::sun::star::lang::XComponent
| allows life time control for the component More...

## Public Attributes
boolean | ReadOnly
| determines whether the value is currently readonly More...
boolean | Relevant
| determines the relevance of the value represented by the binding More...

## Additional Inherited Members
Public Member Functions inherited from XValueBinding
sequence< type > | getSupportedValueTypes ()
| determines the types which are supported by this binding for value exchange More...
boolean | supportsType ([in] type aType)
| determines whether a given type is supported by this binding for value exchange More...
any | getValue ([in] type aType) raises ( IncompatibleTypesException )
| retrieves the current value More...
void | setValue ([in] any aValue) raises ( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException )
| sets the current value 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...
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. More...
Protected Member Functions inherited from XPropertySet
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...
Protected 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...
Protected Member Functions inherited from XValueBinding
sequence< type > | getSupportedValueTypes ()
| determines the types which are supported by this binding for value exchange More...
boolean | supportsType ([in] type aType)
| determines whether a given type is supported by this binding for value exchange More...
any | getValue ([in] type aType) raises ( IncompatibleTypesException )
| retrieves the current value More...
void | setValue ([in] any aValue) raises ( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException )
| sets the current value More...
Protected Member Functions inherited from XModifyBroadcaster
void | addModifyListener ([in] com::sun::star::util::XModifyListener aListener)
| adds the specified listener to receive events "modified." More...
void | removeModifyListener ([in] com::sun::star::util::XModifyListener aListener)
| removes the specified listener. More...
Protected Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. More...

## Detailed Description

defines a component which allows access to a single value

Read/Write access to the value represented by this component is supported, as well as (optionally) active broadcasting of value changes

## Exported Interfaces

## ◆ com::sun::star::beans::XPropertySet

interface com::sun::star::beans::XPropertySet
| optional

allows access to the properties of the binding

## ◆ com::sun::star::lang::XComponent

interface com::sun::star::lang::XComponent

allows life time control for the component

A ValueBinding may be known to one or more components supporting the XBindableValue interface, which all work with this binding. However, they will not own the ValueBinding. The ownership is with another instance, which may also decide to obsolete the ValueBinding for whatever reasons (e.g. because the data model which the binding reflected died). For this reason, a ValueBinding must offer a possibility to be obsoleted by its owner, and to notify this obsoleteness to other interested parties, such as XBindableValues.

## ◆ com::sun::star::util::XModifyBroadcaster

interface com::sun::star::util::XModifyBroadcaster
| optional

allows other components to be notified when the value represented by the ValueBinding instance changes.

This interface is optional, since a binding may not support actively notifying changes in its value. Note, however, that in case this interface is not supported, the bound component cannot react on value changes, and will thus override any values which are set by an instance other than itself.

## ◆ XValueBinding

interface XValueBinding

allows read and write access to the value represented by this binding

## Member Data Documentation

## ◆ ReadOnly

boolean ReadOnly
| optional property readonly bound

determines whether the value is currently readonly

For instance, you could imagine a ValueBinding which represents a cell in a spreadsheet document, and whose value is readonly as long as the spreadsheet is locked.

As long as this property is `TRUE`, the value binding should throw an InvalidBindingStateException when its XValueBinding::setValue() method is invoked.

## ◆ Relevant

boolean Relevant
| optional property readonly bound

determines the relevance of the value represented by the binding

In a more complex scenario, where different form controls are bound to different values, which all are part of a larger data structure, some of the items in this data structure may not be relevant currently. This is indicated by the Relevant property being `FALSE`.

XBindableValues which are bound to this binding may or may not react in certain ways on the (ir)relevance of their bound value.

One possible reaction could be that user interface elements which are associated with the XBindableValue are disabled as long as Relevant is `FALSE`.

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

- com/sun/star/form/binding/ValueBinding.idl