ooodev.format.inner.partial.numbers.numbers_numbers_partial module

class ooodev.format.inner.partial.numbers.numbers_numbers_partial.NumbersNumbersPartial(factory_name, component, lo_inst=None)[source]

Bases: object

Partial class for Numbers Numbers.

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_numbers_boolean()[source]

Style numbers boolean.

Return type:

NumbersT | None

style_numbers_currency()[source]

Style numbers currency.

Return type:

NumbersT | None

style_numbers_date()[source]

Style numbers date.

Return type:

NumbersT | None

style_numbers_datetime()[source]

Style numbers datetime.

Return type:

NumbersT | None

style_numbers_fraction()[source]

Style numbers fraction.

Return type:

NumbersT | None

style_numbers_general()[source]

Style numbers general.

Return type:

NumbersT | None

style_numbers_number()[source]

Style numbers number.

Return type:

NumbersT | None

style_numbers_numbers(num_format=0, num_format_index=-1, lang_locale=None)[source]

Style numbers numbers.

Parameters:
  • num_format (NumberFormatEnum, int, optional) – Type of a number format. Use this to select a default format. Defaults to 0 (General Format). Only used if num_format_index is -1 (omitted).

  • num_format_index (NumberFormatIndexEnum, int, optional) – Index of a number format. The enumeration values represent the built-in number formats. Defaults to -1.

  • lang_locale (Locale, optional) – Locale of the number format. Defaults to None which used current Locale.

Raises:

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

Returns:

Style Numbers instance or None if cancelled.

Return type:

NumbersT | None

Hint

  • NumberFormatEnum can be imported from ooo.dyn.util.number_format

  • NumberFormatIndexEnum can be imported from ooo.dyn.i18n.number_format_index

  • Locale can be imported from ooo.dyn.lang.locale

style_numbers_numbers_get()[source]

Gets the Numbers Style.

Raises:

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

Returns:

Numbers style or None if cancelled.

Return type:

NumbersT | None

style_numbers_numbers_get_from_index(idx, locale=None)[source]

Gets the Numbers Style.

Raises:

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

Returns:

Numbers style or None if cancelled.

Return type:

NumbersT | None

Parameters:
  • idx (int) –

  • locale (Locale | None) –

Hint

  • Locale can be imported from ooo.dyn.lang.locale

style_numbers_numbers_get_from_str(nf_str, locale=None, auto_add=False)[source]

Gets the Numbers Style.

Parameters:
  • nf_str (str) – Format string.

  • lang_locale (Locale, optional) – Locale. Defaults to None.

  • auto_add (bool, optional) – If True, format string will be added to document if not found. Defaults to False.

  • source_format (bool, optional) – If True, the number format will be linked to the source format. Defaults to False.

  • locale (Locale | None) –

Raises:

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

Returns:

Numbers style or None if cancelled.

Return type:

NumbersT | None

Hint

  • Locale can be imported from ooo.dyn.lang.locale

style_numbers_percent()[source]

Style numbers percent.

Return type:

NumbersT | None

style_numbers_scientific()[source]

Style numbers scientific.

Return type:

NumbersT | None

style_numbers_time()[source]

Style numbers time.

Return type:

NumbersT | None