19#ifndef INCLUDED_SVL_ZFORLIST_HXX
20#define INCLUDED_SVL_ZFORLIST_HXX
22#include <config_options.h>
24#include <rtl/ustrbuf.hxx>
25#include <rtl/ustring.hxx>
28#include <com/sun/star/util/NumberFormat.hpp>
32#include <unordered_map>
38#define SV_COUNTRY_LANGUAGE_OFFSET 10000
39#define SV_MAX_COUNT_STANDARD_FORMATS 100
53 ALL = css::util::NumberFormat::ALL,
56 DEFINED = css::util::NumberFormat::DEFINED,
59 DATE = css::util::NumberFormat::DATE,
62 TIME = css::util::NumberFormat::TIME,
65 CURRENCY = css::util::NumberFormat::CURRENCY,
68 NUMBER = css::util::NumberFormat::NUMBER,
71 SCIENTIFIC = css::util::NumberFormat::SCIENTIFIC,
74 FRACTION = css::util::NumberFormat::FRACTION,
77 PERCENT = css::util::NumberFormat::PERCENT,
80 TEXT = css::util::NumberFormat::TEXT,
86 LOGICAL = css::util::NumberFormat::LOGICAL,
89 UNDEFINED = css::util::NumberFormat::UNDEFINED,
93 EMPTY = css::util::NumberFormat::EMPTY,
98 DURATION = css::util::NumberFormat::DURATION,
293class UNLESS_MERGELIBS(SVL_DLLPUBLIC) NfCurrencyEntry final
296 OUString aBankSymbol;
298 sal_uInt16 nPositiveFormat;
299 sal_uInt16 nNegativeFormat;
313 NfCurrencyEntry(
const css::i18n::Currency & rCurr,
318 bool operator==(
const NfCurrencyEntry& r )
const;
320 const OUString& GetSymbol()
const {
return aSymbol; }
321 const OUString& GetBankSymbol()
const {
return aBankSymbol; }
323 sal_uInt16 GetPositiveFormat()
const {
return nPositiveFormat; }
324 sal_uInt16 GetNegativeFormat()
const {
return nNegativeFormat; }
325 sal_uInt16 GetDigits()
const {
return nDigits; }
333 OUString BuildSymbolString(
bool bBank,
bool bWithoutExtension =
false)
const;
338 sal_uInt16 nDecimalFormat = 1)
const;
340 sal_uInt16 nDecimalFormat = 1)
const;
344 void CompletePositiveFormatString(OUStringBuffer& rStr,
bool bBank,
345 sal_uInt16 nPosiFormat)
const;
346 void CompleteNegativeFormatString(OUStringBuffer& rStr,
bool bBank,
347 sal_uInt16 nNegaFormat)
const;
350 static void CompletePositiveFormatString(OUStringBuffer& rStr,
351 std::u16string_view rSymStr, sal_uInt16 nPosiFormat);
352 static void CompleteNegativeFormatString(OUStringBuffer& rStr,
353 std::u16string_view rSymStr, sal_uInt16 nNegaFormat);
357 static sal_uInt16 GetEffectivePositiveFormat( sal_uInt16 nIntlFormat,
358 sal_uInt16 nCurrFormat,
bool bBank );
359 static sal_uInt16 GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
360 sal_uInt16 nCurrFormat,
bool bBank );
363 static sal_Unicode GetEuroSymbol() {
return u'\x20AC'; }
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
constexpr OUStringLiteral EMPTY
constexpr bool operator==(TypedWhichId< T > const &lhs, TypedWhichId< T > rhs)
constexpr OUStringLiteral PERCENT(u"Percent")
std::vector< OUString > NfWSStringsDtor
std::unordered_map< sal_uInt16, sal_uInt32 > SvNumberFormatterIndexTable
constexpr size_t NF_MAX_FORMAT_SYMBOLS
std::map< sal_uInt32, SvNumberformat * > SvNumberFormatTable
This table is std::map because it needs to preserve insertion order, because the formats are roughly ...
constexpr sal_uInt32 NF_STANDARD_FORMAT_TEXT
The built-in @ Text format, offset within a locale, key in the locale the number formatter was constr...
SvNumFormatType
MAX_ULONG.
@ UNDEFINED
is used as a return value if no format exists.
@ NUMBER
selects decimal number formats.
@ LOGICAL
selects boolean number formats.
@ CURRENCY
selects currency formats.
@ FRACTION
selects number formats for fractions.
@ SCIENTIFIC
selects scientific number formats.
@ DEFINED
selects only user-defined number formats.
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap
NfEvalDateFormat
enum values for <method>SvNumberFormatter::SetEvalDateFormat</method>
@ NF_EVALDATEFORMAT_INTL_FORMAT
First try the DateFormat from International.
@ NF_EVALDATEFORMAT_INTL
DateFormat only from International, default.
@ NF_EVALDATEFORMAT_FORMAT
DateFormat only from date format passed to function (if any).
@ NF_EVALDATEFORMAT_FORMAT_INTL
First try the DateFormat from the date format passed.
NfIndexTableOffset
enum values for <method>SvNumberFormatter::GetFormatIndex</method>
@ NF_DATETIME_SYS_DDMMYYYY_HHMMSS
@ NF_DATETIME_ISO_YYYYMMDDTHHMMSS000
@ NF_CURRENCY_1000DEC2_RED
@ NF_INDEX_TABLE_RESERVED_START
@ NF_CURRENCY_1000DEC2_DASHED
@ NF_DATETIME_ISO_YYYYMMDD_HHMMSS000
@ NF_DATE_SYS_NNNNDMMMMYYYY
@ NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS
@ NF_CURRENCY_1000INT_RED
@ NF_DATETIME_SYS_DDMMYYYY_HHMM
@ NF_DATE_SYS_NNDMMMMYYYY
@ NF_DATETIME_ISO_YYYYMMDD_HHMMSS
@ NF_CURRENCY_1000DEC2_CCC
@ NF_DATETIME_ISO_YYYYMMDDTHHMMSS
@ NF_DATETIME_SYSTEM_SHORT_HHMM
SvNumInputOptions
Input options to be used with IsNumberFormat()
@ LAX_TIME
allow input of minutes or seconds >59
constexpr sal_uInt32 NUMBERFORMAT_ENTRY_NOT_FOUND
#define SV_MAX_COUNT_STANDARD_FORMATS