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

Module contents

class ooodev.format.calc.modify.page.page.LayoutSettings(*, layout=None, numbers=None, align_hori=None, align_vert=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBaseMulti

Page Layout Setting style

New in version 0.9.0.

__init__(*, layout=None, numbers=None, align_hori=None, align_vert=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • layout (PageStyleLayout, optional) – Specifies the layout of the page.

  • numbers (NumberingTypeEnum, optional) – Specifies the default numbering type for this page.

  • align_hori (bool | None) – bool | None = None,

  • align_vert (bool | None) – bool | None = None,

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

LayoutSettings instance from document properties.

Return type:

LayoutSettings

property prop_inner: LayoutSettings

Gets/Sets Inner Layout Settings instance

Return type:

LayoutSettings

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str

class ooodev.format.calc.modify.page.page.Margins(*, left=None, right=None, top=None, bottom=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBaseMulti

Page Style Margins

New in version 0.9.0.

__init__(*, left=None, right=None, top=None, bottom=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • left (float, optional) – Left Margin Value in mm units or Class UnitT.

  • right (float, optional) – Right Margin Value in mm units or Class UnitT.

  • top (float, optional) – Top Margin Value in mm units or Class UnitT.

  • bottom (float, optional) – Bottom Margin Value in mm units or Class UnitT.

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

Margins instance from document properties.

Return type:

Margins

property prop_inner: Margins

Gets/Sets Inner Margins instance

Return type:

Margins

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str

class ooodev.format.calc.modify.page.page.PaperFormat(*, size=<ooodev.utils.data_type.size_mm.SizeMM object>, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBaseMulti

Page Style Paper Format

New in version 0.9.0.

__init__(*, size=<ooodev.utils.data_type.size_mm.SizeMM object>, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • size (SizeMM, optional) – Width and height in mm units. Defaults to Letter size in Portrait mode.

  • 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, landscape=False, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from preset

Parameters:
  • preset (PaperFormatKind) – Preset kind

  • landscape (bool, optional) – Specifies if the preset is in landscape mode. Defaults to False.

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

Format from preset

Return type:

PaperFormat

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:

PaperFormat instance from document properties.

Return type:

PaperFormat

property prop_inner: PaperFormat

Gets/Sets Inner Paper Format instance

Return type:

PaperFormat

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str