ooodev.format.inner.partial.write.numbers.numbers_numbers_partial module
- class ooodev.format.inner.partial.write.numbers.numbers_numbers_partial.NumbersNumbersPartial(factory_name, component, lo_inst=None)[source]
Bases:
objectPartial 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_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_indexis-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
Nonewhich used current Locale.
- Raises:
CancelEventError – If the event
before_style_number_numberis cancelled and not handled.- Returns:
Style Numbers instance or
Noneif cancelled.- Return type:
NumbersT | None
Hint
NumberFormatEnumcan be imported fromooo.dyn.util.number_formatNumberFormatIndexEnumcan be imported fromooo.dyn.i18n.number_format_indexLocalecan be imported fromooo.dyn.lang.locale
- style_numbers_numbers_get()[source]
Gets the Numbers Style.
- Raises:
CancelEventError – If the event
before_style_number_number_getis cancelled and not handled.- Returns:
Numbers style or
Noneif 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_indexis cancelled and not handled.- Returns:
Numbers style or
Noneif cancelled.- Return type:
NumbersT | None
- Parameters:
idx (int) –
locale (Locale | None) –
Hint
Localecan be imported fromooo.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 toFalse.locale (Locale | None) –
- Raises:
CancelEventError – If the event
before_style_number_number_from_indexis cancelled and not handled.- Returns:
Numbers style or
Noneif cancelled.- Return type:
NumbersT | None
Hint
Localecan be imported fromooo.dyn.lang.locale