ooodev.format.writer.direct.para.indent_space package
Module contents
- class ooodev.format.writer.direct.para.indent_space.Indent(*, before=None, after=None, first=None, auto=None)[source]
Bases:
StyleBase
Paragraph Indent
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__(*, before=None, after=None, first=None, auto=None)[source]
Constructor
- Parameters:
before (float, UnitT, optional) – Determines the left margin of the paragraph (in
mm
units) or Class UnitT.after (float, UnitT, optional) – Determines the right margin of the paragraph (in
mm
units) or Class UnitT.first (float, UnitT, optional) – specifies the indent for the first line (in
mm
units) or Class UnitT.auto (bool, optional) – Determines if the first line should be indented automatically.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj: Any, **kwargs)
- apply(obj, **kwargs)
Applies writing mode to
obj
- Parameters:
obj (object) – UNO object.
- Return type:
None
- fmt_after(value)[source]
Gets a copy of instance with after margin set or removed
- Parameters:
value (float, UnitT, optional) – Margin value (in mm units) or Class UnitT.
self (_TIndent) –
- Returns:
Indent instance
- Return type:
- fmt_auto(value)[source]
Gets a copy of instance with auto set or removed
- Parameters:
value (bool | None) – Auto value.
self (_TIndent) –
- Returns:
Indent instance
- Return type:
- fmt_before(value)[source]
Gets a copy of instance with before margin set or removed
- Parameters:
value (float, UnitT, optional) – Margin value (in
mm
units) or Class UnitT.self (_TIndent) –
- Returns:
Indent instance
- Return type:
- fmt_first(value)[source]
Gets a copy of instance with first indent margin set or removed
- Parameters:
value (float, UnitT, optional) – Margin value (in mm units) or Class UnitT.
self (_TIndent) –
- Returns:
Indent 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:
Indent
instance that representsobj
writing mode.- Return type:
- property auto: _TIndent
Gets copy of instance with auto set
- Return type:
TypeVar
(_TIndent
, bound= Indent)
- property default: _TIndent
Gets
Indent
default.- Return type:
TypeVar
(_TIndent
, bound= Indent)
- property prop_after: UnitMM | None
Gets/Sets the right margin of the paragraph (in mm units).
- Return type:
UnitMM | None
- property prop_auto: bool | None
Gets/Sets if the first line should be indented automatically
- Return type:
bool | None
- property prop_before: UnitMM | None
Gets/Sets the left margin of the paragraph (in mm units).
- Return type:
UnitMM | None
- property prop_first: UnitMM | None
Gets/Sets the indent for the first line (in mm units).
- Return type:
UnitMM | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- class ooodev.format.writer.direct.para.indent_space.LineSpacing(*, mode=None, value=0, active_ln_spacing=None)[source]
Bases:
StyleMulti
Paragraph Line Spacing
Any properties starting with
prop_
set or get current instance values.- __init__(*, mode=None, value=0, active_ln_spacing=None)[source]
Constructor
- Parameters:
mode (ModeKind, optional) – Determines the mode that is used to apply units.
value (Real, UnitT, optional) – Value of line spacing. Only applies when
ModeKind
isPROPORTIONAL
,AT_LEAST
,LEADING
, orFIXED
.active_ln_spacing (bool, optional) – Determines active page line-spacing.
- Return type:
None
Note
If
ModeKind
isSINGLE
,LINE_1_15
,LINE_1_5
, orDOUBLE
thenvalue
is ignored.If
ModeKind
isAT_LEAST
,LEADING
, orFIXED
thenvalue
is a float (in mm units
) or Class UnitTIf
ModeKind
isPROPORTIONAL
then value is an int representing percentage. For example95
equals95%
,130
equals130%
- apply(obj: Any)[source]
- apply(obj, **kwargs)
Applies writing mode 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:
LineSpacing
instance that representsobj
line spacing.- Return type:
- property default: _TLineSpacing
Gets
LineSpacing
default.- Return type:
TypeVar
(_TLineSpacing
, bound= LineSpacing)
- property prop_active_ln_spacing: bool | None
Gets/Sets active page line-spacing.
- Return type:
bool | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_inner: LineSpacingStruct
Gets Line Spacing instance
- Return type:
- property prop_mode: ModeKind | None
Gets the mode that is used to apply units.
- Return type:
ModeKind | None
- property prop_value: int | float | None
Gets the Value of line spacing.
- Return type:
int | float | None
- class ooodev.format.writer.direct.para.indent_space.Spacing(*, above=None, below=None, style_no_space=None)[source]
Bases:
StyleBase
Paragraph Spacing
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__(*, above=None, below=None, style_no_space=None)[source]
Constructor
- Parameters:
above (float, UnitT, optional) – Determines the top margin of the paragraph (in
mm
units) or Class UnitT.below (float, UnitT, optional) – Determines the bottom margin of the paragraph (in
mm
units) or Class UnitT.style_no_space (bool, optional) – Do not add space between paragraphs of the same style.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj: Any, **kwargs)
- apply(obj, **kwargs)
Applies writing mode to
obj
- Parameters:
obj (object) – UNO object.
- Return type:
None
- fmt_above(value)[source]
Gets a copy of instance with above margin set or removed
- Parameters:
value (float, UnitT, optional) – Margin value (in
mm
units) or Class UnitT.self (_TSpacing) –
- Returns:
Indent instance
- Return type:
- fmt_below(value)[source]
Gets a copy of instance with below margin set or removed
- Parameters:
value (float, UnitT, optional) – Margin value (in
mm
units) or Class UnitT.self (_TSpacing) –
- Returns:
Indent instance
- Return type:
- fmt_style_no_space(value)[source]
Gets a copy of instance with style no spacing set or removed
- Parameters:
value (bool | None) – Auto value.
self (_TSpacing) –
- Returns:
Indent 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:
Spacing
instance that representsobj
spacing.- Return type:
- property default: _TSpacing
Gets
Spacing
default.- Return type:
TypeVar
(_TSpacing
, bound= Spacing)
- property prop_above: UnitMM | None
Gets/Sets the top margin of the paragraph (in
mm
units).- Return type:
UnitMM | None
- property prop_below: UnitMM | None
Gets/Sets the bottom margin of the paragraph (in mm units).
- Return type:
UnitMM | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_style_no_space: bool | None
Gets/Sets if no space between paragraphs of the same style
- Return type:
bool | None
- property style_no_space: _TSpacing
Gets copy of instance with style no spacing set
- Return type:
TypeVar
(_TSpacing
, bound= Spacing)