ooodev.format.inner.direct.structs.drop_cap_struct module
Module for DropCapFormat
struct.
New in version 0.9.0.
- class ooodev.format.inner.direct.structs.drop_cap_struct.DropCapStruct(*, count=0, distance=0, lines=0)[source]
Bases:
StructBase
Paragraph Drop Cap
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__(*, count=0, distance=0, lines=0)[source]
Constructor
- Parameters:
count (int, optional) – Specifies the number of characters in the drop cap. Must be from
0
to255
. Defaults to0
distance (int, UnitT, optional) – Specifies the distance between the drop cap in the following text in
1/100th mm
or Class UnitT. Defaults to0
lines (int, optional) – Specifies the number of lines used for a drop cap. Must be from
0
to255
. Defaults to0
- Return type:
None
Note
If argument
type
isNone
then all other argument are ignored
- apply(obj: Any)[source]
- apply(obj: Any, keys: Dict[str, str])
- apply(obj, **kwargs)
Applies tab properties to
obj
If a DropCap instance with the same position is existing it is updated; Otherwise, a new DropCap is added.
- Parameters:
obj (object) – UNO object.
keys (Dict[str, str], optional) – Property key, value items that map properties.
- Events:
- Return type:
None
- fmt_count(value)[source]
Gets a copy of instance with count set.
- Parameters:
value (int) – Count value.
self (_TDropCapStruct) –
- Returns:
DropCap
instance- Return type:
DropCap
- fmt_distance(value)[source]
Gets a copy of instance with distance set.
- Parameters:
value (int, UnitT) – Distance value in
1/100th mm
or Class UnitT.self (_TDropCapStruct) –
- Returns:
DropCap
instance- Return type:
DropCap
- fmt_lines(value)[source]
Gets a copy of instance with lines set.
- Parameters:
value (int) – Lines value.
self (_TDropCapStruct) –
- Returns:
DropCap
instance- Return type:
DropCap
- 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:
DropCap
instance that representsobj
Drop cap format properties.- Return type:
DropCap
- classmethod from_uno_struct(dcf)[source]
- classmethod from_uno_struct(dcf, **kwargs)
- classmethod from_uno_struct(dcf, **kwargs)
Converts a
DropCapFormat
Stop instance to aDropCap
- Parameters:
dcf (DropCapFormat) – UNO Drop Cap Format
- Returns:
DropCap
set with Drop Cap Format properties- Return type:
DropCap
- get_attrs()[source]
Gets the attributes that are slated for change in the current instance
- Returns:
Tuple of attributes
- Return type:
Tuple(str, …)
- get_uno_struct()[source]
Gets
DropCapFormat
from instance- Returns:
DropCapFormat
instance- Return type:
DropCapFormat
- property prop_count: int
Gets/Sets the number of characters in the drop cap. Must be from 0 to 255.
- Return type:
int
- property prop_distance: UnitMM100
Gets/Sets the distance between the drop cap in the following text.
- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_lines: int
Gets/Sets the number of lines used for a drop cap. Must be from 0 to 255.
- Return type:
int