ooodev.format.inner.direct.write.char.highlight.highlight module

Module for handling character highlight.

New in version 0.9.0.

class ooodev.format.inner.direct.write.char.highlight.highlight.Highlight(color=-1)[source]

Bases: StyleBase

Character Highlighting

New in version 0.9.0.

__init__(color=-1)[source]

Constructor

Parameters:

color (Color, optional) – Highlight Color. A value of -1 Set color to Transparent.

Return type:

None

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

Applies padding to obj

Parameters:

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

Return type:

None

fmt_color(value)[source]

Gets copy of instance with color set.

Parameters:
  • value (Color) – color value. If value is less than zero it means no color.

  • self (_THighlight) –

Returns:

Highlight instance

Return type:

Highlight

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets Highlight instance from object

Parameters:

obj (object) – UNO object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Highlight that represents obj Highlight.

Return type:

Highlight

property empty: _THighlight

Gets Highlight empty.

Return type:

TypeVar(_THighlight, bound= Highlight)

property prop_color: Color

Gets/Sets color

Return type:

NewType()(Color, int)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind