ooodev.format.writer.modify.para.alignment package
Module contents
- class ooodev.format.writer.modify.para.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.See also
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
andalign_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
See also
- 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:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str