ooodev.format.inner.partial.calc.borders.calc_borders_partial module
- class ooodev.format.inner.partial.calc.borders.calc_borders_partial.CalcBordersPartial(factory_name, component, lo_inst=None)[source]
Bases:
object
Partial class for Calc Borders.
- Parameters:
factory_name (str) –
component (Any) –
lo_inst (LoInst | None) –
- __init__(factory_name, component, lo_inst=None)[source]
- Parameters:
factory_name (str) –
component (Any) –
lo_inst (LoInst | None) –
- Return type:
None
- style_borders(*, right=None, left=None, top=None, bottom=None, border_side=None, vertical=None, horizontal=None, distance=None, diagonal_down=None, diagonal_up=None, shadow=None, padding=None)[source]
Style Borders.
- 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.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.
- Raises:
CancelEventError – If the event
before_style_calc_borders
is cancelled and not handled.- Returns:
Border instance or
None
if cancelled.- Return type:
BordersT | None
Hint
Side
,Shadow
andPadding
can be imported fromooodev.format.calc.direct.cell.borders
BorderLineKind
can be imported fromooodev.format.calc.direct.cell.borders
LineSize
can be imported fromooodev.format.calc.direct.cell.borders
- style_borders_default()[source]
Style default border.
- Returns:
Border instance or
None
if cancelled.- Return type:
BordersT | None
- style_borders_get()[source]
Gets the Borders Style.
- Raises:
CancelEventError – If the event
before_style_calc_borders_get
is cancelled and not handled.- Returns:
border style or
None
if cancelled.- Return type:
BordersT | None
- style_borders_sides(*, line=None, color=None, width=None, distance=None, shadow=None, padding=None, hori=False, vert=False)[source]
Style All border to specified line properties. This method is a subset of
style_borders()
method for convenience.- 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
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 (padding, optional) – Cell padding.
hori (bool, optional) – If
True
then horizontal lines are also styled.vert (bool, optional) – If
True
then vertical lines are also styled.
- Raises:
CancelEventError – If the event
before_style_calc_borders
is cancelled and not handled.- Returns:
Font Effects instance or
None
if cancelled.- Return type:
BordersT | None
Hint
Shadow
andPadding
can be imported fromooodev.format.calc.direct.cell.borders
BorderLineKind
can be imported fromooodev.format.calc.direct.cell.borders
LineSize
can be imported fromooodev.format.calc.direct.cell.borders