ooodev.format.inner.direct.write.table.borders.borders module
Module for managing table borders (cells and ranges).
New in version 0.9.0.
- class ooodev.format.inner.direct.write.table.borders.borders.Borders(*, right=None, left=None, top=None, bottom=None, border_side=None, vertical=None, horizontal=None, distance=None, shadow=None, padding=None, merge_adjacent=None)[source]
Bases:
StyleMulti
Table Borders used in styles for table cells and ranges.
Any properties starting with
prop_
set or get current instance values.All methods starting with
fmt_
can be used to chain together properties.See also
New in version 0.9.0.
- __init__(*, right=None, left=None, top=None, bottom=None, border_side=None, vertical=None, horizontal=None, distance=None, shadow=None, padding=None, merge_adjacent=None)[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 ignoredhorizontal (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.shadow (Shadow, optional) – Cell Shadow.
padding (BorderPadding, optional) – Cell padding.
merge_adjacent (bool, optional) – Specifies if adjacent line style are to be merged.
- Return type:
None
Hint
LineSize
can be imported fromooodev.format.writer.direct.char.borders
Padding
can be imported fromooodev.format.inner.direct.calc.border.padding
ShadowFormat
can be imported fromooodev.format.writer.direct.char.borders
Side
can be imported fromooodev.format.writer.direct.char.borders
side
can be imported fromooodev.format.inner.direct.structs.side
ShadowLocation
can be importedfrom ooo.dyn.table.shadow_location
Shadow
can be imported fromooodev.format.inner.direct.calc.border.shadow
See also
- apply(obj: Any)[source]
- apply(obj: Any, **kwargs)
- apply(obj, **kwargs)
Applies padding to
obj
- Parameters:
obj (object) – Object that supports
com.sun.star.style.ParagraphProperties
service.- Return type:
None
- fmt_border_side(value)[source]
Gets copy of instance with left, right, top, bottom sides set or removed
- classmethod from_obj(obj)[source]
- classmethod from_obj(obj, **kwargs)
- classmethod from_obj(obj, **kwargs)
Gets instance from object
- Parameters:
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
Borders
instance that representsobj
border properties.- Return type:
- property default: _TBorders
Gets Default Border.
- Return type:
TypeVar
(_TBorders
, bound= Borders)
- property empty: _TBorders
Gets Empty Border. When style is applied formatting is removed.
- Return type:
TypeVar
(_TBorders
, bound= Borders)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_inner_border_table: TableBorderStruct
Gets inner border table instance
- Return type:
- property prop_inner_padding: TableBorderDistancesStruct
Gets inner Padding as
TableBorderDistancesStruct
instance- Return type:
- property prop_merge_adjacent: bool | None
Gets/Sets merge_adjacent.
- Return type:
bool | None