ooodev.format.inner.direct.structs.line_spacing_struct module
Module for Shadow format (LineSpacing) struct.
New in version 0.9.0.
- class ooodev.format.inner.direct.structs.line_spacing_struct.LineSpacingStruct(mode=ModeKind.SINGLE, value=0)[source]
Bases:
StructBaseLine Spacing struct
- __init__(mode=ModeKind.SINGLE, value=0)[source]
Constructor
- Parameters:
mode (LineMode, optional) – This value specifies the way the spacing is specified.
value (Real, UnitT, optional) – This value specifies the spacing in regard to Mode.
- Raises:
ValueError – If
valueare less than zero.- Return type:
None
Note
If
LineModeisSINGLE,LINE_1_15,LINE_1_5, orDOUBLEthenvalueis ignored.If
LineModeisAT_LEAST,LEADING, orFIXEDthenvalueis a float (in mm units) or Class UnitTIf
LineModeisPROPORTIONALthen value is an int representing percentage. For example95equals95%,130equals130%
- apply(obj: Any, *, keys: Dict[str, str])[source]
- apply(obj: Any)
- apply(obj, **kwargs)
Applies style to object
- Parameters:
obj (object) – Object that contains a
LineSpacingproperty.keys – (Dict[str, str], optional): key map for properties. Can be
spacingwhich maps toParaLineSpacingby default.
- Events:
- Return type:
None
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Gets a copy of instance as a new instance
- Return type:
TypeVar(_TLineSpacingStruct, bound= LineSpacingStruct)- Parameters:
self (_TLineSpacingStruct) –
- classmethod from_uno_struct(ln_spacing)[source]
- classmethod from_uno_struct(ln_spacing, **kwargs)
- classmethod from_uno_struct(ln_spacing, **kwargs)
Converts a UNO
LineSpacingstruct into aLineSpacingStruct- Parameters:
ln_spacing (UnoLineSpacing) – UNO
LineSpacingobject.- Returns:
LineSpacingStructset with Line spacing properties.- Return type:
- get_attrs()[source]
Gets the attributes that are slated for change in the current instance
- Returns:
Tuple of attributes
- Return type:
Tuple(str, …)
- property default: _TLineSpacingStruct
Gets empty Line Spacing. Static Property.
- Return type:
TypeVar(_TLineSpacingStruct, bound= LineSpacingStruct)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_mode: ModeKind
Gets mode value
- Return type:
ModeKind
- property prop_value: int
Gets the spacing value in regard to Mode
- Return type:
int