ooodev.format.writer.direct.para.outline_list package

Module contents

class ooodev.format.writer.direct.para.outline_list.LineNum(num_start=0)[source]

Bases: AbstractLineNumber

Paragraph Line Numbers

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__(num_start=0)[source]

Constructor

Parameters:

num_start (int, optional) – Restart paragraph with number. If 0 then this paragraph is include in line numbering. If -1 then this paragraph is excluded in line numbering. If greater than zero this paragraph is included in line numbering and the numbering is restarted with value of num_start.

Return type:

None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

class ooodev.format.writer.direct.para.outline_list.ListStyle(list_style=None, num_start=None)[source]

Bases: StyleBase

Paragraph ListStyle

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__(list_style=None, num_start=None)[source]

Constructor

Parameters:
  • list_style (str, StyleListKind, optional) – List Style.

  • num_start (int, optional) – Starts with number. If -1 then restart numbering at current paragraph is consider to be False. If -2 then restart numbering at current paragraph is consider to be True. Otherwise, number starts at the value passed in.

Return type:

None

Note

If argument list_style is StyleListKind.NONE or empty string then num_start is ignored.

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

Applies break properties to obj

Parameters:

obj (object) – UNO object that supports com.sun.star.style.ParagraphProperties service.

Return type:

None

fmt_list_style(value)[source]

Gets a copy of instance with before list style set or removed

Parameters:
  • value (str, StyleListKind, None) – List style value.

  • self (_TListStyle) –

Returns:

List Style instance

Return type:

ListStyle

fmt_num_start(value)[source]

Gets a copy of instance with before list style set or removed

Parameters:
  • value (int | None) – List style value. If -1 then restart numbering at current paragraph is consider to be False. If -2 then restart numbering at current paragraph is consider to be True. Otherwise, restart numbering is considered to be True.

  • self (_TListStyle) –

Returns:

List Style instance

Return type:

ListStyle

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:

ListStyle instance that represents obj properties.

Return type:

ListStyle

property default: ListStyle

Gets ListStyle default.

Return type:

ListStyle

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_list_style: str | None

Gets/Sets List Style

Return type:

str | None

property prop_num_start: int | None

Gets/Sets Starts with number.

If Less then zero then restart numbering at current paragraph is consider to be False; Otherwise; restart numbering is considered to be True.

Return type:

int | None

property restart_numbers: _TListStyle

Gets instance with restart numbers set

Return type:

TypeVar(_TListStyle, bound= ListStyle)

class ooodev.format.writer.direct.para.outline_list.Outline(level=LevelKind.TEXT_BODY)[source]

Bases: StyleBase

Paragraph Outline

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

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

New in version 0.9.0.

__init__(level=LevelKind.TEXT_BODY)[source]

Constructor

Parameters:

level (LevelKind) – Outline level.

Return type:

None

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

Applies break properties to obj

Parameters:

obj (object) – UNO object that supports com.sun.star.style.ParagraphProperties service.

Return type:

None

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:

Outline instance that represents obj break properties.

Return type:

Outline

style_above(value)[source]

Gets a copy of instance with level set.

Parameters:
  • value (LevelKind) – Level value

  • self (_TOutline) –

Returns:

Outline instance

Return type:

Spacing

property default: _TOutline

Gets Outline default.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_01: _TOutline

Gets copy of instance set to outline level 1.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_02: _TOutline

Gets copy of instance set to outline level 2.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_03: _TOutline

Gets copy of instance set to outline level 3.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_04: _TOutline

Gets copy of instance set to outline level 4.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_05: _TOutline

Gets copy of instance set to outline level 5.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_06: _TOutline

Gets copy of instance set to outline level 6.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_07: _TOutline

Gets copy of instance set to outline level 7.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_08: _TOutline

Gets copy of instance set to outline level 8.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_09: _TOutline

Gets copy of instance set to outline level 9.

Return type:

TypeVar(_TOutline, bound= Outline)

property level_10: _TOutline

Gets copy of instance set to outline level 10.

Return type:

TypeVar(_TOutline, bound= Outline)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_level: LevelKind

Gets/Sets level

Return type:

LevelKind

property text_body: _TOutline

Gets copy of instance set to outline level text body.

Return type:

TypeVar(_TOutline, bound= Outline)