ooodev.format.inner.partial.write.para.write_para_alignment_partial module

class ooodev.format.inner.partial.write.para.write_para_alignment_partial.WriteParaAlignmentPartial(component)[source]

Bases: object

Partial class for Write Paragraph Alignment.

Parameters:

component (Any) –

__init__(component)[source]
Parameters:

component (Any) –

Return type:

None

style_alignment(*, align=None, align_vert=None, txt_direction=None, align_last=None, expand_single_word=None, snap_to_grid=None)[source]

Style Write Paragraph Alignment.

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

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

  • text_direction (WritingMode, optional) – Determines the text direction.

  • 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).

  • txt_direction (WritingMode | None) –

Raises:

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

Returns:

Alignment Style instance or None if cancelled.

Return type:

Alignment | None

Hint

  • ParagraphAdjust can be imported from ooo.dyn.style.paragraph_adjust

  • ParagraphVertAlignEnum can be imported from ooo.dyn.text.paragraph_vert_align

  • LastLineKind can be imported from ooodev.format.writer.direct.para.alignment

  • WritingMode can be imported from ooodev.format.inner.direct.write.para.align

  • WritingMode2Enum can be imported from oo.dyn.text.writing_mode2.

style_alignment_get()[source]

Gets the Alignment Style.

Returns:

Alignment Style instance or None if not available.

Return type:

Alignment | None