LibreOffice Module svl (master) 1
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
zforlist.hxx File Reference
#include <config_options.h>
#include <svl/svldllapi.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <i18nlangtag/lang.h>
#include <com/sun/star/util/NumberFormat.hpp>
#include <unotools/localedatawrapper.hxx>
#include <map>
#include <unordered_map>
Include dependency graph for zforlist.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  o3tl::typed_flags< SvNumFormatType >
 
struct  o3tl::typed_flags< SvNumInputOptions >
 

Namespaces

namespace  com
 
namespace  com::sun
 
namespace  com::sun::star
 
namespace  com::sun::star::i18n
 
namespace  o3tl
 

Macros

#define SV_COUNTRY_LANGUAGE_OFFSET   10000
 
#define SV_MAX_COUNT_STANDARD_FORMATS   100
 

Typedefs

typedef std::map< sal_uInt32, SvNumberformat * > SvNumberFormatTable
 This table is std::map because it needs to preserve insertion order, because the formats are roughly ordered from most to least common, and some parts of the UI want to show them in that order. More...
 
typedef std::unordered_map< sal_uInt16, sal_uInt32 > SvNumberFormatterIndexTable
 
typedef std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap
 
typedef std::vector< OUString > NfWSStringsDtor
 

Enumerations

enum class  SvNumFormatType : sal_Int16 {
  ALL = css::util::NumberFormat::ALL ,
  DEFINED = css::util::NumberFormat::DEFINED ,
  DATE = css::util::NumberFormat::DATE ,
  TIME = css::util::NumberFormat::TIME ,
  CURRENCY = css::util::NumberFormat::CURRENCY ,
  NUMBER = css::util::NumberFormat::NUMBER ,
  SCIENTIFIC = css::util::NumberFormat::SCIENTIFIC ,
  FRACTION = css::util::NumberFormat::FRACTION ,
  PERCENT = css::util::NumberFormat::PERCENT ,
  TEXT = css::util::NumberFormat::TEXT ,
  DATETIME = DATE | TIME ,
  LOGICAL = css::util::NumberFormat::LOGICAL ,
  UNDEFINED = css::util::NumberFormat::UNDEFINED ,
  EMPTY = css::util::NumberFormat::EMPTY ,
  DURATION = css::util::NumberFormat::DURATION
}
 MAX_ULONG. More...
 
