ooodev.format.inner.direct.draw.shape.position_size.adapt module

class ooodev.format.inner.direct.draw.shape.position_size.adapt.Adapt(fit_height=None, fit_width=None)[source]

Bases: StyleBase

Shape Adapt (only for Shape Text Boxes)

New in version 0.17.3.

__init__(fit_height=None, fit_width=None)[source]

Constructor

Parameters:
  • fit_height (bool, optional) – Expands the width of the object to the width of the text, if the object is smaller than the text.

  • fit_width (bool, optional) – Expands the height of the object to the height of the text, if the object is smaller than the text.

Return type:

None

Note

Adapt is only available for Text Boxes.

New in version 0.17.3.

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

New instance.

Return type:

Adapt

property prop_fit_height: bool | None

Gets/Sets position

Return type:

bool | None

property prop_fit_width: bool | None

Gets/Sets size

Return type:

bool | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind