ooodev.format.inner.modify.write.para.align.alignment module

class ooodev.format.inner.modify.write.para.align.alignment.Alignment(*, align=None, align_vert=None, txt_direction=None, align_last=None, expand_single_word=None, snap_to_grid=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Bases: ParaStyleBaseMulti

Paragraph Alignment

Any properties starting with prop_ set or get current instance values.

New in version 0.9.0.

__init__(*, align=None, align_vert=None, txt_direction=None, align_last=None, expand_single_word=None, snap_to_grid=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Constructor

Parameters:
  • align (ParagraphAdjust, optional) – Determines horizontal alignment of a paragraph.

  • align_vert (ParagraphVertAlignEnum, optional) – Determines vertical alignment of a paragraph.

  • align_last (LastLineKind, optional) – Determines the adjustment of the last line.

  • expand_single_word (bool, optional) – Determines if single words are stretched. It is only valid if align and align_last are also valid.

  • snap_to_grid (bool, optional) – Determines snap to text grid (if active).

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Family Style. Default ParagraphStyles.

  • txt_direction (WritingMode | None) –

Return type:

None

classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Gets instance from Document.

Parameters:
  • doc (Any) – UNO Document Object.

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default ParagraphStyles.

Returns:

Alignment instance from document properties.

Return type:

Alignment

property prop_inner: Alignment

Gets/Sets Inner Alignment instance

Return type:

Alignment

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str