ooodev.format.inner.common.abstract.abstract_padding module
Module for managing paragraph padding.
New in version 0.9.0.
- class ooodev.format.inner.common.abstract.abstract_padding.AbstractPadding(*, left=None, right=None, top=None, bottom=None, all=None)[source]
Bases:
StyleBase
Abstract Padding
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__(*, left=None, right=None, top=None, bottom=None, all=None)[source]
Constructor
- Parameters:
left (float, UnitT, optional) – Left (in
mm
units) or Class UnitT.right (float, UnitT, optional) – Right (in
mm
units) or Class UnitT.top (float, UnitT, optional) – Top (in
mm
units) or Class UnitT.bottom (float, UnitT, optional) – Bottom (in
mm
units) or Class UnitT.all (float, UnitT, optional) – Left, right, top, bottom (in
mm
units) or Class UnitT. If argument is present thenleft
,right
,top
, andbottom
arguments are ignored.
- Raises:
ValueError – If any argument value is less than zero.
- Return type:
None
- apply(obj: object)[source]
- apply(obj, **kwargs)
Applies padding to
obj
- Parameters:
obj (object) – UNO object that supports
com.sun.star.style.ParagraphProperties
service.kwargs (Any, optional) – Expandable list of key value pairs that may be used in child classes.
- Return type:
None
- fmt_bottom(value)[source]
Gets a copy of instance with bottom side set or removed
- Parameters:
value (float, UnitT, optional) – Padding (in
mm
units) or Class UnitT.self (_TAbstractPadding) –
- Returns:
Padding instance
- Return type:
- fmt_left(value)[source]
Gets a copy of instance with left side set or removed
- Parameters:
value (float, UnitT, optional) – Padding (in
mm
units) or Class UnitT.self (_TAbstractPadding) –
- Returns:
Padding instance
- Return type:
- fmt_padding_all(value)[source]
Gets copy of instance with left, right, top, bottom sides set or removed
- fmt_right(value)[source]
Gets a copy of instance with right side set or removed
- Parameters:
value (float, UnitT, optional) – Padding (in
mm
units) or Class UnitT.self (_TAbstractPadding) –
- Returns:
Padding instance
- Return type:
- fmt_top(value)[source]
Gets a copy of instance with top side set or removed
- Parameters:
value (float, Unit100MM, optional) – Padding value
self (_TAbstractPadding) –
- Returns:
Padding instance
- Return type:
- classmethod from_obj(obj)[source]
- classmethod from_obj(obj, **kwargs)
- classmethod from_obj(obj, **kwargs)
Gets Border Padding instance from object
- Parameters:
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
BorderPadding that represents
obj
padding.- Return type:
BorderPadding
- property default: _TAbstractPadding
Gets Padding default.
- Return type:
TypeVar
(_TAbstractPadding
, bound= AbstractPadding)
- property prop_bottom: UnitMM | None
Gets/Sets paragraph bottom padding (in mm units).
- Return type:
UnitMM | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_left: UnitMM | None
Gets/Sets paragraph left padding (in mm units).
- Return type:
UnitMM | None