ooodev.format.inner.partial.font.font_effects_partial module

class ooodev.format.inner.partial.font.font_effects_partial.FontEffectsPartial(factory_name, component, lo_inst=None)[source]

Bases: object

Partial class for FontEffects.

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_font_effect(*, color=None, transparency=None, overline=None, underline=None, strike=None, word_mode=None, case=None, relief=None, outline=None, hidden=None, shadowed=None)[source]

Style Font options.

Parameters:
  • color (Color, optional) – The value of the text color. If value is -1 the automatic color is applied.

  • transparency (Intensity, int, optional) – The transparency value from 0 to 100 for the font color.

  • overline (FontLine, optional) – Character overline values.

  • underline (FontLine, optional) – Character underline values.

  • strike (FontStrikeoutEnum, optional) – Determines the type of the strike out of the character.

  • word_mode (bool, optional) – If True, the underline and strike-through properties are not applied to white spaces.

  • case (CaseMapEnum, optional) – Specifies the case of the font.

  • relief (FontReliefEnum, optional) – Specifies the relief of the font.

  • outline (bool, optional) – Specifies if the font is outlined.

  • hidden (bool, optional) – Specifies if the font is hidden.

  • shadowed (bool, optional) – Specifies if the characters are formatted and displayed with a shadow effect.

Raises:

CancelEventError – If the event before_style_font_effect is cancelled and not handled.

Returns:

Font Effects instance or None if cancelled.

Return type:

FontEffectsT | None

Hint

  • CaseMapEnum can be imported from ooo.dyn.style.case_map

  • FontReliefEnum can be imported from ooo.dyn.awt.font_relief

  • FontStrikeoutEnum can be imported from ooo.dyn.awt.font_strikeout

  • FontLine can be imported from ooodev.format.inner.direct.write.char.font.font_effects

  • Intensity can be imported from ooodev.utils.data_type.intensity

  • FontUnderlineEnum can be imported from ooo.dyn.awt.font_underline

style_font_effect_get()[source]

Gets the font effect Style.

Raises:

CancelEventError – If the event before_style_font_effect_get is cancelled and not handled.

Returns:

Font Effect style or None if cancelled.

Return type:

FontEffectsT | None

style_font_effect_line(line=None, color=None, overline=False)[source]

Style Font Underline or Overline.

This method is a subset of style_font_effect() method for convenience.

Parameters:
  • color (Color, optional) – The value of the text color. If value is -1 the automatic color is applied.

  • line (FontUnderlineEnum, optional) – Font Line kind.

  • overline (bool, optional) – If True the line is overline, otherwise it is underline.

Raises:

CancelEventError – If the event before_style_font_effect is cancelled and not handled.

Returns:

Font Effects instance or None if cancelled.

Return type:

FontEffectsT | None

Hint

  • FontUnderlineEnum can be imported from ooo.dyn.awt.font_underline