ooodev.format.inner.common.abstract.abstract_sides module

Module for managing character border side.

New in version 0.9.0.

class ooodev.format.inner.common.abstract.abstract_sides.AbstractSides(*, left=None, right=None, top=None, bottom=None, all=None)[source]

Bases: StyleMulti

Character Border for use in styles.

Any properties starting with prop_ set or get current instance values.

All methods starting with fmt_ can be used to chain together properties.

New in version 0.9.0.

__init__(*, left=None, right=None, top=None, bottom=None, all=None)[source]

Constructor

Parameters:
  • left (Side, optional) – Determines the line style at the left edge.

  • right (Side, optional) – Determines the line style at the right edge.

  • top (Side, optional) – Determines the line style at the top edge.

  • bottom (Side, optional) – Determines the line style at the bottom edge.

  • all (Side, optional) – Determines the line style at the top, bottom, left, right edges. If this argument has a value then arguments top, bottom, left, right are ignored

Return type:

None

fmt_border_side(value)[source]

Gets copy of instance with left, right, top, bottom sides set or removed

Parameters:
  • value (Side | None) – Side value

  • self (_TAbstractSides) –

Returns:

Sides instance

Return type:

Sides

fmt_bottom(value)[source]

Gets a copy of instance with bottom side set or removed

Parameters:
  • value (Side | None) – Side value

  • self (_TAbstractSides) –

Returns:

Sides instance

Return type:

Sides

fmt_left(value)[source]

Gets a copy of instance with left side set or removed

Parameters:
  • value (Side | None) – Side value

  • self (_TAbstractSides) –

Returns:

Sides instance

Return type:

Sides

fmt_right(value)[source]

Gets a copy of instance with right side set or removed

Parameters:
  • value (Side | None) – Side value

  • self (_TAbstractSides) –

Returns:

Sides instance

Return type:

Sides

fmt_top(value)[source]

Gets a copy of instance with top side set or removed

Parameters:
  • value (Side | None) – Side value

  • self (_TAbstractSides) –

Returns:

Sides instance

Return type:

Sides

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

Gets instance from object properties

Parameters:

obj (object) – UNO object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents BorderLine2.

Return type:

Sides

property prop_bottom: Side | None

Gets bottom value

Return type:

Side | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_left: Side | None

Gets left value

Return type:

Side | None

property prop_right: Side | None

Gets right value

Return type:

Side | None

property prop_top: Side | None

Gets top value

Return type:

Side | None