ooodev.format.inner.common.abstract.abstract_line_number module
- class ooodev.format.inner.common.abstract.abstract_line_number.AbstractLineNumber(num_start=0)[source]
Bases:
StyleBase
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 ofnum_start
.- Return type:
None
- apply(obj: Any)[source]
- 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_num_start(value)[source]
Gets a copy of instance with before list style set or removed
- Parameters:
value (int) – List style value. 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 withvalue
.- Returns:
Line Number 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:
LineNum
instance that representsobj
properties.- Return type:
- property default: _TAbstractLineNumber
Gets
LineNum
default.- Return type:
TypeVar
(_TAbstractLineNumber
, bound= AbstractLineNumber)
- property exclude: _TAbstractLineNumber
Gets instance with include in line numbering set to exclude.
- Return type:
TypeVar
(_TAbstractLineNumber
, bound= AbstractLineNumber)
- property include: _TAbstractLineNumber
Gets instance with include in line numbering set to include.
- Return type:
TypeVar
(_TAbstractLineNumber
, bound= AbstractLineNumber)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_num_start: int | None
Gets/Sets Restart at this paragraph number.
If Less than zero restart numbering at current paragraph is consider to be
False
; Otherwise; restart numbering is considered to beTrue
.- Return type:
int | None
- property restart_numbers: _TAbstractLineNumber
Gets instance with restart numbers set to
1
- Return type:
TypeVar
(_TAbstractLineNumber
, bound= AbstractLineNumber)