ooodev.format.calc.modify.page.area package

Module contents

class ooodev.format.calc.modify.page.area.Color(*, color=-1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBaseMulti

Page Style Color.

New in version 0.9.0.

__init__(*, color=-1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • color (Color, optional) – FillColor Color

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

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

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

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

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

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

Returns:

Color instance from document properties.

Return type:

Color

property prop_inner: InnerColor

Gets/Sets Inner Color instance

Return type:

InnerColor

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str

class ooodev.format.calc.modify.page.area.Img(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBaseMulti

Page Style Image

New in version 0.9.0.

__init__(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • bitmap (XBitmap, optional) – Bitmap instance. If name is not already in the Bitmap Table then this property is required.

  • name (str, optional) – Specifies the name of the image. This is also the name that is used to store bitmap in LibreOffice Bitmap Table.

  • mode (ImgStyleKind, optional) – Specifies the image style, tiled, stretched etc. Default ImgStyleKind.TILED.

  • size (SizePercent, SizeMM, optional) – Size in percent (0 - 100) or size in mm units.

  • position (RectanglePoint) – Tiling position of Image.

  • pos_offset (Offset, optional) – Tiling position offset.

  • tile_offset (OffsetColumn, OffsetRow, optional) – The tiling offset.

  • auto_name (bool, optional) – Specifies if name is ensured to be unique. Defaults to False.

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

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

Return type:

None

classmethod from_preset(preset, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets an instance from a preset.

Parameters:
  • preset (PresetImageKind) – Preset.

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

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

Returns:

Img instance from preset.

Return type:

Img

property prop_inner: InnerImg

Gets/Sets Inner Image instance

Return type:

InnerImg

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str