ooodev.format.inner.direct.write.frame.frame_type.position module

Module for Fill Transparency.

New in version 0.9.0.

class ooodev.format.inner.direct.write.frame.frame_type.position.HoriOrient(value)[source]

Bases: Enum

Horizontal Orientation

CENTER = 2

The object is aligned at the middle.

FROM_LEFT_OR_INSIDE = 0

No hard alignment is applied. When frame is mirrored the value is From Inside; Otherwise, From Left.

LEFT_OR_INSIDE = 3

The object is aligned at the left side. When frame is mirrored the value is Inside; Otherwise, Left.

RIGHT_OR_OUTSIDE = 1

The object is aligned at the right side. When frame is mirrored the value is Outside; Otherwise, Right.

class ooodev.format.inner.direct.write.frame.frame_type.position.Horizontal(position, rel, amount=0.0)[source]

Bases: object

Horizontal Frame Position. Not used when Anchor is set to As Character.

Parameters:
__init__(position, rel, amount=0.0)[source]

Constructor

Parameters:
  • position (HoriOrient) – Specifies Horizontal Position.

  • rel (RelHoriOrient) – Specifies Relative Orientation.

  • amount (float, UnitT, optional) – Specifies Amount in mm units or Class UnitT. Only effective when position is HoriOrient.FROM_LEFT. Defaults to 0.0.

Return type:

None

copy()[source]

Gets a copy of instance as a new instance

Return type:

Horizontal

property amount: UnitMM

Gets/Sets Amount in mm units. Only effective when position is HoriOrient.FROM_LEFT.

Setting also allows Unit100MM instance.

Return type:

UnitMM

property position: HoriOrient

Gets/Sets Horizontal Position.

Return type:

HoriOrient

property rel: RelHoriOrient

Gets/Sets Relative Orientation

Return type:

RelHoriOrient

class ooodev.format.inner.direct.write.frame.frame_type.position.Position(*, horizontal=None, vertical=None, keep_boundaries=None, mirror_even=None)[source]

Bases: StyleBase

Fill Transparency

New in version 0.9.0.

__init__(*, horizontal=None, vertical=None, keep_boundaries=None, mirror_even=None)[source]

Constructor

Parameters:
  • horizontal (Horizontal, optional) – Specifies the Horizontal position options. Not used when Anchor is set to As Character.

  • vertical (Vertical, optional) – Specifies the Vertical position options.

  • keep_boundaries (bool, optional) – Specifies keep inside text boundaries.

  • mirror_even (bool, optional) – Specifies mirror on even pages. Not used when Anchor is set to As Character.

Return type:

None

copy()[source]
copy(**kwargs)
copy(**kwargs)

Gets a copy of instance as a new instance

Return type:

TypeVar(_TPosition, bound= Position)

Parameters:

self (_TPosition) –

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Returns:

Instance that represents Frame Position.

Return type:

Position

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_horizontal: Horizontal | None

Gets/Sets horizontal value

Return type:

Horizontal | None

property prop_keep_boundaries: bool | None

Gets/Sets keep inside text boundaries

Return type:

bool | None

property prop_mirror_even: bool | None

Gets/Sets Mirror on even pages

Return type:

bool | None

property prop_vertical: Vertical | None

Gets/Sets vertical value

Return type:

Vertical | None

class ooodev.format.inner.direct.write.frame.frame_type.position.RelHoriOrient(value)[source]

Bases: Enum

An enumeration.

CHARACTER = 2

As character. Only used when Anchor is set To character.

ENTIRE_PAGE = 7

Page includes margins for page-anchored frames identical with PARAGRAPH_AREA.

LEFT_PAGE_BORDER = 3

Inside the left page margin.

LEFT_PARAGRAPH_BORDER = 5

Inside the left paragraph margin. Only used when Anchor is set To paragraph or To Character.

PAGE_TEXT_AREA = 8

Page without borders (for page anchored frames identical with PARAGRAPH_TEXT_AREA).

PARAGRAPH_AREA = 0

Paragraph, including margins. Only used when Anchor is set To paragraph or To Character.

PARAGRAPH_TEXT_AREA = 1

Paragraph, without margins. Only used when Anchor is set To paragraph or To Character.

RIGHT_PAGE_BORDER = 4

Inside the right page margin

RIGHT_PARAGRAPH_BORDER = 6

Inside the right paragraph margin. Only used when Anchor is set To paragraph or To Character.

class ooodev.format.inner.direct.write.frame.frame_type.position.RelVertOrient(value)[source]

Bases: Enum

An enumeration.

CHARACTER = 2

As character. Only used when Anchor is set To character.

ENTIRE_PAGE_OR_ROW = 7

Page includes margins for page-anchored frames identical with PARAGRAPH_AREA. Only used when Anchor is set To page, To paragraph, To character or As character.

LINE_OF_TEXT = 9

at the top of the text line, only sensible for vertical orientation. Only used when Anchor To character and VertOrient is TOP, BOTTOM, CENTER or FROM_TOP_OR_BOTTOM.

MARGIN = 0

Paragraph, including margins. Only used when Anchor is set To paragraph or To character.

PAGE_TEXT_AREA = 8

Page without borders (for page anchored frames identical with PARAGRAPH_TEXT_AREA). Only used when Anchor is set To page, To paragraph or To character.

PARAGRAPH_TEXT_AREA_OR_BASE_LINE = 1

Paragraph, without margins. Only used when Anchor is set To paragraph, To character or As character.

class ooodev.format.inner.direct.write.frame.frame_type.position.VertOrient(value)[source]

Bases: Enum

Vertical Orientation

BELOW_CHAR = 6

Aligned at the bottom of a character (anchored to character). Only used when Anchor is set To character.

BOTTOM = 3

Aligned at the bottom

CENTER = 2

Aligned at the center

FROM_TOP_OR_BOTTOM = 0

No hard alignment. From Top is only used when Anchor is To character. From Bottom is only used when Anchor is To character or As character.

TOP = 1

Aligned at the top

class ooodev.format.inner.direct.write.frame.frame_type.position.Vertical(position, rel, amount=0.0)[source]

Bases: object

Vertical Frame Position.

Parameters:
__init__(position, rel, amount=0.0)[source]

Constructor

Parameters:
  • position (VertOrient) – Specifies Vertical Position.

  • rel (RelVertOrient) – Specifies Relative Orientation.

  • amount (float, UnitT, optional) – Specifies Amount in mm units or Class UnitT. Only effective when position is VertOrient.FROM_TOP. Defaults to 0.0.

Return type:

None

copy()[source]

Gets a copy of instance as a new instance

Return type:

Vertical

property amount: UnitMM

Gets/Sets Amount in mm units. Only effective when position is VertOrient.FROM_TOP.

Setting also allows Unit100MM instance.

Return type:

UnitMM

property position: VertOrient

Gets/Sets Vertical Position.

Return type:

VertOrient

property rel: RelVertOrient

Gets/Sets Relative Orientation

Return type:

RelVertOrient