ooodev.format.inner.direct.write.para.outline_list.list_style module
Module for managing paragraph breaks.
New in version 0.9.0.
- class ooodev.format.inner.direct.write.para.outline_list.list_style.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 beFalse
. If-2
then restart numbering at current paragraph is consider to beTrue
. Otherwise, number starts at the value passed in.
- Return type:
None
Note
If argument
list_style
isStyleListKind.NONE
or empty string thennum_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:
- 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 beFalse
. If-2
then restart numbering at current paragraph is consider to beTrue
. Otherwise, restart numbering is considered to beTrue
.self (_TListStyle) –
- Returns:
List Style instance
- Return type:
- 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 representsobj
properties.- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- 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 beTrue
.- Return type:
int | None
- property restart_numbers: _TListStyle
Gets instance with restart numbers set
- Return type:
TypeVar
(_TListStyle
, bound= ListStyle)