LibreOffice Module svl (master) 1
Classes | Macros | Functions | Variables
zforlist.cxx File Reference
#include <sal/config.h>
#include <sal/log.hxx>
#include <officecfg/Office/Common.hxx>
#include <svl/zforlist.hxx>
#include <svl/currencytable.hxx>
#include <comphelper/string.hxx>
#include <o3tl/string_view.hxx>
#include <tools/debug.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/i18n/KNumberFormatUsage.hpp>
#include <com/sun/star/i18n/KNumberFormatType.hpp>
#include <com/sun/star/i18n/FormatElement.hpp>
#include <com/sun/star/i18n/Currency2.hpp>
#include <com/sun/star/i18n/NumberFormatCode.hpp>
#include <com/sun/star/i18n/XNumberFormatCode.hpp>
#include <com/sun/star/i18n/NumberFormatMapper.hpp>
#include <comphelper/processfactory.hxx>
#include <osl/mutex.hxx>
#include "zforscan.hxx"
#include "zforfind.hxx"
#include <svl/zformat.hxx>
#include <i18npool/reservedconstants.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <unotools/digitgroupingiterator.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/math.hxx>
#include <math.h>
#include <limits>
#include <memory>
#include <set>
Include dependency graph for zforlist.cxx:

Go to the source code of this file.

Classes

class  SvNumberFormatterRegistry_Impl
 instead of every number formatter being a listener we have a registry which also handles one instance of the SysLocale options More...
 

Macros

#define ZF_STANDARD   0
 
#define ZF_STANDARD_PERCENT   10
 
#define ZF_STANDARD_CURRENCY   20
 
#define ZF_STANDARD_DATE   30
 
#define ZF_STANDARD_TIME   60
 
#define ZF_STANDARD_DURATION   (ZF_STANDARD_TIME + 4)
 
#define ZF_STANDARD_DATETIME   70
 
#define ZF_STANDARD_SCIENTIFIC   80
 
#define ZF_STANDARD_FRACTION   85
 
#define ZF_STANDARD_DATE_SYS_DMMMYYYY   (ZF_STANDARD_DATE + 10)
 
#define ZF_STANDARD_DATE_SYS_DMMMMYYYY   (ZF_STANDARD_DATE + 11)
 
#define ZF_STANDARD_DATE_SYS_NNDMMMYY   (ZF_STANDARD_DATE + 12)
 
#define ZF_STANDARD_DATE_SYS_NNDMMMMYYYY   (ZF_STANDARD_DATE + 13)
 
#define ZF_STANDARD_DATE_SYS_NNNNDMMMMYYYY   (ZF_STANDARD_DATE + 14)
 
#define ZF_STANDARD_DATE_DIN_DMMMYYYY   (ZF_STANDARD_DATE + 15)
 
#define ZF_STANDARD_DATE_DIN_DMMMMYYYY   (ZF_STANDARD_DATE + 16)
 
#define ZF_STANDARD_DATE_DIN_MMDD   (ZF_STANDARD_DATE + 17)
 
#define ZF_STANDARD_DATE_DIN_YYMMDD   (ZF_STANDARD_DATE + 18)
 
#define ZF_STANDARD_DATE_DIN_YYYYMMDD   (ZF_STANDARD_DATE + 19)
 
#define ZF_STANDARD_DATE_WW   (ZF_STANDARD_DATE + 20)
 
#define ZF_STANDARD_LOGICAL   SV_MAX_COUNT_STANDARD_FORMATS-1
 
#define ZF_STANDARD_TEXT   SV_MAX_COUNT_STANDARD_FORMATS
 
#define UNKNOWN_SUBSTITUTE   LANGUAGE_ENGLISH_US
 
#define NF_BANKSYMBOL_FIX_POSITION   1
 

Functions

static OUString lcl_buildBooleanStringFormat (SvNumberformat *pEntry)
 
 IMPL_STATIC_LINK_NOARG (SvNumberFormatter, CurrencyChangeLink, LinkParamNone *, void)
 
static void lcl_CheckCurrencySymbolPosition (const NfCurrencyEntry &rCurr)
 
static std::ptrdiff_t addToCurrencyFormatsList (NfWSStringsDtor &rStrArr, const OUString &rFormat)
 
static sal_uInt16 lcl_MergeNegativeParenthesisFormat (sal_uInt16 nIntlFormat, sal_uInt16 nCurrFormat)
 Call this only if nCurrFormat is really with parentheses! More...
 

Variables

sal_uInt32 const indexTable [NF_INDEX_TABLE_ENTRIES]
 

Macro Definition Documentation

◆ NF_BANKSYMBOL_FIX_POSITION

#define NF_BANKSYMBOL_FIX_POSITION   1

Definition at line 270 of file zforlist.cxx.

◆ UNKNOWN_SUBSTITUTE

#define UNKNOWN_SUBSTITUTE   LANGUAGE_ENGLISH_US

Definition at line 107 of file zforlist.cxx.

◆ ZF_STANDARD

#define ZF_STANDARD   0

