ooodev.format.inner.direct.structs.size_struct module
- class ooodev.format.inner.direct.structs.size_struct.SizeStruct(width=0.0, height=0.0, all=None)[source]
Bases:
StructBase
Size struct.
Any properties starting with
prop_
set or get current instance values.All methods starting with
fmt_
can be used to chain together Border Table properties.- __init__(width=0.0, height=0.0, all=None)[source]
Constructor
- Parameters:
width (float, UnitT, optional) – Specifies width crop in
mm
units or Class UnitT. Default0.0
.height (float, UnitT, optional) – Specifies height crop in
mm
units or Class UnitT. Default0.0
.all (float, UnitT, optional) – Specifies
width
andheight
inmm
units or Class UnitT. If set all other parameters are ignored.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj, **kwargs)
Applies tab properties to
obj
- Parameters:
obj (object) – UNO object.
- Return type:
None
- fmt_all(value)[source]
Gets copy of instance with width and height set.
- Parameters:
value (float, UnitT) – Specifies crop in
mm
units or Class UnitT.self (_TSizeStruct) –
- Returns:
Border Table
- Return type:
- fmt_height(value)[source]
Gets a copy of instance with height set.
- Parameters:
value (float, UnitT) – Specifies height in
mm
units or Class UnitT.self (_TSizeStruct) –
- Return type:
- fmt_width(value)[source]
Gets a copy of instance with width set.
- Parameters:
value (float, UnitT) – Specifies width in
mm
units or Class UnitT.self (_TSizeStruct) –
- 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:
PropertyNotFoundError – If
obj
does not have required property- Returns:
SizeStruct
instance that representsobj
Size properties.- Return type:
- classmethod from_uno_struct(value)[source]
- classmethod from_uno_struct(value, **kwargs)
- classmethod from_uno_struct(value, **kwargs)
Converts a
Size
instance to aSizeStruct
.- Parameters:
value (Size) – UNO
Size
.- Returns:
SizeStruct
set withSize
properties.- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type: