ooodev.format.writer.modify.para.indent_space package
Module contents
- class ooodev.format.writer.modify.para.indent_space.Indent(*, before=None, after=None, first=None, auto=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMulti
Paragraph Style Indent
New in version 0.9.0.
- __init__(*, before=None, after=None, first=None, auto=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
before (float, UnitT, optional) – Determines the left margin of the paragraph (in
mm
units) or Class UnitT.after (float, UnitT, optional) – Determines the right margin of the paragraph (in
mm
units) or Class UnitT.first (float, UnitT, optional) – specifies the indent for the first line (in
mm
units) or Class UnitT.auto (bool, optional) – Determines if the first line should be indented automatically.
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
.
- 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:
Indent
instance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.indent_space.LineSpacing(*, mode=None, value=0, active_ln_spacing=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMulti
Paragraph Style Line Spacing
New in version 0.9.0.
- __init__(*, mode=None, value=0, active_ln_spacing=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
mode (ModeKind, optional) – Determines the mode that is used to apply units.
value (int, float, UnitT, optional) – Value of line spacing. Only applies when
ModeKind
isPROPORTIONAL
,AT_LEAST
,LEADING
, orFIXED
.active_ln_spacing (bool, optional) – Determines active page line-spacing.
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
.
- Return type:
None
Note
If
ModeKind
isSINGLE
,LINE_1_15
,LINE_1_5
, orDOUBLE
thenvalue
is ignored.If
ModeKind
isAT_LEAST
,LEADING
, orFIXED
thenvalue
is a float (in mm units
) or Class UnitTIf
ModeKind
isPROPORTIONAL
then value is an int representing percentage. For example95
equals95%
,130
equals130%
- 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:
LineSpacing
instance from document properties.- Return type:
- property prop_inner: LineSpacing
Gets Inner Line Spacing instance
- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.indent_space.Spacing(*, above=None, below=None, style_no_space=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMulti
Paragraph Style Spacing
New in version 0.9.0.
- __init__(*, above=None, below=None, style_no_space=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
above (float, UnitT, optional) – Determines the top margin of the paragraph (in
mm
units) or Class UnitT.below (float, UnitT, optional) – Determines the bottom margin of the paragraph (in
mm
units) or Class UnitT.style_no_space (bool, optional) – Do not add space between paragraphs of the same style.
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
.
- 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:
Spacing
instance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str