ooodev.adapter.beans.multi_property_set_partial module

class ooodev.adapter.beans.multi_property_set_partial.MultiPropertySetPartial(component, interface=com.sun.star.beans.XMultiPropertySet)[source]

Bases: object

Partial class for XMultiPropertySet.

Parameters:
  • component (XMultiPropertySet) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.beans.XMultiPropertySet)[source]

Constructor

Parameters:
  • component (XMultiPropertySet) – UNO Component that implements com.sun.star.bean.XMultiPropertySet interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XMultiPropertySet.

Return type:

None

add_properties_change_listener(listener, *names)[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:
  • listener (XPropertiesChangeListener) – The listener to be added.

  • names (str) – One or more names of the properties to listen to.

Return type:

None

fire_properties_change_event(listener, *names)[source]

Fires a sequence of PropertyChangeEvents to the specified listener.

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

  • names (str) – One or more names of the properties to fire.

Return type:

None

get_property_set_info()[source]

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

Return type:

XPropertySetInfo

get_property_values(*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 (str) – One or more names of the properties.

Return type:

Tuple[Any, ...]

remove_properties_change_listener(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) –

set_prop_values(**kwargs)[source]

Set the property values.

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

Parameters:

kwargs (Any) – Property values.

Return type:

None

set_property_values(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, ...]) –

ooodev.adapter.beans.multi_property_set_partial.get_builder(component)[source]

Get the builder for the component.

Parameters:

component (Any) – The component.

Returns:

Builder instance.

Return type:

DefaultBuilder