ooodev.format.inner.direct.write.para.text_flow.flow_options module

Module for managing paragraph Text Flow options.

New in version 0.9.0.

class ooodev.format.inner.direct.write.para.text_flow.flow_options.FlowOptions(*, orphans=None, widows=None, keep=None, no_split=None)[source]

Bases: StyleBase

Paragraph Text Flow Options

Any properties starting with prop_ set or get current instance values.

All methods starting with fmt_ can be used to chain together properties.

New in version 0.9.0.

__init__(*, orphans=None, widows=None, keep=None, no_split=None)[source]

Constructor

Parameters:
  • orphans (int, optional) – Number of Orphan Control Lines.

  • widows (int, optional) – Number Widow Control Lines.

  • keep (bool, optional) – Keep with next paragraph.

  • no_split (bool, optional) – Do not split paragraph.

Return type:

None

Note

When orphans or Windows argument is present then the no_split has no effect.

apply(obj: Any)[source]
apply(obj: Any, **kwargs)
apply(obj, **kwargs)

Applies writing mode to obj

Parameters:

obj (object) – UNO object that supports com.sun.star.style.ParagraphProperties service.

Return type:

None

fmt_keep(value)[source]

Gets a copy of instance with keep set or removed

Parameters:
  • value (bool | None) – keep value.

  • self (_TFlowOptions) –

Returns:

FlowOptions instance

Return type:

FlowOptions

fmt_no_split(value)[source]

Gets a copy of instance with no split set or removed

Parameters:
  • value (bool | None) – no split value.

  • self (_TFlowOptions) –

Returns:

FlowOptions instance

Return type:

FlowOptions

fmt_orphans(value)[source]

Gets a copy of instance with orphans set or removed

Parameters:
  • value (float | None) – orphans value.

  • self (_TFlowOptions) –

Returns:

FlowOptions instance

Return type:

FlowOptions

fmt_widows(value)[source]

Gets a copy of instance with widows set or removed

Parameters:
  • value (float | None) – widows value (in mm units).

  • self (_TFlowOptions) –

Returns:

FlowOptions instance

Return type:

FlowOptions

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:

FlowOptions instance that represents obj writing mode.

Return type:

WritingMode

on_property_setting(source, event_args)[source]

Subscribe to property setting events

Parameters:
  • event_args (KeyValueCancelArgs) – Event Args

  • source (Any) –

property default: _TFlowOptions

Gets FlowOptions default.

Return type:

TypeVar(_TFlowOptions, bound= FlowOptions)

property keep: _TFlowOptions

Gets copy of instance with keep set

Return type:

TypeVar(_TFlowOptions, bound= FlowOptions)

property no_split: _TFlowOptions

Gets copy of instance with no split set

Return type:

TypeVar(_TFlowOptions, bound= FlowOptions)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_keep: bool | None

Gets/Sets Keep with next paragraph.

Return type:

bool | None

property prop_no_split: bool | None

Gets/Sets Do not split paragraph

Return type:

bool | None

property prop_orphans: int | None

Gets/Sets Number of Orphan Control Lines.

Return type:

int | None

property prop_widows: int | None

Gets/Sets Number Widow Control Lines.

Return type:

int | None