ooodev.adapter.beans.property_state_partial module
- class ooodev.adapter.beans.property_state_partial.PropertyStatePartial(component, interface=com.sun.star.beans.XPropertyState)[source]
Bases:
object
Partial class for XPropertyState.
- Parameters:
component (XPropertyState) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.beans.XPropertyState)[source]
Constructor
- Parameters:
component (XPropertyState) – UNO Component that implements
com.sun.star.bean.XPropertyState
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XPropertyState
.
- Return type:
None
- get_property_default(name)[source]
If no default exists, is not known or is void, then the return type is void.
- Raises:
com.sun.star.beans.UnknownPropertyException –
UnknownPropertyException
com.sun.star.lang.WrappedTargetException –
WrappedTargetException
- Return type:
Any
- Parameters:
name (str) –
- get_property_state(name)[source]
- Raises:
com.sun.star.beans.UnknownPropertyException –
UnknownPropertyException
- Returns:
The state of the property.
- Return type:
PropertyState
- Parameters:
name (str) –
Hint
PropertyState
is an enum and can be imported fromooo.dyn.beans.property_state
.
- get_property_states(*names)[source]
The order of the states is correlating to the order of the given property names.
- Raises:
com.sun.star.beans.UnknownPropertyException –
UnknownPropertyException
- Returns:
The states of the properties.
- Return type:
Tuple[PropertyState, …]
- Parameters:
names (str) –
Hint
PropertyState
is an enum and can be imported fromooo.dyn.beans.property_state
.
- set_property_to_default(name)[source]
Sets the property to default value.
The value depends on the implementation of this interface. If it is a bound property, you must change the value before the change events are fired. If it is a constrained property, you must fire the vetoable event before you change the property value.
- Raises:
com.sun.star.beans.UnknownPropertyException –
UnknownPropertyException
- Return type:
None
- Parameters:
name (str) –