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

Module for managing paragraph hyphenation.

New in version 0.9.0.

class ooodev.format.inner.direct.write.para.text_flow.hyphenation.Hyphenation(*, auto=None, no_caps=None, start_chars=None, end_chars=None, max=None)[source]

Bases: StyleBase

Paragraph Hyphenation

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__(*, auto=None, no_caps=None, start_chars=None, end_chars=None, max=None)[source]

Constructor

Parameters:
  • auto (bool, optional) – Hyphenate automatically.

  • no_caps (bool, optional) – Don’t hyphenate word in caps.

  • start_chars (int, optional) – Characters at line begin.

  • end_chars (int, optional) – characters at line end.

  • max (int, optional) – Maximum consecutive hyphenated lines.

Return type:

None

Note

If argument auto is False then all other argument have no effect.

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

Applies hyphenation properties to obj

Parameters:

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

Return type:

None

fmt_auto(value)[source]

Gets copy of instance with auto set or removed

Parameters:
  • value (bool | None) – auto value

  • self (_THyphenation) –

Returns:

Hyphenation instance

Return type:

Hyphenation

fmt_end_chars(value)[source]

Gets copy of instance with end chars set or removed

Parameters:
  • value (bool | None) – end chars value

  • self (_THyphenation) –

Returns:

Hyphenation instance

Return type:

Hyphenation

fmt_max_chars(value)[source]

Gets copy of instance with max set or removed

Parameters:
  • value (bool | None) – max value

  • self (_THyphenation) –

Returns:

Hyphenation instance

Return type:

Hyphenation

fmt_no_caps(value)[source]

Gets copy of instance with no caps set or removed

Parameters:
  • value (bool | None) – no caps value

  • self (_THyphenation) –

Returns:

Hyphenation instance

Return type:

Hyphenation

fmt_start_chars(value)[source]

Gets copy of instance with start chars set or removed

Parameters:
  • value (bool | None) – start chars value

  • self (_THyphenation) –

Returns:

Hyphenation instance

Return type:

Hyphenation

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:

Hyphenation instance that represents obj hyphenation properties.

Return type:

Hyphenation

property auto: _THyphenation

Gets instance with Hyphenate automatically set to True.

Return type:

TypeVar(_THyphenation, bound= Hyphenation)

property default: _THyphenation

Gets Hyphenation default. Static Property.

Return type:

TypeVar(_THyphenation, bound= Hyphenation)

property no_caps: _THyphenation

Gets instance with no caps set to True.

Return type:

TypeVar(_THyphenation, bound= Hyphenation)

property prop_auto: bool | None

Gets/Sets Hyphenate automatically.

Return type:

bool | None

property prop_end_chars: int | None

Gets/Sets number of characters at line end.

Return type:

int | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_max: int | None

Gets/Sets maximum consecutive hyphenated lines.

Return type:

int | None

property prop_no_caps: bool | None

Gets/Sets if hyphenate word in caps.

Return type:

bool | None

property prop_start_chars: int | None

Gets/Sets number of characters at line begin.

Return type:

int | None