enum  NfIndexTableOffset {
  NF_NUMERIC_START = 0 ,
  NF_NUMBER_START = NF_NUMERIC_START ,
  NF_NUMBER_STANDARD = NF_NUMBER_START ,
  NF_NUMBER_INT ,
  NF_NUMBER_DEC2 ,
  NF_NUMBER_1000INT ,
  NF_NUMBER_1000DEC2 ,
  NF_NUMBER_SYSTEM ,
  NF_NUMBER_END = NF_NUMBER_SYSTEM ,
  NF_SCIENTIFIC_START ,
  NF_SCIENTIFIC_000E000 = NF_SCIENTIFIC_START ,
  NF_SCIENTIFIC_000E00 ,
  NF_SCIENTIFIC_END = NF_SCIENTIFIC_000E00 ,
  NF_PERCENT_START ,
  NF_PERCENT_INT = NF_PERCENT_START ,
  NF_PERCENT_DEC2 ,
  NF_PERCENT_END = NF_PERCENT_DEC2 ,
  NF_FRACTION_START ,
  NF_FRACTION_1D = NF_FRACTION_START ,
  NF_FRACTION_2D ,
  NF_FRACTION_END = NF_FRACTION_2D ,
  NF_NUMERIC_END = NF_FRACTION_END ,
  NF_CURRENCY_START ,
  NF_CURRENCY_1000INT = NF_CURRENCY_START ,
  NF_CURRENCY_1000DEC2 ,
  NF_CURRENCY_1000INT_RED ,
  NF_CURRENCY_1000DEC2_RED ,
  NF_CURRENCY_1000DEC2_CCC ,
  NF_CURRENCY_1000DEC2_DASHED ,
  NF_CURRENCY_END = NF_CURRENCY_1000DEC2_DASHED ,
  NF_DATE_START ,
  NF_DATE_SYSTEM_SHORT = NF_DATE_START ,
  NF_DATE_SYSTEM_LONG ,
  NF_DATE_SYS_DDMMYY ,
  NF_DATE_SYS_DDMMYYYY ,
  NF_DATE_SYS_DMMMYY ,
  NF_DATE_SYS_DMMMYYYY ,
  NF_DATE_DIN_DMMMYYYY ,
  NF_DATE_SYS_DMMMMYYYY ,
  NF_DATE_DIN_DMMMMYYYY ,
  NF_DATE_SYS_NNDMMMYY ,
  NF_DATE_DEF_NNDDMMMYY ,
  NF_DATE_SYS_NNDMMMMYYYY ,
  NF_DATE_SYS_NNNNDMMMMYYYY ,
  NF_DATE_DIN_MMDD ,
  NF_DATE_DIN_YYMMDD ,
  NF_DATE_DIN_YYYYMMDD ,
  NF_DATE_ISO_YYYYMMDD = NF_DATE_DIN_YYYYMMDD ,
  NF_DATE_SYS_MMYY ,
  NF_DATE_SYS_DDMMM ,
  NF_DATE_MMMM ,
  NF_DATE_QQJJ ,
  NF_DATE_WW ,
  NF_DATE_END = NF_DATE_WW ,
  NF_TIME_START ,
  NF_TIME_HHMM = NF_TIME_START ,
  NF_TIME_HHMMSS ,
  NF_TIME_HHMMAMPM ,
  NF_TIME_HHMMSSAMPM ,
  NF_TIME_HH_MMSS ,
  NF_TIME_MMSS00 ,
  NF_TIME_HH_MMSS00 ,
  NF_TIME_END = NF_TIME_HH_MMSS00 ,
  NF_DATETIME_START ,
  NF_DATETIME_SYSTEM_SHORT_HHMM = NF_DATETIME_START ,
  NF_DATETIME_SYS_DDMMYYYY_HHMMSS ,
  NF_DATETIME_END = NF_DATETIME_SYS_DDMMYYYY_HHMMSS ,
  NF_BOOLEAN ,
  NF_TEXT ,
  NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ,
  NF_DATETIME_SYS_DDMMYYYY_HHMM = NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ,
  NF_INDEX_TABLE_RESERVED_START ,
  NF_FRACTION_3D = NF_INDEX_TABLE_RESERVED_START ,
  NF_FRACTION_2 ,
  NF_FRACTION_4 ,
  NF_FRACTION_8 ,
  NF_FRACTION_16 ,
  NF_FRACTION_10 ,
  NF_FRACTION_100 ,
  NF_DATETIME_ISO_YYYYMMDD_HHMMSS ,
  NF_DATETIME_ISO_YYYYMMDD_HHMMSS000 ,
  NF_DATETIME_ISO_YYYYMMDDTHHMMSS ,
  NF_DATETIME_ISO_YYYYMMDDTHHMMSS000 ,
  NF_INDEX_TABLE_ENTRIES
}
 enum values for <method>SvNumberFormatter::GetFormatIndex</method> More...
 
enum  NfEvalDateFormat {
  NF_EVALDATEFORMAT_INTL ,
  NF_EVALDATEFORMAT_FORMAT ,
  NF_EVALDATEFORMAT_INTL_FORMAT ,
  NF_EVALDATEFORMAT_FORMAT_INTL
}
 enum values for <method>SvNumberFormatter::SetEvalDateFormat</method> More...
 
enum class  SvNumInputOptions : sal_uInt16 {
  NONE = 0 ,
  LAX_TIME = 1
}
 Input options to be used with IsNumberFormat() More...
 

Functions

class UNLESS_MERGELIBS (SVL_DLLPUBLIC) NfCurrencyEntry final
 Language/country dependent currency entries. More...
 

Variables

constexpr size_t NF_MAX_FORMAT_SYMBOLS = 100
 
constexpr sal_uInt32 NF_STANDARD_FORMAT_TEXT = SV_MAX_COUNT_STANDARD_FORMATS
 The built-in @ Text format, offset within a locale, key in the locale the number formatter was constructed with. More...
 
constexpr sal_uInt32 NUMBERFORMAT_ENTRY_NOT_FOUND = 0xffffffff
 

Macro Definition Documentation

◆ SV_COUNTRY_LANGUAGE_OFFSET

#define SV_COUNTRY_LANGUAGE_OFFSET   10000

Definition at line 38 of file zforlist.hxx.

◆ SV_MAX_COUNT_STANDARD_FORMATS

#define SV_MAX_COUNT_STANDARD_FORMATS   100

