ooodev.format.inner.direct.structs.table_border_struct module
Module for table border (TableBorder2
) struct
New in version 0.9.0.
- class ooodev.format.inner.direct.structs.table_border_struct.TableBorderStruct(*, left=None, right=None, top=None, bottom=None, border_side=None, vertical=None, horizontal=None, distance=None)[source]
Bases:
StructBase
Table Border struct positioning 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 Border Table properties.- __init__(*, left=None, right=None, top=None, bottom=None, border_side=None, vertical=None, horizontal=None, distance=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.
border_side (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 ignoredhorizontal (Side, optional) – Determines the line style of horizontal lines for the inner part of a cell range.
vertical (Side, optional) – Determines 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.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj, **kwargs)
Applies Style to obj
- Parameters:
obj (object) – UNO object
- Events:
- Raises:
PropertyNotFoundError – If
obj
does not haveTableBorder2
property.- 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 (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_bottom(value)[source]
Gets a copy of instance with bottom side set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_distance(value)[source]
Gets a copy of instance with distance set or removed
- Parameters:
value (float | UnitT | None) – Distance value in
mm
units or Class UnitT.self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_horizontal(value)[source]
Gets a copy of instance with horizontal side set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_left(value)[source]
Gets a copy of instance with left side set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_right(value)[source]
Gets a copy of instance with right side set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_top(value)[source]
Gets a copy of instance with top side set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- fmt_vertical(value)[source]
Gets a copy of instance with top vertical set or removed
- Parameters:
value (Side | None) – Side value
self (_TTableBorderStruct) –
- Returns:
Border Table
- Return type:
BorderTable
- 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:
PropertyNotFoundError – If
obj
does not have required property.- Returns:
Border Table.
- Return type:
BorderTable
- get_uno_struct()[source]
Gets UNO
TableBorder2
from instance.- Returns:
TableBorder2
instance- Return type:
TableBorder2
- get_uno_struct_table_border()[source]
Gets UNO
TableBorder
from instance.- Returns:
TableBorder
instance- Return type:
TableBorder
- property prop_distance: UnitMM | None
Gets/Sets distance value (
in mm
units)- Return type:
UnitMM | None
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type: