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

Module for managing paragraph spacing.

New in version 0.9.0.

class ooodev.format.inner.direct.write.para.indent_space.spacing.Spacing(*, above=None, below=None, style_no_space=None)[source]

Bases: StyleBase

Paragraph Spacing

Any properties starting with prop_ set or get current instance values.

All methods starting with fmt_ can be used to chain together properties.

New in version 0.9.0.

__init__(*, above=None, below=None, style_no_space=None)[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.

Return type:

None

apply(obj: Any)[source]
apply(obj: Any, **kwargs)
apply(obj, **kwargs)

Applies writing mode to obj

Parameters:

obj (object) – UNO object.

Return type:

None

fmt_above(value)[source]

Gets a copy of instance with above margin set or removed

Parameters:
  • value (float, UnitT, optional) – Margin value (in mm units) or Class UnitT.

  • self (_TSpacing) –

Returns:

Indent instance

Return type:

Spacing

fmt_below(value)[source]

Gets a copy of instance with below margin set or removed

Parameters:
  • value (float, UnitT, optional) – Margin value (in mm units) or Class UnitT.

  • self (_TSpacing) –

Returns:

Indent instance

Return type:

Spacing

fmt_style_no_space(value)[source]

Gets a copy of instance with style no spacing set or removed

Parameters:
  • value (bool | None) – Auto value.

  • self (_TSpacing) –

Returns:

Indent instance

Return type:

Spacing

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:

Spacing instance that represents obj spacing.

Return type:

Spacing

property default: _TSpacing

Gets Spacing default.

Return type:

TypeVar(_TSpacing, bound= Spacing)

property prop_above: UnitMM | None

Gets/Sets the top margin of the paragraph (in mm units).

Return type:

UnitMM | None

property prop_below: UnitMM | None

Gets/Sets the bottom margin of the paragraph (in mm units).

Return type:

UnitMM | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_style_no_space: bool | None

Gets/Sets if no space between paragraphs of the same style

Return type:

bool | None

property style_no_space: _TSpacing

Gets copy of instance with style no spacing set

Return type:

TypeVar(_TSpacing, bound= Spacing)