ooodev.format.draw.modify.indent_space package
Submodules
Module contents
- class ooodev.format.draw.modify.indent_space.Indent(*, before=None, after=None, first=None, auto=None, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Bases:
ParaStyleBaseMultiIndent Style values.
See also
New in version 0.17.12.
- __init__(*, before=None, after=None, first=None, auto=None, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Constructor
- Parameters:
before (float, UnitT, optional) – Determines the left margin of the paragraph (in
mmunits) or Class UnitT.after (float, UnitT, optional) – Determines the right margin of the paragraph (in
mmunits) or Class UnitT.first (float, UnitT, optional) – specifies the indent for the first line (in
mmunits) or Class UnitT.auto (bool, optional) – Determines if the first line should be indented automatically. See note below.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is Default
standardStyle.style_family (str, DrawStyleFamilyKind, optional) – Family Style. Defaults to
graphics.
- Return type:
None
Note
The
autoargument is suppose to set the stylesParaIsAutoFirstLineIndentproperty. TheParaIsAutoFirstLineIndentis suppose to be part of thecom.sun.star.style.ParagraphPropertiesservice; However, for some reason it is missing for Draw styles. Setting thisautoargument will result in a print warning message in verbose mode. It is better to not set this argument. It is left in just in case it starts working in the future.There is a option in the Indent and Spacing dialog
Automatic. It seems to work, but it is not clear how it is implemented. It is not clear if it is a style property.See also
- classmethod from_style(doc, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is
FamilyGraphics.DEFAULT_DRAWING_STYLE.style_family (DrawStyleFamilyKind, str, optional) – Style family. Default
DrawStyleFamilyKind.GRAPHICS.
- Returns:
Indentinstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.draw.modify.indent_space.LineSpacing(*, mode=None, value=0, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Bases:
ParaStyleBaseMultiLine Spacing Style values.
See also
New in version 0.17.12.
- __init__(*, mode=None, value=0, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Constructor
- Parameters:
mode (ModeKind, optional) – Determines the mode that is used to apply units.
value (Real, UnitT, optional) – Value of line spacing. Only applies when
ModeKindisPROPORTIONAL,AT_LEAST,LEADING, orFIXED.style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is Default
standardStyle.style_family (str, DrawStyleFamilyKind, optional) – Family Style. Defaults to
graphics.
- Return type:
None
Note
If
ModeKindisSINGLE,LINE_1_15,LINE_1_5, orDOUBLEthenvalueis ignored.If
ModeKindisAT_LEAST,LEADING, orFIXEDthenvalueis a float (in mm units) or Class UnitTIf
ModeKindisPROPORTIONALthen value is an int representing percentage. For example95equals95%,130equals130%See also
- classmethod from_style(doc, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is
FamilyGraphics.DEFAULT_DRAWING_STYLE.style_family (DrawStyleFamilyKind, str, optional) – Style family. Default
DrawStyleFamilyKind.GRAPHICS.
- Returns:
LineSpacinginstance from document properties.- Return type:
- property prop_inner: LineSpacing
Gets/Sets Inner Font instance
- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.draw.modify.indent_space.Spacing(*, above=None, below=None, style_no_space=None, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Bases:
ParaStyleBaseMultiSpacing Style values.
See also
New in version 0.17.12.
- __init__(*, above=None, below=None, style_no_space=None, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Constructor
- Parameters:
above (float, UnitT, optional) – Determines the top margin of the paragraph (in
mmunits) or Class UnitT.below (float, UnitT, optional) – Determines the bottom margin of the paragraph (in
mmunits) or Class UnitT.style_no_space (bool, optional) – Do not add space between paragraphs of the same style. See note below.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is Default
standardStyle.style_family (str, DrawStyleFamilyKind, optional) – Family Style. Defaults to
graphics.
- Return type:
None
Note
The
style_no_spaceargument is suppose to set the stylesParaContextMarginproperty. TheParaContextMarginis suppose to be part of thecom.sun.star.style.ParagraphPropertiesservice; However, for some reason it is missing for Draw styles. Setting thisstyle_no_spaceargument will result in a print warning message in verbose mode. It is better to not set this argument. It is left in just in case it starts working in the future.There is a option in the Indent and Spacing dialog
Do not add space between paragraphs of the same style. It seems to work, but it is not clear how it is implemented. It is not clear if it is a style property.See also
- classmethod from_style(doc, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is
FamilyGraphics.DEFAULT_DRAWING_STYLE.style_family (DrawStyleFamilyKind, str, optional) – Style family. Default
DrawStyleFamilyKind.GRAPHICS.
- Returns:
Spacinginstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str