ooodev.format.calc.direct.cell.alignment package

Module contents

class ooodev.format.calc.direct.cell.alignment.Properties(*, wrap_auto=None, hyphen_active=None, shrink_to_fit=None, direction=None)[source]

Bases: StyleBase

Text Properties

New in version 0.9.0.

__init__(*, wrap_auto=None, hyphen_active=None, shrink_to_fit=None, direction=None)[source]

Constructor

Parameters:
  • wrap_auto (bool, optional) – Specifies wrap text automatically.

  • hyphen_active (bool, optional) – Specifies hyphenation active.

  • shrink_to_fit (bool, optional) – Specifies if text will shrink to cell.

  • direction (TextDirectionKind, optional) – Specifies Text Direction.

Return type:

None

Note

When wrap_auto is True shrink_to_fit is not used.

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:

Instance that represents text property options.

Return type:

Properties

property prop_direction: TextDirectionKind | None

Gets/Sets Text Direction Kind.

Return type:

TextDirectionKind | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_hyphen_active: bool | None

Gets/Sets If text is hyphenation is active.

Return type:

bool | None

property prop_shrink_to_fit: bool | None

Gets/Sets If text shrinks to cell size.

Return type:

bool | None

property prop_wrap_auto: bool | None

Gets/Sets If text is wrapped automatically.

Return type:

bool | None

class ooodev.format.calc.direct.cell.alignment.TextAlign(hori_align=None, indent=None, vert_align=None)[source]

Bases: StyleBase

Cell Text Alignment.

New in version 0.9.0.

__init__(hori_align=None, indent=None, vert_align=None)[source]

Constructor

Parameters:
  • hori_align (HoriAlignKind, optional) – Specifies Horizontal Alignment.

  • indent (float | UnitT | None) – (float, UnitT, optional): Specifies indent in pt (point) units or Class UnitT. Only used when hori_align is set to HoriAlignKind.LEFT

  • vert_align (VertAdjustKind, optional) – Specifies Vertical Alignment.

Return type:

None

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:

Instance that represents Text Alignment.

Return type:

TextAlign

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_hori_align: HoriAlignKind | None

Gets/Sets Horizontal align value.

Return type:

HoriAlignKind | None

property prop_indent: UnitPT | None

Gets/Sets indent.

Return type:

UnitPT | None

property prop_vert_align: VertAlignKind | None

Gets/Sets vertical align value.

Return type:

VertAlignKind | None

class ooodev.format.calc.direct.cell.alignment.TextOrientation(vert_stack=None, rotation=None, edge=None)[source]

Bases: StyleBase

Text Rotation

New in version 0.9.0.

__init__(vert_stack=None, rotation=None, edge=None)[source]

Constructor

Parameters:
  • vert_stack (bool, optional) – Specifies if vertical stack is to be used.

  • rotation (int, Angle, optional) – Specifies if the rotation.

  • edge (EdgeKind, optional) – Specifies the Reference Edge.

Return type:

None

Note

When vert_stack is True other parameters are not used.

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:

Instance that represents text orientation options.

Return type:

TextOrientation

property prop_edge: EdgeKind | None

Gets/Sets Edge Kind.

Return type:

EdgeKind | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_rotation: Angle | None

Gets/Sets Vertical flip option

Return type:

Angle | None

property prop_vert_stacked: bool | None

Gets/Sets vertically stacked.

Return type:

bool | None