Definition at line 39 of file zforlist.hxx.

Typedef Documentation

◆ NfWSStringsDtor

typedef std::vector< OUString > NfWSStringsDtor

Definition at line 366 of file zforlist.hxx.

◆ SvNumberFormatTable

This table is std::map because it needs to preserve insertion order, because the formats are roughly ordered from most to least common, and some parts of the UI want to show them in that order.

Definition at line 286 of file zforlist.hxx.

◆ SvNumberFormatterIndexTable

typedef std::unordered_map<sal_uInt16, sal_uInt32> SvNumberFormatterIndexTable

Definition at line 287 of file zforlist.hxx.

◆ SvNumberFormatterMergeMap

typedef std::unordered_map< sal_uInt32, sal_uInt32> SvNumberFormatterMergeMap

Definition at line 288 of file zforlist.hxx.

Enumeration Type Documentation

◆ NfEvalDateFormat

enum values for <method>SvNumberFormatter::SetEvalDateFormat</method>

How <method>ImpSvNumberInputScan::GetDateRef</method> shall take the DateFormat order (YMD,DMY,MDY) into account, if called from IsNumberFormat with a date format to match against.

Enumerator
NF_EVALDATEFORMAT_INTL 

DateFormat only from International, default.

NF_EVALDATEFORMAT_FORMAT 

DateFormat only from date format passed to function (if any).

If no date format is passed then the DateFormat is taken from International.

NF_EVALDATEFORMAT_INTL_FORMAT 

First try the DateFormat from International.

If it doesn't match a valid date try the DateFormat from the date format passed.

NF_EVALDATEFORMAT_FORMAT_INTL 

First try the DateFormat from the date format passed.

If it doesn't match a valid date try the DateFormat from International.

Definition at line 264 of file zforlist.hxx.

◆ NfIndexTableOffset

enum values for <method>SvNumberFormatter::GetFormatIndex</method>

Builtin standard formats, order should be also the arrangement in the dialog list box representation.

Date specials:

  • SYSTEM: As set in System Regional Settings.
  • SYS: short/long defined, order and separators from System Regional Settings.
  • DEF: short/long and order defined, separators from System Regional Settings.
  • DIN: all settings hard coded as DIN (Deutsche Industrie Norm) and EN (European Norm) require.
  • all other: hard coded

Do NOT insert any new values! The values here correspond with those in offapi/com/sun/star/i18n/NumberFormatIndex.idl You may append values though after NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS.

Enumerator
NF_NUMERIC_START 
NF_NUMBER_START 
NF_NUMBER_STANDARD 
NF_NUMBER_INT 
NF_NUMBER_DEC2 
NF_NUMBER_1000INT 
NF_NUMBER_1000DEC2 
NF_NUMBER_SYSTEM 
NF_NUMBER_END 
NF_SCIENTIFIC_START 
NF_SCIENTIFIC_000E000 
NF_SCIENTIFIC_000E00 
NF_SCIENTIFIC_END 
NF_PERCENT_START 
NF_PERCENT_INT 
NF_PERCENT_DEC2 
NF_PERCENT_END 
NF_FRACTION_START 
NF_FRACTION_1D 
NF_FRACTION_2D 
NF_FRACTION_END 
NF_NUMERIC_END 
NF_CURRENCY_START 
NF_CURRENCY_1000INT 
NF_CURRENCY_1000DEC2 
NF_CURRENCY_1000INT_RED 
NF_CURRENCY_1000DEC2_RED 
NF_CURRENCY_1000DEC2_CCC 
NF_CURRENCY_1000DEC2_DASHED 
NF_CURRENCY_END 
NF_DATE_START 
NF_DATE_SYSTEM_SHORT 
NF_DATE_SYSTEM_LONG 
NF_DATE_SYS_DDMMYY 
NF_DATE_SYS_DDMMYYYY 
NF_DATE_SYS_DMMMYY 
NF_DATE_SYS_DMMMYYYY 
NF_DATE_DIN_DMMMYYYY 
NF_DATE_SYS_DMMMMYYYY 
NF_DATE_DIN_DMMMMYYYY 
NF_DATE_SYS_NNDMMMYY 
NF_DATE_DEF_NNDDMMMYY 
NF_DATE_SYS_NNDMMMMYYYY 
NF_DATE_SYS_NNNNDMMMMYYYY 
NF_DATE_DIN_MMDD 
NF_DATE_DIN_YYMMDD 
NF_DATE_DIN_YYYYMMDD 
NF_DATE_ISO_YYYYMMDD 
NF_DATE_SYS_MMYY 
NF_DATE_SYS_DDMMM 
NF_DATE_MMMM 
NF_DATE_QQJJ 
NF_DATE_WW 
NF_DATE_END 
NF_TIME_START 
NF_TIME_HHMM 
NF_TIME_HHMMSS 
NF_TIME_HHMMAMPM 
NF_TIME_HHMMSSAMPM 
NF_TIME_HH_MMSS 
NF_TIME_MMSS00 
NF_TIME_HH_MMSS00 
NF_TIME_END 
NF_DATETIME_START 
NF_DATETIME_SYSTEM_SHORT_HHMM 
NF_DATETIME_SYS_DDMMYYYY_HHMMSS 
NF_DATETIME_END 
NF_BOOLEAN 
NF_TEXT 
NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS 
NF_DATETIME_SYS_DDMMYYYY_HHMM 
NF_INDEX_TABLE_RESERVED_START 
NF_FRACTION_3D 
NF_FRACTION_2 
NF_FRACTION_4 
NF_FRACTION_8 
NF_FRACTION_16 
NF_FRACTION_10 
NF_FRACTION_100 
NF_DATETIME_ISO_YYYYMMDD_HHMMSS 
NF_DATETIME_ISO_YYYYMMDD_HHMMSS000 
NF_DATETIME_ISO_YYYYMMDDTHHMMSS 
NF_DATETIME_ISO_YYYYMMDDTHHMMSS000 
NF_INDEX_TABLE_ENTRIES 

