ooodev.format.inner.modify.write.para.indent_space.line_spacing module

class ooodev.format.inner.modify.write.para.indent_space.line_spacing.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 is PROPORTIONAL, AT_LEAST, LEADING, or FIXED.

  • 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 is SINGLE, LINE_1_15, LINE_1_5, or DOUBLE then value is ignored.

If ModeKind is AT_LEAST, LEADING, or FIXED then value is a float (in mm units) or Class UnitT

If ModeKind is PROPORTIONAL then value is an int representing percentage. For example 95 equals 95%, 130 equals 130%

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:

LineSpacing

property prop_inner: LineSpacing

Gets Inner Line Spacing instance

Return type:

LineSpacing

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str