Definition at line 66 of file zforlist.cxx.

◆ ZF_STANDARD_CURRENCY

#define ZF_STANDARD_CURRENCY   20

Definition at line 68 of file zforlist.cxx.

◆ ZF_STANDARD_DATE

#define ZF_STANDARD_DATE   30

Definition at line 69 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_DIN_DMMMMYYYY

#define ZF_STANDARD_DATE_DIN_DMMMMYYYY   (ZF_STANDARD_DATE + 16)

Definition at line 84 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_DIN_DMMMYYYY

#define ZF_STANDARD_DATE_DIN_DMMMYYYY   (ZF_STANDARD_DATE + 15)

Definition at line 83 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_DIN_MMDD

#define ZF_STANDARD_DATE_DIN_MMDD   (ZF_STANDARD_DATE + 17)

Definition at line 85 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_DIN_YYMMDD

#define ZF_STANDARD_DATE_DIN_YYMMDD   (ZF_STANDARD_DATE + 18)

Definition at line 86 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_DIN_YYYYMMDD

#define ZF_STANDARD_DATE_DIN_YYYYMMDD   (ZF_STANDARD_DATE + 19)

Definition at line 87 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_SYS_DMMMMYYYY

#define ZF_STANDARD_DATE_SYS_DMMMMYYYY   (ZF_STANDARD_DATE + 11)

Definition at line 79 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_SYS_DMMMYYYY

#define ZF_STANDARD_DATE_SYS_DMMMYYYY   (ZF_STANDARD_DATE + 10)

Definition at line 78 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_SYS_NNDMMMMYYYY

#define ZF_STANDARD_DATE_SYS_NNDMMMMYYYY   (ZF_STANDARD_DATE + 13)

Definition at line 81 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_SYS_NNDMMMYY

#define ZF_STANDARD_DATE_SYS_NNDMMMYY   (ZF_STANDARD_DATE + 12)

Definition at line 80 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_SYS_NNNNDMMMMYYYY

#define ZF_STANDARD_DATE_SYS_NNNNDMMMMYYYY   (ZF_STANDARD_DATE + 14)

Definition at line 82 of file zforlist.cxx.

◆ ZF_STANDARD_DATE_WW

#define ZF_STANDARD_DATE_WW   (ZF_STANDARD_DATE + 20)

Definition at line 88 of file zforlist.cxx.

◆ ZF_STANDARD_DATETIME

#define ZF_STANDARD_DATETIME   70

Definition at line 72 of file zforlist.cxx.

◆ ZF_STANDARD_DURATION

#define ZF_STANDARD_DURATION   (ZF_STANDARD_TIME + 4)

Definition at line 71 of file zforlist.cxx.

◆ ZF_STANDARD_FRACTION

#define ZF_STANDARD_FRACTION   85

Definition at line 74 of file zforlist.cxx.

◆ ZF_STANDARD_LOGICAL

#define ZF_STANDARD_LOGICAL   SV_MAX_COUNT_STANDARD_FORMATS-1

Definition at line 90 of file zforlist.cxx.

◆ ZF_STANDARD_PERCENT

#define ZF_STANDARD_PERCENT   10

Definition at line 67 of file zforlist.cxx.

◆ ZF_STANDARD_SCIENTIFIC

#define ZF_STANDARD_SCIENTIFIC   80

Definition at line 73 of file zforlist.cxx.

◆ ZF_STANDARD_TEXT

#define ZF_STANDARD_TEXT   SV_MAX_COUNT_STANDARD_FORMATS

Definition at line 91 of file zforlist.cxx.

◆ ZF_STANDARD_TIME

#define ZF_STANDARD_TIME   60

Definition at line 70 of file zforlist.cxx.

Function Documentation

◆ addToCurrencyFormatsList()

static std::ptrdiff_t addToCurrencyFormatsList ( NfWSStringsDtor rStrArr,
const OUString &  rFormat 
)
static

Definition at line 4312 of file zforlist.cxx.

Referenced by SvNumberFormatter::GetCurrencyFormatStrings().

◆ IMPL_STATIC_LINK_NOARG()

IMPL_STATIC_LINK_NOARG ( SvNumberFormatter  ,
CurrencyChangeLink  ,
LinkParamNone ,
void   
)

◆ lcl_buildBooleanStringFormat()

static OUString lcl_buildBooleanStringFormat ( SvNumberformat pEntry)
static

◆ lcl_CheckCurrencySymbolPosition()

static void lcl_CheckCurrencySymbolPosition ( const NfCurrencyEntry &  rCurr)
static

◆ lcl_MergeNegativeParenthesisFormat()

static sal_uInt16 lcl_MergeNegativeParenthesisFormat ( sal_uInt16  nIntlFormat,
sal_uInt16  nCurrFormat 
)
static

Call this only if nCurrFormat is really with parentheses!

Definition at line 4742 of file zforlist.cxx.

References SAL_WARN.

Variable Documentation

◆ indexTable

sal_uInt32 const indexTable[NF_INDEX_TABLE_ENTRIES]