ooodev.format.inner.partial.style.style_property_partial module

class ooodev.format.inner.partial.style.style_property_partial.StylePropertyPartial(component, property_name, property_default='')[source]

Bases: object

Partial class for Applying a Style Name to a component.

Parameters:
  • component (Any) –

  • property_name (str) –

__init__(component, property_name, property_default='')[source]
Parameters:
  • component (Any) –

  • property_name (str) –

Return type:

None

style_by_name(name='')[source]

Assign a style by name to the component.

Parameters:

name (str, optional) – The name of the style to apply. If not provided, the default style is applied.

Raises:

CancelEventError – If the event before_style_by_name is cancelled and not handled.

Return type:

None

style_by_name_get()[source]

Get the style name of the component.

Returns:

The name of the style.

Return type:

str