ooodev.format.proto.calc.borders.borders_t module

protocol ooodev.format.proto.calc.borders.borders_t.BordersT[source]

Bases: StyleMultiT, Protocol

Borders Protocol

Classes that implement this protocol must have the following methods / attributes:

__init__(*, right=Ellipsis, left=Ellipsis, top=Ellipsis, bottom=Ellipsis, border_side=Ellipsis, vertical=Ellipsis, horizontal=Ellipsis, distance=Ellipsis, diagonal_down=Ellipsis, diagonal_up=Ellipsis, shadow=Ellipsis, padding=Ellipsis)[source]

Constructor

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

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

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

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

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

  • horizontal (Side, optional) – Specifies the line style of horizontal lines for the inner part of a cell range.

  • vertical (Side, optional) – Specifies the line style of vertical lines for the inner part of a cell range.

  • distance (float, UnitT, optional) – Contains the distance between the lines and other contents in mm units or Class UnitT.

  • diagonal_down (Side, optional) – Specifies the line style from top-left to bottom-right diagonal.

  • diagonal_up (Side, optional) – Specifies the line style from bottom-left to top-right diagonal.

  • shadow (Shadow, optional) – Cell Shadow.

  • padding (padding, optional) – Cell padding.

Return type:

None

Hint

Side, Shadow and Padding can be imported from ooodev.format.calc.direct.cell.borders

fmt_border_side(value)[source]

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

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_bottom(value)[source]

Gets copy of instance with bottom set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_diagonal_down(value)[source]

Gets copy of instance with diagonal down set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_diagonal_up(value)[source]

Gets copy of instance with diagonal up set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_distance(value)[source]

Gets copy of instance with distance set or removed

Parameters:

value (float, UnitT, optional) – Distance value

Returns:

Borders instance

Return type:

Borders

fmt_horizontal(value)[source]

Gets copy of instance with horizontal set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_left(value)[source]

Gets copy of instance with left set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_padding(value)[source]

Gets copy of instance with padding set or removed

Parameters:

value (Padding, optional) – Padding value

Returns:

Borders instance

Return type:

Borders

fmt_right(value)[source]

Gets copy of instance with right set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_shadow(value)[source]

Gets copy of instance with shadow set or removed

Parameters:

value (Shadow, optional) – Shadow value

Returns:

Borders instance

Return type:

Borders

fmt_top(value)[source]

Gets copy of instance with top set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

fmt_vertical(value)[source]

Gets copy of instance with vertical set or removed

Parameters:

value (Side, optional) – Side value

Returns:

Borders instance

Return type:

Borders

from_obj(obj: Any) BordersT
from_obj(obj: Any, **kwargs) BordersT
from_obj(**kwds)

Helper for @overload to raise when called.

__protocol_attrs__ = {'add_event_listener', 'add_event_observer', 'apply', 'backup', 'copy', 'default', 'empty', 'fmt_border_side', 'fmt_bottom', 'fmt_diagonal_down', 'fmt_diagonal_up', 'fmt_distance', 'fmt_horizontal', 'fmt_left', 'fmt_padding', 'fmt_right', 'fmt_shadow', 'fmt_top', 'fmt_vertical', 'from_obj', 'get_attrs', 'get_props', 'get_update_obj', 'has_update_obj', 'on_applied', 'on_applying', 'on_property_backed_up', 'on_property_backing_up', 'on_property_restore_set', 'on_property_restore_setting', 'on_property_set', 'on_property_set_error', 'prop_format_kind', 'prop_has_attribs', 'prop_has_backup', 'prop_inner_border_table', 'prop_inner_diagonal_dn', 'prop_inner_diagonal_up', 'prop_inner_padding', 'prop_inner_shadow', 'prop_parent', 'remove_event_listener', 'remove_event_observer', 'restore', 'set_update_obj', 'support_service', 'update'}
property default: BordersT

Gets Default Border.

Return type:

BordersT

property empty: BordersT

Gets Empty Border. When style is applied formatting is removed.

Return type:

BordersT

property prop_inner_border_table: TableBorderStruct

Gets border table instance

Return type:

TableBorderStruct

property prop_inner_diagonal_dn: Side | None

Gets inner Diagonal down instance

Return type:

Side | None

property prop_inner_diagonal_up: Side | None

Gets inner Diagonal up instance

Return type:

Side | None

property prop_inner_padding: Padding

Gets Padding instance

Return type:

Padding

property prop_inner_shadow: Shadow | None

Gets inner shadow instance

Return type:

Shadow | None