ooodev.format.inner.direct.structs.side module
Module for table side (BorderLine2
) struct.
New in version 0.9.0.
- class ooodev.format.inner.direct.structs.side.BorderLineKind(value)[source]
Bases:
IntEnum
Enum of Const Class BorderLineStyle
- BORDER_LINE_STYLE_MAX = 17
Maximum valid border line style value.
- DASHED = 2
Dashed border line.
- DASH_DOT = 16
Line consisting of a repetition of one dash and one dot.
- DASH_DOT_DOT = 17
Line consisting of a repetition of one dash and 2 dots.
- DOTTED = 1
Dotted border line.
- DOUBLE = 3
Double border line.
Widths of the lines and the gap are all equal, and vary equally with the total width.
- DOUBLE_THIN = 15
Double border line consisting of two fixed thin lines separated by a variable gap.
- EMBOSSED = 10
3D embossed border line.
- ENGRAVED = 11
3D engraved border line.
- FINE_DASHED = 14
Finely dashed border line.
- INSET = 13
Inset border line.
- NONE = 32767
No border line.
- OUTSET = 12
Outset border line.
- SOLID = 0
Solid border line.
- THICKTHIN_LARGEGAP = 9
Double border line with a thick line outside and a thin line inside separated by a large gap.
- THICKTHIN_MEDIUMGAP = 8
Double border line with a thick line outside and a thin line inside separated by a medium gap.
- THICKTHIN_SMALLGAP = 7
Double border line with a thick line outside and a thin line inside separated by a small gap.
- THINTHICK_LARGEGAP = 6
Double border line with a thin line outside and a thick line inside separated by a large gap.
- THINTHICK_MEDIUMGAP = 5
Double border line with a thin line outside and a thick line inside separated by a medium gap.
- THINTHICK_SMALLGAP = 4
Double border line with a thin line outside and a thick line inside separated by a small gap.
- class ooodev.format.inner.direct.structs.side.LineSize(value)[source]
Bases:
Enum
Line Size Options
- get_value_pt()[source]
Gets instance value in
pt
(point) units.- Returns:
Value in
pt
units.- Return type:
float
- EXTRA_THICK = (5, 4.5)
4.5pt
- HAIRLINE = (1, 0.05)
0.05pt
- MEDIUM = (4, 1.5)
1.5pt
- THICK = (4, 2.25)
2.25pt
- THIN = (3, 0.75)
0.75pt
- VERY_THIN = (2, 0.5)
0.5pt
- class ooodev.format.inner.direct.structs.side.Side(*, line=BorderLineKind.SOLID, color=0, width=LineSize.THIN)[source]
Bases:
StructBase
Side struct.
Represents one side of a border.
New in version 0.9.0.
- __init__(*, line=BorderLineKind.SOLID, color=0, width=LineSize.THIN)[source]
Constructs Side
- Parameters:
line (BorderLineStyleEnum, optional) – Line Style of the border. Default
BorderLineKind.SOLID
.color (
Color
, optional) – Color of the border. DefaultStandardColor.BLACK
width (LineSize, float, UnitT, optional) – Contains the width in of a single line or the width of outer part of a double line (in
pt
units) or Class UnitT. If this value is zero, no line is drawn. DefaultLineSize.THIN
- Raises:
ValueError – if
color
,width
orwidth_inner
is less than0
.- Return type:
None
- apply(obj: Any)[source]
- apply(obj, **kwargs)
Applies style to object
- Parameters:
obj (object) – Object to apply style to.
- Return type:
None
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Gets a copy of instance as a new instance
- Return type:
TypeVar
(_TSide
, bound= Side)- Parameters:
self (_TSide) –
- fmt_style(value)[source]
Gets copy of instance with style set.
- Parameters:
value (BorderLineStyleEnum) – style value
self (_TSide) –
- Returns:
Side with style set
- Return type:
- fmt_width(value)[source]
Gets copy of instance with width set.
- Parameters:
value (float) – width value
self (_TSide) –
- Returns:
Side with width set
- Return type:
- 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 from object
- Return type:
- classmethod from_uno_struct(border)[source]
- classmethod from_uno_struct(border, **kwargs)
- classmethod from_uno_struct(border, **kwargs)
Gets instance that is populated from UNO
BorderLine2
.- Parameters:
border (BorderLine2) – UNO struct
- Returns:
instance.
- Return type:
- get_uno_struct()[source]
Gets UNO
BorderLine2
from instance.- Returns:
BorderLine2
instance- Return type:
BorderLine2
- get_uno_struct_border_line()[source]
Gets UNO
BorderLine
from instance.- Returns:
BorderLine
instance- Return type:
BorderLine
- property empty: _TSide
Gets an empty side. When applied formatting is removed
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_dash_dot: _TSide
Gets instance with line consisting of a repetition of one dash and one dot.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_dash_dot_dot: _TSide
Gets instance with line consisting of a repetition of one dash and 2 dots.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_dashed: _TSide
Gets instance with dashed borderline
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_dotted: _TSide
Gets instance with dotted borderline
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_double: _TSide
Gets instance with double borderline
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_double_thin: _TSide
Gets instance with Double borderline consisting of two fixed thin lines separated by a variable gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_embossed: _TSide
Gets instance with 3D embossed borderline.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_engraved: _TSide
Gets instance with 3D engraved borderline.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_fine_dashed: _TSide
Gets instance with finely dashed borderline.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_inset: _TSide
Gets instance with inset borderline.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_none: _TSide
Gets instance with no borderline
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_outset: _TSide
Gets instance with outset borderline.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_solid: _TSide
Gets instance with solid borderline
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thick_thin_large_gap: _TSide
Gets instance with double borderline with a thick line outside and a thin line inside separated by a large gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thick_thin_medium_gap: _TSide
Gets instance with double borderline with a thick line outside and a thin line inside separated by a medium gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thick_thin_small_gap: _TSide
Gets instance with double borderline with a thick line outside and a thin line inside separated by a small gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thin_thick_large_gap: _TSide
Gets instance with double borderline with a thin line outside and a thick line inside separated by a large gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thin_thick_medium_gap: _TSide
Gets instance with double borderline with a thin line outside and a thick line inside separated by a medium gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property line_thin_thick_small_gap: _TSide
Gets instance with double borderline with a thin line outside and a thick line inside separated by a small gap.
- Return type:
TypeVar
(_TSide
, bound= Side)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_line: BorderLineKind
Gets borderline style
- Return type:
- property prop_width: UnitPT
Gets borderline Width.
Contains the width of a single line or the width of outer part of a double line (in
pt
units). If this value is zero, no line is drawn.- Return type:
- property property_name: str
Gets/Sets property name
This is the name of the property that the side should be applied to. Such as
LeftBorder
,RightBorder
etc.- Return type:
str