ooodev.format.writer.modify.para.drop_caps package

Module contents

class ooodev.format.writer.modify.para.drop_caps.DropCaps(*, count=0, spaces=0.0, lines=3, style=None, whole_word=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Bases: ParaStyleBaseMulti

Paragraph Style Drop Caps

New in version 0.9.0.

__init__(*, count=0, spaces=0.0, lines=3, style=None, whole_word=None, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Constructor

Parameters:
  • count (int) – Specifies the number of characters in the drop cap. Must be from 0 to 255.

  • spaces (float, UnitT) – Specifies the distance between the drop cap in the following text (in mm units) or Class UnitT.

  • lines (int) – Specifies the number of lines used for a drop cap. Must be from 0 to 255.

  • 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.

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default ParagraphStyles.

Return type:

None

classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Gets instance from Document.

Parameters:
  • doc (Any) – UNO Document Object.

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default ParagraphStyles.

Returns:

DropCaps instance from document properties.

Return type:

DropCaps

property prop_inner: DropCaps

Gets/Sets Inner Drop Caps instance

Return type:

DropCaps

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str