ooodev.format.inner.common.abstract.abstract_hf module
- class ooodev.format.inner.common.abstract.abstract_hf.AbstractHF(*, on=None, shared=None, shared_first=None, margin_left=None, margin_right=None, spacing=None, spacing_dyn=None, height=None, height_auto=None)[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__(*, on=None, shared=None, shared_first=None, margin_left=None, margin_right=None, spacing=None, spacing_dyn=None, height=None, height_auto=None)[source]
Constructor
- Parameters:
on (bool | None, optional) – Specifics if section is on.
shared (bool | None, optional) – Specifies if same contents left and right.
shared_first (bool | None, optional) – Specifies if same contents on first page.
margin_left (float | None, optional) – Specifies Left Margin in
mm
units or Class UnitT.margin_right (float | None, optional) – Specifies Right Margin in
mm
units or Class UnitT.spacing (float | None, optional) – Specifies Spacing in
mm
units or Class UnitT.spacing_dyn (bool | None, optional) – Specifies if dynamic spacing is used.
height (float | None, optional) – Specifies Height in
mm
units or Class UnitT.height_auto (bool | None, optional) – Specifies if auto-fit height is used.
- 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_height(value)[source]
Gets a copy of instance with
height
set or removed.- Parameters:
value (float | None) – Specifies Height in
mm
units or Class UnitT.self (_TAbstractHF) –
- Return type:
- fmt_height_auto(value)[source]
Gets a copy of instance with Dynamic Height set or removed.
- Parameters:
value (bool | None) – Specifies if auto-fit height is used.
self (_TAbstractHF) –
- Return type:
- fmt_margin_left(value)[source]
Gets a copy of instance with
margin_left
set or removed.- Parameters:
value (float | None) – Specifies Left Margin in
mm
units or Class UnitT.self (_TAbstractHF) –
- Return type:
- fmt_margin_right(value)[source]
Gets a copy of instance with
margin_right
set or removed.- Parameters:
value (float | None) – Specifies Right Margin in
mm
units or Class UnitT.self (_TAbstractHF) –
- Return type:
- fmt_on(value)[source]
Gets a copy of instance with
on
set or removed.- Parameters:
value (bool | None) – Specifics if section is on.
self (_TAbstractHF) –
- Return type:
Gets a copy of instance with
shared
set or removed.- Parameters:
value (bool | None) – Specifies if same contents left and right.
self (_TAbstractHF) –
- Return type:
Gets a copy of instance with
shared_first
set or removed.- Parameters:
value (bool | None) – Specifies if same contents on first page.
self (_TAbstractHF) –
- Return type:
- fmt_spacing(value)[source]
Gets a copy of instance with
spacing
set or removed.- Parameters:
value (float | None) – Specifies Spacing in
mm
units or Class UnitT.self (_TAbstractHF) –
- Return type:
- fmt_spacing_dyn(value)[source]
Gets a copy of instance with Dynamic Spacing set or removed.
- Parameters:
value (bool | None) – Specifies if dynamic spacing is used.
self (_TAbstractHF) –
- 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 height_auto: _TAbstractHF
Gets instance
height_auto
set toTrue
- Return type:
TypeVar
(_TAbstractHF
, bound= AbstractHF)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_height_auto: bool | None
Gets/Sets if auto-fit height is used
- Return type:
bool | None
- property prop_margin_left: UnitMM | None
Gets/Sets Left Margin in
mm
units.- Return type:
UnitMM | None
- property prop_margin_right: UnitMM | None
Gets/Sets Right Margin in
mm
units.- Return type:
UnitMM | None
- property prop_on: bool | None
Gets/Sets if section is on.
- Return type:
bool | None
Gets/Sets if same contents left and right.
- Return type:
bool | None
Gets/Sets if same contents on first page.
- Return type:
bool | None
- property prop_spacing_dynamic: bool | None
Gets/Sets if dynamic spacing is used
- Return type:
bool | None
- property restart_on: _TAbstractHF
Gets instance section
on
set toTrue
- Return type:
TypeVar
(_TAbstractHF
, bound= AbstractHF)
Gets instance
shared
set toTrue
- Return type:
TypeVar
(_TAbstractHF
, bound= AbstractHF)
- property space_dyn: _TAbstractHF
Gets instance Dynamic spacings set to
True
- Return type:
TypeVar
(_TAbstractHF
, bound= AbstractHF)