ooodev.format.writer.direct.para.drop_caps package
Module contents
- class ooodev.format.writer.direct.para.drop_caps.DropCaps(*, count=0, spaces=0.0, lines=3, style=None, whole_word=None)[source]
Bases:
StyleMultiParagraph Drop Caps
New in version 0.9.0.
- __init__(*, count=0, spaces=0.0, lines=3, style=None, whole_word=None)[source]
Constructor
- Parameters:
count (int) – Specifies the number of characters in the drop cap. Must be from
0to255.spaces (float, UnitT) – Specifies the distance between the drop cap in the following text (in
mmunits) or Class UnitT.lines (int) – Specifies the number of lines used for a drop cap. Must be from
0to255.style (StyleCharKind, str, optional) – Specifies the character style name for drop caps.
whole_word (bool, optional) – specifies if Drop Cap is applied to the whole first word.
- Return type:
None
Note
If
count==-1then onlystylecan be updated. Ifcount==0then all other arguments are ignored and instance set to remove drop caps whenapply()is called.
- dispatch_reset()[source]
Resets the cursor at is current position/selection to remove any Drop Caps Formatting using a dispatch command.
- Return type:
None
Example
dc = DropCaps(count=1, style=StyleCharKind.DROP_CAPS) Write.append_para(cursor=cursor, text="Hello World!", styles=(dc,)) dc.dispatch_reset()
- 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
objis not supported.- Returns:
DropCapsinstance that representsobjDrop Caps.- Return type:
- on_property_setting(source, event_args)[source]
Triggers for each property that is set
- Parameters:
source (Any) – Event Source.
event_args (KeyValueCancelArgs) – Event Args
- Return type:
None
- property default: _TDropCaps
Gets
DropCapsdefault.- Return type:
TypeVar(_TDropCaps, bound= DropCaps)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_inner: DropCapStruct | None
Gets Drop Caps Format instance
- Return type:
DropCapStruct | None