Definition at line 123 of file zforlist.hxx.

◆ SvNumFormatType

enum class SvNumFormatType : sal_Int16
strong

MAX_ULONG.

Enumerator
ALL 

selects all number formats.

DEFINED 

selects only user-defined number formats.

DATE 

selects date formats.

TIME 

selects time formats.

CURRENCY 

selects currency formats.

NUMBER 

selects decimal number formats.

SCIENTIFIC 

selects scientific number formats.

FRACTION 

selects number formats for fractions.

PERCENT 

selects percentage number formats.

TEXT 

selects text number formats.

DATETIME 

selects number formats which contain date and time.

LOGICAL 

selects boolean number formats.

UNDEFINED 

is used as a return value if no format exists.

EMPTY 
DURATION 

Definition at line 49 of file zforlist.hxx.

◆ SvNumInputOptions

enum class SvNumInputOptions : sal_uInt16
strong

Input options to be used with IsNumberFormat()

Enumerator
NONE 
LAX_TIME 

allow input of minutes or seconds >59

Definition at line 369 of file zforlist.hxx.

Function Documentation

◆ UNLESS_MERGELIBS()

class UNLESS_MERGELIBS ( SVL_DLLPUBLIC  )
final

Language/country dependent currency entries.

currency symbol

currency abbreviation

language/country value

position of symbol

position of symbol and type and position of negative sign

count of decimal digits

which character is used for zeros as last decimal digits

Symbols and language identical

Only to resolve system locale for currency list.

[$DM-407] (bBank==false) or [$DEM] (bBank==true) is returned. If bBank==false and bWithoutExtension==true only [$DM]

#,##0.00 [$DM-407] is returned, separators from rLoc, incl. minus sign but without [RED]

[$DM-407] (or [$DEM] if bBank==true) is appended/prepended to rStr, incl. minus sign

rSymStr is appended/prepended to rStr, incl. minus sign

Representation of a currency (symbol position and negative sign) in other language settings

General Unicode Euro symbol

Definition at line 288 of file zforlist.hxx.

Variable Documentation

◆ NF_MAX_FORMAT_SYMBOLS

constexpr size_t NF_MAX_FORMAT_SYMBOLS = 100
constexpr

◆ NF_STANDARD_FORMAT_TEXT

constexpr sal_uInt32 NF_STANDARD_FORMAT_TEXT = SV_MAX_COUNT_STANDARD_FORMATS
constexpr

The built-in @ Text format, offset within a locale, key in the locale the number formatter was constructed with.

Definition at line 45 of file zforlist.hxx.

◆ NUMBERFORMAT_ENTRY_NOT_FOUND

constexpr sal_uInt32 NUMBERFORMAT_ENTRY_NOT_FOUND = 0xffffffff
constexpr