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) –
- 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
andalign_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 fromooo.dyn.style.paragraph_adjust
ParagraphVertAlignEnum
can be imported fromooo.dyn.text.paragraph_vert_align
LastLineKind
can be imported fromooodev.format.writer.direct.para.alignment
WritingMode
can be imported fromooodev.format.inner.direct.write.para.align
WritingMode2Enum
can be imported fromoo.dyn.text.writing_mode2
.