ooodev.adapter.table.border_line2_struct_comp module

class ooodev.adapter.table.border_line2_struct_comp.BorderLine2StructComp(component, prop_name, event_provider=None)[source]

Bases: BorderLineStructComp

Border2 Line Struct. A border line, extended with line style.

This class raises an event before and after a property is changed if it has been passed an event provider.

The event raised before the property is changed is called com_sun_star_table_BorderLine_changing. The event raised after the property is changed is called com_sun_star_table_BorderLine_changed.

The event args for before the property is changed is of type KeyValCancelArgs. The event args for after the property is changed is of type KeyValArgs.

__init__(component, prop_name, event_provider=None)[source]

Constructor

Parameters:
  • component (BorderLine) – Border Line 2.

  • prop_name (str) – Property Name. This value is assigned to the prop_name of event_data.

  • event_provider (EventsT, optional) – Event Provider.

Return type:

None

copy()[source]

Makes a copy of the Border Line.

Returns:

Copied Border Line.

Return type:

BorderLine

property component: BorderLine2

BorderLine Component

Return type:

BorderLine2

property line_style: BorderLineStyleEnum

Gets/Sets the style of the border.

When setting the value, it can be set with an int or a BorderLineStyleEnum instance.

Returns:

Border Line Style Enum.

Return type:

BorderLineStyleEnum

Hint

  • BorderLineStyleEnum can be imported from ooo.dyn.table.border_line_style.

property line_width: UnitMM100

Gets/Sets width of the border, this is the base to compute all the lines and gaps widths. These widths computations are based on the line_style property. This property is prevailing on the old Out, In and Dist width from border_line. If this property is set to 0, then the other widths will be used to guess the border width.

Value can be set with a UnitT instance or an int in 1/100 mm units.

Returns:

Line Width.

Return type:

UnitMM100

Hint

  • UnitMM100 can be imported from ooodev.units.unit_mm100.

  • UnitPT can be imported from ooodev.units.unit_pt

  • HAIRLINE is UnitPT(0.05)

  • VERY_THIN is UnitPT(0.5)

  • THIN is UnitPT(0.75)

  • MEDIUM is UnitPT(1.5)

  • THICK is UnitPT(2.25)

  • EXTRA_THICK is UnitPT(4.5)