ooodev.format.inner.direct.write.para.indent_space.indent_spacing module

Module for managing paragraph Indents and Spacing.

New in version 0.9.0.

class ooodev.format.inner.direct.write.para.indent_space.indent_spacing.IndentSpacing(*, id_before=None, id_after=None, id_first=None, id_auto=None, sp_above=None, sp_below=None, sp_style_no_space=None, ln_mode=None, ln_value=None, ln_active_spacing=None)[source]

Bases: StyleMulti

Paragraph Indents and Spacing

New in version 0.9.0.

__init__(*, id_before=None, id_after=None, id_first=None, id_auto=None, sp_above=None, sp_below=None, sp_style_no_space=None, ln_mode=None, ln_value=None, ln_active_spacing=None)[source]

Constructor

Parameters:
  • id_before (float, optional) – Determines the left margin of the paragraph (in mm units) or Class UnitT.

  • id_after (float, optional) – Determines the right margin of the paragraph (in mm units) or Class UnitT.

  • id_first (float, optional) – specifies the indent for the first line (in mm units) or Class UnitT.

  • id_auto (bool, optional) – Determines if the first line should be indented automatically.

  • sp_above (float, optional) – Determines the top margin of the paragraph (in mm units) or Class UnitT.

  • sp_below (float, optional) – Determines the bottom margin of the paragraph (in mm units) or Class UnitT.

  • sp_style_no_space (bool, optional) – Do not add space between paragraphs of the same style.

  • ln_mode (ModeKind, optional) – mode (ModeKind, optional): Determines the mode that is use to apply units.

  • ln_value (Real, optional) – Value of line spacing. Only applies when ModeKind is PROPORTIONAL, AT_LEAST, LEADING, or FIXED.

  • ln_active_spacing (bool, optional) – Determines active page line-spacing.

Return type:

None

Note

Arguments that start with id_ set Indent.

Arguments that start with sp_ set Spacing.

Arguments that start with ln_ set Line Spacing.

When mode is ModeKind.AT_LEAST, ModeKind.LEADING, or ModeKind.FIXED then the units are mm units (as float).

When mode is ModeKind.PROPORTIONAL then the unit is percentage (as int).

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

IndentSpacing instance that represents obj Indents and spacing.

Return type:

IndentSpacing

property default: _TIndentSpacing

Gets IndentSpacing default.

Return type:

TypeVar(_TIndentSpacing, bound= IndentSpacing)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_inner_indent: Indent | None

Gets Indent instance

Return type:

Indent | None

property prop_inner_line_spacing: LineSpacing | None

Gets Line Spacing instance

Return type:

LineSpacing | None

property prop_inner_spacing: Spacing | None

Gets Spacing instance

Return type:

Spacing | None