ooodev.adapter.beans.multi_property_set_t module

protocol ooodev.adapter.beans.multi_property_set_t.MultiPropertySetT[source]

Bases: Protocol

Protocol class for XMultiPropertySet.

Classes that implement this protocol must have the following methods / attributes:

__init__(*args, **kwargs)
addPropertiesChangeListener(names, listener)[source]

adds an XPropertiesChangeListener to the specified property with the specified names.

The implementation can ignore the names of the properties and fire the event on all properties.

It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.

Parameters:
  • names (Tuple[str, ...]) – One or more names of the properties to listen to.

  • listener (XPropertiesChangeListener) – The listener to be added.

Return type:

None

firePropertiesChangeEvent(names, listener)[source]

Fires a sequence of PropertyChangeEvents to the specified listener.

Parameters:
  • names (Tuple[str, ...]) – One or more names of the properties to fire.

  • listener (XPropertiesChangeListener) – The listener to be notified.

Return type:

None

getPropertySetInfo()[source]

Gets the information of the properties which can be set at this object.

Return type:

XPropertySetInfo

getPropertyValues(names)[source]

The order of the values in the returned sequence will be the same as the order of the names in the argument.

Parameters:

names (Tuple[str, ...]) – One or more names of the properties.

Return type:

Tuple[Any, ...]

removePropertiesChangeListener(listener)[source]

removes an XPropertiesChangeListener 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.

Return type:

None

Parameters:

listener (com.sun.star.beans.XPropertiesChangeListener) –

setPropertyValues(names, values)[source]

Sets the values to the properties with the specified names.

The values of the properties must change before the bound events are fired. The values of the constrained properties should change after the vetoable events are fired and only if no exception occurred. Unknown properties are ignored.

Similar to set_prop_values() but with tuples instead of key, value arguments.

Raises:
  • com.sun.star.beans.PropertyVetoExceptionPropertyVetoException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • names (Tuple[str, ...]) –

  • values (Tuple[Any, ...]) –