LibreOffice Module svl (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SvNumberformat Class Reference

#include <zformat.hxx>

Collaboration diagram for SvNumberformat:
[legend]

Classes

struct  FormatterPrivateAccess
 Read/write access on a special sal_uInt16 component, may only be used on the standard format 0, 10000, ... and only by the number formatter! More...
 
struct  LocaleType
 

Public Member Functions

 SvNumberformat (OUString &rString, ImpSvNumberformatScan *pSc, ImpSvNumberInputScan *pISc, sal_Int32 &nCheckPos, LanguageType &eLan, bool bReplaceBooleanEquivalent=true)
 
 SvNumberformat (SvNumberformat const &rFormat)
 
 SvNumberformat (SvNumberformat const &rFormat, ImpSvNumberformatScan &rSc)
 
 ~SvNumberformat ()
 
SvNumFormatType GetType () const
 Get type of format, may include css::util::NumberFormat::DEFINED bit. More...
 
SvNumFormatType GetMaskedType () const
 Get type of format, does not include css::util::NumberFormat::DEFINED. More...
 
void SetType (SvNumFormatType eSetType)
 
void SetStandard ()
 
bool IsStandard () const
 
void SetAdditionalBuiltin ()
 
bool IsAdditionalBuiltin () const
 
LanguageType GetLanguage () const
 
bool IsSubstituted () const
 If the format is a placeholder and needs to be substituted. More...
 
bool IsSystemTimeFormat () const
 If the format is a placeholder for the system time format and needs to be substituted during formatting time. More...
 
bool IsSystemLongDateFormat () const
 If the format is a placeholder for the system long date format and needs to be substituted during formatting time. More...
 
bool IsMinuteSecondFormat () const
 If the format is a MM:SS or [MM]:SS format, or MM:[SS] (sic!) or even MM:SS.00 or [MM]:SS.00 or MM:[SS].00. More...
 
const OUString & GetFormatstring () const
 
OUString GetMappedFormatstring (const NfKeywordTable &rKeywords, const LocaleDataWrapper &rLoc, LanguageType nOriginalLang=LANGUAGE_DONTKNOW, bool bSystemLanguage=false) const
 
void SetStarFormatSupport (bool b)
 
bool GetOutputString (double fNumber, sal_uInt16 nCharCount, OUString &rOutString) const
 Get output string from a numeric value that fits the number of characters specified. More...
 
bool GetOutputString (double fNumber, OUString &OutString, const Color **ppColor)
 
void GetOutputString (std::u16string_view sString, OUString &OutString, const Color **ppColor)
 
bool IsTextFormat () const
 
bool HasTextFormat () const
 
void GetFormatSpecialInfo (bool &bThousand, bool &IsRed, sal_uInt16 &nPrecision, sal_uInt16 &nLeadingCnt) const
 
sal_uInt16 GetSubformatIndex (double fNumber) const
 Get index of subformat (0..3) according to conditions and fNumber value. More...
 
sal_uInt16 GetFormatPrecision (sal_uInt16 nIx=0) const
 Count of decimal precision. More...
 
sal_uInt16 GetFormatIntegerDigits (sal_uInt16 nIx=0) const
 Count of integer digits. More...
 
sal_uInt16 GetThousandDivisorPrecision (sal_uInt16 nIx=0) const
 Count of hidden integer digits with thousands divisor: formats like "0," to show only thousands. More...
 
sal_uInt16 GetLastInsertKey (const FormatterPrivateAccess &) const
 
void SetLastInsertKey (sal_uInt16 nKey, const FormatterPrivateAccess &)
 
void ConvertLanguage (SvNumberFormatter &rConverter, LanguageType eConvertFrom, LanguageType eConvertTo)
 Only onLoad: convert from stored to current system language/country. More...
 
const OUString * GetNumForString (sal_uInt16 nNumFor, sal_uInt16 nPos, bool bString=false) const
 
short GetNumForType (sal_uInt16 nNumFor, sal_uInt16 nPos) const
 
OUString GetPercentString (sal_uInt16 nNumFor=0) const
 
OUString GetDenominatorString (sal_uInt16 nNumFor) const
 
OUString GetNumeratorString (sal_uInt16 nNumFor) const
 
OUString GetIntegerFractionDelimiterString (sal_uInt16 nNumFor) const
 
double GetRoundFractionValue (double fNumber) const
 Round fNumber to its fraction representation. More...
 
OUString GetFormatStringForTimePrecision (int nPrecision) const
 Create a format string for time with a new precision. More...
 
bool IsNumForStringElementCountEqual (sal_uInt16 nNumFor, sal_uInt16 nAllCount, sal_uInt16 nNumCount) const
 If the count of string elements (substrings, ignoring [modifiers] and so on) in a subformat code nNumFor (0..3) is equal to the given number. More...
 
sal_uInt16 GetNumForNumberElementCount (sal_uInt16 nNumFor) const
 Get the count of numbers among string elements. More...
 
SvNumFormatType GetNumForInfoScannedType (sal_uInt16 nNumFor) const
 Get the scanned type of the specified subformat. More...
 
bool IsSecondSubformatRealNegative () const
 
bool IsFirstSubformatRealNegative () const
 
bool IsNegativeWithoutSign () const
 
bool IsNegativeInBracket () const
 
bool HasPositiveBracketPlaceholder () const
 
bool HasNewCurrency () const
 
bool GetNewCurrencySymbol (OUString &rSymbol, OUString &rExtension) const
 
void SetComment (const OUString &rStr)
 
const OUString & GetComment () const
 
DateOrder GetDateOrder () const
 One of YMD,DMY,MDY if date format. More...
 
sal_uInt32 GetExactDateOrder () const
 A coded value of the exact YMD combination used, if date format. More...
 
void GetConditions (SvNumberformatLimitOps &rOper1, double &rVal1, SvNumberformatLimitOps &rOper2, double &rVal2) const
 
const ColorGetColor (sal_uInt16 nNumFor) const
 
void GetNumForInfo (sal_uInt16 nNumFor, SvNumFormatType &rScannedType, bool &bThousand, sal_uInt16 &nPrecision, sal_uInt16 &nLeadingCnt) const
 
void GetNatNumXml (css::i18n::NativeNumberXmlAttributes2 &rAttr, sal_uInt16 nNumFor) const
 
OUString GetNatNumModifierString (sal_uInt16 nNumFor=0) const
 Return empty string if no NatNum modifier or invalid nNumFor otherwise return "[NatNum1]" or "[NatNum12 ...]". More...
 
void SwitchToOtherCalendar (OUString &rOrgCalendar, double &fOrgDateTime) const
 Switches to the first non-"gregorian" calendar, but only if the current calendar is "gregorian"; original calendar name and date/time returned, but only if calendar switched and rOrgCalendar was empty. More...
 
void SwitchToGregorianCalendar (std::u16string_view rOrgCalendar, double fOrgDateTime) const
 Switches to the "gregorian" calendar, but only if the current calendar is non-"gregorian" and rOrgCalendar is not empty. More...
 
bool IsIso8601 (sal_uInt16 nNumFor) const
 Whether it's a (YY)YY-M(M)-D(D) format. More...
 

Static Public Member Functions

static OUString StripNewCurrencyDelimiters (const OUString &rStr)
 
static bool HasStringNegativeSign (const OUString &rStr)
 
static bool IsInQuote (const OUString &rString, sal_Int32 nPos, sal_Unicode cQuote='"', sal_Unicode cEscIn = '\0', sal_Unicode cEscOut = '\\' )
 Whether a character at position nPos is somewhere between two matching cQuote or not. More...
 
static sal_Int32 GetQuoteEnd (const OUString &rString, sal_Int32 nPos, sal_Unicode cQuote='"', sal_Unicode cEscIn = '\0' )
 Return the position of a matching closing cQuote if the character at position nPos is between two matching cQuote, otherwise return -1. More...
 
static sal_Int32 InsertBlanks (OUString &r, sal_Int32 nPos, sal_Unicode c)
 Insert the number of blanks into the string that is needed to simulate the width of character c for underscore formats. More...
 
static sal_Int32 InsertBlanks (OUStringBuffer &r, sal_Int32 nPos, sal_Unicode c)
 Insert the number of blanks into the string that is needed to simulate the width of character c for underscore formats. More...
 

Private Member Functions

SVL_DLLPRIVATE sal_uInt16 ImpGetNumForStringElementCount (sal_uInt16 nNumFor) const
 
SVL_DLLPRIVATE bool ImpIsOtherCalendar (const ImpSvNumFor &rNumFor) const
 
SVL_DLLPRIVATE bool ImpIsIso8601 (const ImpSvNumFor &rNumFor) const
 Whether it's a (YY)YY-M(M)-D(D) format. More...
 
const CharClassrChrCls () const
 
const LocaleDataWrapperrLoc () const
 
CalendarWrapperGetCal () const
 
const SvNumberFormatterGetFormatter () const
 
SVL_DLLPRIVATE short ImpNextSymbol (OUStringBuffer &rString, sal_Int32 &nPos, OUString &sSymbol) const
 
SVL_DLLPRIVATE OUString ImpObtainCalendarAndNumerals (OUStringBuffer &rString, sal_Int32 nPos, LanguageType &nLang, const LocaleType &aTmpLocale)
 Obtain calendar and numerals from a LocaleType that was parsed from a LCID with ImpGetLocaleType(). More...
 
SVL_DLLPRIVATE void ImpGetOutputStandard (double &fNumber, OUString &OutString) const
 
SVL_DLLPRIVATE void ImpGetOutputStandard (double &fNumber, OUStringBuffer &OutString) const
 
SVL_DLLPRIVATE void ImpGetOutputStdToPrecision (double &rNumber, OUString &rOutString, sal_uInt16 nPrecision) const
 
SVL_DLLPRIVATE void ImpGetOutputInputLine (double fNumber, OUString &OutString) const
 
SVL_DLLPRIVATE bool ImpNumberFill (OUStringBuffer &sStr, double &rNumber, sal_Int32 &k, sal_uInt16 &j, sal_uInt16 nIx, short eSymbolType, bool bInsertRightBlank=false)
 
SVL_DLLPRIVATE bool ImpNumberFillWithThousands (OUStringBuffer &sStr, double &rNumber, sal_Int32 k, sal_uInt16 j, sal_uInt16 nIx, sal_Int32 nDigCnt, bool bAddDecSep=true)
 
SVL_DLLPRIVATE void ImpDigitFill (OUStringBuffer &sStr, sal_Int32 nStart, sal_Int32 &k, sal_uInt16 nIx, sal_Int32 &nDigitCount, utl::DigitGroupingIterator &)
 
SVL_DLLPRIVATE bool ImpDecimalFill (OUStringBuffer &sStr, double &rNumber, sal_Int32 nDecPos, sal_uInt16 j, sal_uInt16 nIx, bool bInteger)
 
SVL_DLLPRIVATE void ImpGetFractionElements (double &fNumber, sal_uInt16 nIx, double &fIntPart, sal_Int64 &nFrac, sal_Int64 &nDiv) const
 Calculate each element of fraction: integer part, numerator part, denominator part. More...
 
SVL_DLLPRIVATE bool ImpGetFractionOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpGetScientificOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpGetDateOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpGetTimeOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpGetDateTimeOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpFallBackToGregorianCalendar (OUString &rOrgCalendar, double &fOrgDateTime)
 
SVL_DLLPRIVATE bool ImpGetLogicalOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE bool ImpGetNumberOutput (double fNumber, sal_uInt16 nIx, OUStringBuffer &OutString)
 
SVL_DLLPRIVATE void ImpCopyNumberformat (const SvNumberformat &rFormat)
 
SVL_DLLPRIVATE OUString ImpGetNatNumString (const SvNumberNatNum &rNum, sal_Int64 nVal, sal_uInt16 nMinDigits) const
 
OUString ImpIntToString (sal_uInt16 nIx, sal_Int64 nVal, sal_uInt16 nMinDigits=0) const
 
SVL_DLLPRIVATE sal_uInt16 ImpGetFractionOfSecondString (OUStringBuffer &rBuf, double fFractionOfSecond, int nFractionDecimals, bool bAddOneRoundingDecimal, sal_uInt16 nIx, sal_uInt16 nMinimumInputLineDecimals)
 
SVL_DLLPRIVATE OUString impTransliterateImpl (const OUString &rStr, const SvNumberNatNum &rNum) const
 
SVL_DLLPRIVATE void impTransliterateImpl (OUStringBuffer &rStr, const SvNumberNatNum &rNum) const
 
SVL_DLLPRIVATE OUString impTransliterateImpl (const OUString &rStr, const SvNumberNatNum &rNum, sal_uInt16 nDateKey) const
 
OUString impTransliterate (const OUString &rStr, const SvNumberNatNum &rNum) const
 
SVL_DLLPRIVATE void impTransliterate (OUStringBuffer &rStr, const SvNumberNatNum &rNum) const
 
OUString impTransliterate (const OUString &rStr, const SvNumberNatNum &rNum, sal_uInt16 nDateKey) const
 

Static Private Member Functions

static SVL_DLLPRIVATE sal_Int32 ImpUseMonthCase (int &io_nState, const ImpSvNumFor &rNumFor, NfKeywordIndex eCodeType)
 Whether to use possessive genitive case month name, or partitive case month name, instead of nominative name (noun). More...
 
static SVL_DLLPRIVATE sal_Int32 ImpGetNumber (OUStringBuffer &rString, sal_Int32 &nPos, OUString &sSymbol)
 
static SVL_DLLPRIVATE LocaleType ImpGetLocaleType (std::u16string_view rString, sal_Int32 &nPos)
 Parse the content of '[$-xxx] or '[$-xxxxxxxx]' and extract the locale type from it. More...
 
static SVL_DLLPRIVATE short ImpCheckCondition (double fNumber, double fLimit, SvNumberformatLimitOps eOp)
 
static SVL_DLLPRIVATE void ImpAppendEraG (OUStringBuffer &OutStringBuffer, const CalendarWrapper &rCal, sal_Int16 nNatNum)
 

Private Attributes

ImpSvNumFor NumFor [4]
 
OUString sFormatstring
 
OUString sComment
 
double fLimit1
 
double fLimit2
 
ImpSvNumberformatScanrScan
 
LocaleType maLocale
 
SvNumberformatLimitOps eOp1
 
SvNumberformatLimitOps eOp2
 
SvNumFormatType eType
 
bool bAdditionalBuiltin
 
bool bStarFlag
 
bool bStandard
 
bool bIsUsed
 

Detailed Description

Definition at line 144 of file zformat.hxx.

Constructor & Destructor Documentation

◆ SvNumberformat() [1/3]

SvNumberformat::SvNumberformat ( OUString &  rString,
ImpSvNumberformatScan pSc,
ImpSvNumberInputScan pISc,
sal_Int32 &  nCheckPos,
LanguageType eLan,
bool  bReplaceBooleanEquivalent = true 
)

eSymbolType is negative

eSymbolType is negative

Definition at line 750 of file zformat.cxx.

References aStr, bIsUsed, bStandard, SvNumberFormatter::ChangeIntl(), ImpSvNumberformatScan::CopyInfo(), CURRENCY, DATE, DEFINED, EMPTY, ImpSvNumFor::Enlarge(), eOp1, eOp2, ImpSvNumberformatInfo::eScannedType, eType, fLimit1, fLimit2, SvNumberformat::LocaleType::generateCode(), ImpSvNumberformatScan::GetColor(), GetColor(), ImpSvNumberformatScan::GetConvertMode(), ImpSvNumFor::GetCount(), GetFormatter(), SvNumberFormatter::GetLangDecimalSep(), ImpSvNumFor::GetNatNum(), ImpSvNumberformatScan::GetNatNumModifier(), ImpSvNumberformatScan::GetNewLnge(), ImpSvNumberformatScan::GetNumberformatter(), SvNumberFormatter::GetNumDecimalSep(), SvNumberFormatter::GetNumThousandSep(), MsLangId::getRealLanguage(), ImpSvNumberformatScan::GetResultStringsCnt(), ImpSvNumberformatScan::GetScannedType(), ImpSvNumberformatScan::GetStandardName(), ImpSvNumberformatScan::GetTmpLnge(), ImpGetLocaleType(), ImpGetNumber(), ImpNextSymbol(), ImpObtainCalendarAndNumerals(), Info, ImpSvNumFor::Info(), SvNumberFormatter::IsLocaleInstalled(), ImpSvNumberInputScan::IsNumberFormat(), SvNumberformat::LocaleType::isPlainLocale(), SvNumberNatNum::IsSet(), IsSubstituted(), IsSystemLongDateFormat(), IsSystemTimeFormat(), LANGUAGE_DONTKNOW, LANGUAGE_SYSTEM, LANGUAGE_THAI, lcl_isNatNum12Currency(), lcl_SvNumberformat_IsBracketedPrefix(), maLocale, SvNumberformat::LocaleType::meLanguage, SvNumberformat::LocaleType::meLanguageWithoutLocaleData, NF_KEY_GENERAL, nIndex, NONE, nPos, ImpSvNumberformatInfo::nTypeArray, NUMBER, NUMBERFORMAT_OP_GE, NUMBERFORMAT_OP_GT, NUMBERFORMAT_OP_LT, NUMBERFORMAT_OP_NO, NumFor, ImpSvNumberformatScan::ReplaceBooleanEquivalent(), rLoc(), rScan, ImpSvNumberformatScan::ScanFormat(), SCIENTIFIC, ImpSvNumFor::SetColor(), ImpSvNumFor::SetNatNumDate(), ImpSvNumFor::SetNatNumLang(), ImpSvNumFor::SetNatNumNum(), ImpSvNumFor::SetNatNumParams(), ImpSvNumberformatScan::SetNewLnge(), sFormatstring, TEXT, TIME, o3tl::trim(), and UNDEFINED.

◆ SvNumberformat() [2/3]

SvNumberformat::SvNumberformat ( SvNumberformat const &  rFormat)

Definition at line 364 of file zformat.cxx.

References ImpCopyNumberformat().

◆ SvNumberformat() [3/3]

SvNumberformat::SvNumberformat ( SvNumberformat const &  rFormat,
ImpSvNumberformatScan rSc 
)

Definition at line 370 of file zformat.cxx.

References ImpCopyNumberformat().

◆ ~SvNumberformat()

SvNumberformat::~SvNumberformat ( )

Definition at line 1371 of file zformat.cxx.

Member Function Documentation

◆ ConvertLanguage()

void SvNumberformat::ConvertLanguage ( SvNumberFormatter rConverter,
LanguageType  eConvertFrom,
LanguageType  eConvertTo 
)

Only onLoad: convert from stored to current system language/country.

Definition at line 1939 of file zformat.cxx.

References DBG_ASSERT, eType, ImpSvNumberformatScan::GetColor(), SvNumberFormatter::GetEntry(), ImpCopyNumberformat(), nType, NumFor, SvNumberFormatter::PutandConvertEntry(), rScan, and sFormatstring.

◆ GetCal()

CalendarWrapper & SvNumberformat::GetCal ( ) const
private

◆ GetColor()

const Color * SvNumberformat::GetColor ( sal_uInt16  nNumFor) const

Definition at line 5156 of file zformat.cxx.

References ImpSvNumFor::GetColor(), and NumFor.

Referenced by SvNumberFormatter::GetCalcCellReturn(), and SvNumberformat().

◆ GetComment()

const OUString & SvNumberformat::GetComment ( ) const
inline

◆ GetConditions()

void SvNumberformat::GetConditions ( SvNumberformatLimitOps rOper1,
double &  rVal1,
SvNumberformatLimitOps rOper2,
double &  rVal2 
) const

Definition at line 5147 of file zformat.cxx.

References eOp1, eOp2, fLimit1, and fLimit2.

◆ GetDateOrder()

DateOrder SvNumberformat::GetDateOrder ( ) const

◆ GetDenominatorString()

OUString SvNumberformat::GetDenominatorString ( sal_uInt16  nNumFor) const

Definition at line 2381 of file zformat.cxx.

References ImpSvNumFor::GetCount(), ImpSvNumFor::Info(), and NumFor.

Referenced by GetNumForInfo().

◆ GetExactDateOrder()

sal_uInt32 SvNumberformat::GetExactDateOrder ( ) const

A coded value of the exact YMD combination used, if date format.

For example: YYYY-MM-DD => ('Y' << 16) | ('M' << 8) | 'D' or: MM/YY => ('M' << 8) | 'Y'

Definition at line 5105 of file zformat.cxx.

References DATE, eType, ImpSvNumFor::GetCount(), ImpSvNumFor::Info(), NF_KEY_D, NF_KEY_DD, NF_KEY_EC, NF_KEY_EEC, NF_KEY_M, NF_KEY_MM, NF_KEY_MMM, NF_KEY_MMMM, NF_KEY_MMMMM, NF_KEY_R, NF_KEY_RR, NF_KEY_YY, NF_KEY_YYYY, ImpSvNumberformatInfo::nTypeArray, NumFor, and SAL_WARN.

Referenced by ImpSvNumberInputScan::GetDateRef(), ImpSvNumberInputScan::GetMiddleMonthLongDateOrder(), and ImpSvNumberInputScan::ScanMidString().

◆ GetFormatIntegerDigits()

sal_uInt16 SvNumberformat::GetFormatIntegerDigits ( sal_uInt16  nIx = 0) const
inline

Count of integer digits.

Definition at line 271 of file zformat.hxx.

Referenced by SvNumberFormatter::GetFormatIntegerDigits().

◆ GetFormatPrecision()

sal_uInt16 SvNumberformat::GetFormatPrecision ( sal_uInt16  nIx = 0) const
inline

Count of decimal precision.

Definition at line 267 of file zformat.hxx.

Referenced by SvNumberFormatter::GetFormatPrecision(), and SvNumberFormatter::GetInputLineString().

◆ GetFormatSpecialInfo()

void SvNumberformat::GetFormatSpecialInfo ( bool &  bThousand,
bool &  IsRed,
sal_uInt16 &  nPrecision,
sal_uInt16 &  nLeadingCnt 
) const

◆ GetFormatstring()

const OUString & SvNumberformat::GetFormatstring ( ) const
inline

◆ GetFormatStringForTimePrecision()

OUString SvNumberformat::GetFormatStringForTimePrecision ( int  nPrecision) const

◆ GetFormatter()

const SvNumberFormatter & SvNumberformat::GetFormatter ( ) const
private

◆ GetIntegerFractionDelimiterString()

OUString SvNumberformat::GetIntegerFractionDelimiterString ( sal_uInt16  nNumFor) const

Definition at line 2395 of file zformat.cxx.

References ImpSvNumFor::GetCount(), ImpSvNumFor::Info(), and NumFor.

Referenced by SvNumberFormatter::GenerateFormat().

◆ GetLanguage()

LanguageType SvNumberformat::GetLanguage ( ) const
inline

◆ GetLastInsertKey()

sal_uInt16 SvNumberformat::GetLastInsertKey ( const FormatterPrivateAccess ) const
inline

◆ GetMappedFormatstring()

OUString SvNumberformat::GetMappedFormatstring ( const NfKeywordTable rKeywords,
const LocaleDataWrapper rLoc,
LanguageType  nOriginalLang = LANGUAGE_DONTKNOW,
bool  bSystemLanguage = false 
) const

Definition at line 5235 of file zformat.cxx.

References o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::anyOf(), aStr, eOp1, eOp2, fLimit1, fLimit2, SvNumberformat::LocaleType::generateCode(), ImpSvNumFor::GetColorName(), ImpSvNumFor::GetCount(), LocaleDataWrapper::getDateSep(), SvNumberNatNum::GetDBNum(), ImpSvNumberformatScan::GetKeywords(), SvNumberNatNum::GetLang(), getLength(), LocaleDataWrapper::getLongDateDayOfWeekSep(), SvNumberNatNum::GetNatNum(), ImpSvNumFor::GetNatNum(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumThousandSep(), MsLangId::getRealLanguage(), LocaleDataWrapper::getTime100SecSep(), LocaleDataWrapper::getTimeSep(), i, Info, ImpSvNumFor::Info(), SvNumberNatNum::IsComplete(), LANGUAGE_ARABIC_PRIMARY_ONLY, LANGUAGE_BENGALI, LANGUAGE_BURMESE, LANGUAGE_CHINESE, LANGUAGE_CHINESE_HONGKONG, LANGUAGE_CHINESE_MACAU, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_DONTKNOW, LANGUAGE_ENGLISH_US, LANGUAGE_FARSI, LANGUAGE_GUJARATI, LANGUAGE_HINDI, LANGUAGE_JAPANESE, LANGUAGE_KANNADA, LANGUAGE_KHMER, LANGUAGE_KOREAN, LANGUAGE_LAO, LANGUAGE_MALAYALAM, LANGUAGE_MARATHI, LANGUAGE_MONGOLIAN_CYRILLIC_LSO, LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA, LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA, LANGUAGE_NEPALI, LANGUAGE_ODIA, LANGUAGE_PUNJABI, LANGUAGE_PUNJABI_ARABIC_LSO, LANGUAGE_SYSTEM, LANGUAGE_TAMIL, LANGUAGE_TELUGU, LANGUAGE_THAI, LANGUAGE_TIBETAN, LANGUAGE_TIGRIGNA_ETHIOPIA, lcl_incrementAlphabetWithNatNum(), lcl_insertLCID(), lcl_SvNumberformat_AddLimitStringImpl(), maLocale, SvNumberformat::LocaleType::meLanguageWithoutLocaleData, SvNumberformat::LocaleType::meSubstitute, n, NF_KEY_E, NF_KEY_EC, NF_KEY_EEC, NF_KEY_FIRSTCOLOR, NF_KEY_LASTCOLOR, NF_KEY_NNNN, NF_KEY_R, NF_KEY_RR, NF_KEY_THAI_T, NF_KEYWORD_ENTRIES_COUNT, svt::NF_SYMBOLTYPE_CALDEL, svt::NF_SYMBOLTYPE_CURREXT, svt::NF_SYMBOLTYPE_DATESEP, svt::NF_SYMBOLTYPE_DECSEP, svt::NF_SYMBOLTYPE_EXP, svt::NF_SYMBOLTYPE_FRACBLANK, svt::NF_SYMBOLTYPE_STRING, svt::NF_SYMBOLTYPE_THSEP, svt::NF_SYMBOLTYPE_TIME100SECSEP, svt::NF_SYMBOLTYPE_TIMESEP, SvNumberformat::LocaleType::NONE, ImpSvNumberformatInfo::nTypeArray, NUMBERFORMAT_OP_GE, NUMBERFORMAT_OP_GT, NUMBERFORMAT_OP_LT, NUMBERFORMAT_OP_NO, NumFor, primary(), rScan, SvNumberNatNum::SetLang(), ImpSvNumberformatInfo::sStrArray, and UNDEFINED.

◆ GetMaskedType()

SvNumFormatType SvNumberformat::GetMaskedType ( ) const
inline

◆ GetNatNumModifierString()

OUString SvNumberformat::GetNatNumModifierString ( sal_uInt16  nNumFor = 0) const

Return empty string if no NatNum modifier or invalid nNumFor otherwise return "[NatNum1]" or "[NatNum12 ...]".

Definition at line 5762 of file zformat.cxx.

References SvNumberNatNum::GetNatNum(), ImpSvNumFor::GetNatNum(), SvNumberNatNum::GetParams(), SvNumberNatNum::IsSet(), and NumFor.

Referenced by SvNumberFormatter::GenerateFormat(), and SvNumberFormatter::IsNatNum12().

◆ GetNatNumXml()

void SvNumberformat::GetNatNumXml ( css::i18n::NativeNumberXmlAttributes2 &  rAttr,
sal_uInt16  nNumFor 
) const

◆ GetNewCurrencySymbol()

bool SvNumberformat::GetNewCurrencySymbol ( OUString &  rSymbol,
OUString &  rExtension 
) const

◆ GetNumeratorString()

OUString SvNumberformat::GetNumeratorString ( sal_uInt16  nNumFor) const

Definition at line 2388 of file zformat.cxx.

References ImpSvNumFor::GetCount(), ImpSvNumFor::Info(), and NumFor.

Referenced by SvNumberFormatter::GenerateFormat().

◆ GetNumForInfo()

void SvNumberformat::GetNumForInfo ( sal_uInt16  nNumFor,
SvNumFormatType rScannedType,
bool &  bThousand,
sal_uInt16 &  nPrecision,
sal_uInt16 &  nLeadingCnt 
) const

◆ GetNumForInfoScannedType()

SvNumFormatType SvNumberformat::GetNumForInfoScannedType ( sal_uInt16  nNumFor) const
inline

Get the scanned type of the specified subformat.

Definition at line 346 of file zformat.hxx.

References UNDEFINED.

Referenced by SvNumberFormatter::GetInputLineString(), and ImpSvNumberInputScan::IsNumberFormatMain().

◆ GetNumForNumberElementCount()

sal_uInt16 SvNumberformat::GetNumForNumberElementCount ( sal_uInt16  nNumFor) const

Get the count of numbers among string elements.

Definition at line 5890 of file zformat.cxx.

References ImpSvNumFor::GetCount(), ImpGetNumForStringElementCount(), and NumFor.

◆ GetNumForString()

const OUString * SvNumberformat::GetNumForString ( sal_uInt16  nNumFor,
sal_uInt16  nPos,
bool  bString = false 
) const

◆ GetNumForType()

short SvNumberformat::GetNumForType ( sal_uInt16  nNumFor,
sal_uInt16  nPos 
) const

◆ GetOutputString() [1/3]

bool SvNumberformat::GetOutputString ( double  fNumber,
OUString &  OutString,
const Color **  ppColor 
)

◆ GetOutputString() [2/3]

bool SvNumberformat::GetOutputString ( double  fNumber,
sal_uInt16  nCharCount,
OUString &  rOutString 
) const

Get output string from a numeric value that fits the number of characters specified.

Definition at line 2402 of file zformat.cxx.

References eType, GetFormatter(), ImpGetOutputStdToPrecision(), and NUMBER.

Referenced by SvNumberFormatter::GetInputLineString(), SvNumberFormatter::GetOutputString(), SvNumberFormatter::GetPreviewString(), and lcl_buildBooleanStringFormat().

◆ GetOutputString() [3/3]

void SvNumberformat::GetOutputString ( std::u16string_view  sString,
OUString &  OutString,
const Color **  ppColor 
)

◆ GetPercentString()

OUString SvNumberformat::GetPercentString ( sal_uInt16  nNumFor = 0) const

Definition at line 2374 of file zformat.cxx.

References ImpSvNumFor::GetCount(), ImpSvNumFor::Info(), and NumFor.

Referenced by SvNumberFormatter::GenerateFormat().

◆ GetQuoteEnd()

sal_Int32 SvNumberformat::GetQuoteEnd ( const OUString &  rString,
sal_Int32  nPos,
sal_Unicode  cQuote = '"',
sal_Unicode  cEscIn = '\0' 
)
static

Return the position of a matching closing cQuote if the character at position nPos is between two matching cQuote, otherwise return -1.

If nPos points to an opening cQuote the position of the matching closing cQuote is returned. If nPos points to a closing cQuote nPos is returned. If nPos points into a part which starts with an opening cQuote but has no closing cQuote, rString.Len() is returned. Uses <method>IsInQuote</method> internally, so you don't have to call that prior to a call of this method.

Definition at line 5856 of file zformat.cxx.

References IsInQuote(), nPos, and p.

Referenced by StripNewCurrencyDelimiters(), and ImpSvNumberformatScan::Symbol_Division().

◆ GetRoundFractionValue()

double SvNumberformat::GetRoundFractionValue ( double  fNumber) const

Round fNumber to its fraction representation.

Definition at line 2811 of file zformat.cxx.

References GetSubformatIndex(), and ImpGetFractionElements().

◆ GetSubformatIndex()

sal_uInt16 SvNumberformat::GetSubformatIndex ( double  fNumber) const

Get index of subformat (0..3) according to conditions and fNumber value.

Definition at line 2450 of file zformat.cxx.

References eOp1, eOp2, fLimit1, fLimit2, and ImpCheckCondition().

Referenced by GetOutputString(), and GetRoundFractionValue().

◆ GetThousandDivisorPrecision()

sal_uInt16 SvNumberformat::GetThousandDivisorPrecision ( sal_uInt16  nIx = 0) const

Count of hidden integer digits with thousands divisor: formats like "0," to show only thousands.

Works only with SvNumFormatType::NUMBER and SvNumFormatType::CURRENCY, returns 0 otherwise.

Returns SvNumberFormatter::UNLIMITED_PRECISION for formats that contain the General keyword.

Definition at line 6045 of file zformat.cxx.

References CURRENCY, ImpSvNumberformatInfo::eScannedType, FLAG_STANDARD_IN_FORMAT, ImpSvNumFor::Info(), ImpSvNumberformatInfo::nThousand, NUMBER, NumFor, and SvNumberFormatter::UNLIMITED_PRECISION.

◆ GetType()

SvNumFormatType SvNumberformat::GetType ( ) const
inline

◆ HasNewCurrency()

bool SvNumberformat::HasNewCurrency ( ) const

Definition at line 1965 of file zformat.cxx.

References NumFor.

Referenced by SvNumberFormatter::GetIndexPuttingAndConverting().

◆ HasPositiveBracketPlaceholder()

bool SvNumberformat::HasPositiveBracketPlaceholder ( ) const

◆ HasStringNegativeSign()

bool SvNumberformat::HasStringNegativeSign ( const OUString &  rStr)
static

Definition at line 5781 of file zformat.cxx.

References p.

Referenced by IsNegativeWithoutSign(), and ImpSvNumberInputScan::ScanStringNumFor().

◆ HasTextFormat()

bool SvNumberformat::HasTextFormat ( ) const
inline

Definition at line 252 of file zformat.hxx.

References TEXT.

Referenced by SvNumberFormatter::GetOutputString(), and SvNumberFormatter::GetPreviewString().

◆ ImpAppendEraG()

void SvNumberformat::ImpAppendEraG ( OUStringBuffer &  OutStringBuffer,
const CalendarWrapper rCal,
sal_Int16  nNatNum 
)
staticprivate

◆ ImpCheckCondition()

short SvNumberformat::ImpCheckCondition ( double  fNumber,
double  fLimit,
SvNumberformatLimitOps  eOp 
)
staticprivate

◆ ImpCopyNumberformat()

void SvNumberformat::ImpCopyNumberformat ( const SvNumberformat rFormat)
private

◆ ImpDecimalFill()

bool SvNumberformat::ImpDecimalFill ( OUStringBuffer &  sStr,
double &  rNumber,
sal_Int32  nDecPos,
sal_uInt16  j,
sal_uInt16  nIx,
bool  bInteger 
)
private

◆ ImpDigitFill()

void SvNumberformat::ImpDigitFill ( OUStringBuffer &  sStr,
sal_Int32  nStart,
sal_Int32 &  k,
sal_uInt16  nIx,
sal_Int32 &  nDigitCount,
utl::DigitGroupingIterator rGrouping 
)
private

◆ ImpFallBackToGregorianCalendar()

bool SvNumberformat::ImpFallBackToGregorianCalendar ( OUString &  rOrgCalendar,
double &  fOrgDateTime 
)
private

◆ ImpGetDateOutput()

bool SvNumberformat::ImpGetDateOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

Definition at line 3702 of file zformat.cxx.

References aBuf, aStr, bStarFlag, GetCal(), ImpSvNumFor::GetCount(), CalendarWrapper::getDateTime(), CalendarWrapper::getDisplayString(), CalendarWrapper::getEpochStart(), getLanguageTag(), LocaleDataWrapper::getLanguageTag(), getLocale(), LanguageTag::getLocale(), SvNumberNatNum::GetNatNum(), ImpSvNumFor::GetNatNum(), ImpSvNumberformatScan::GetNullDate(), SvNumberNatNum::GetParams(), CalendarWrapper::getUniqueID(), CalendarWrapper::getValue(), i, ImpAppendEraG(), ImpFallBackToGregorianCalendar(), ImpIntToString(), ImpIsOtherCalendar(), impTransliterate(), ImpUseMonthCase(), ImpSvNumFor::Info(), InsertBlanks(), lcl_appendStarFillChar(), lcl_getValidDate(), lcl_hasEra(), lcl_isSignedYear(), CalendarWrapper::loadCalendar(), NF_KEY_AAA, NF_KEY_AAAA, NF_KEY_D, NF_KEY_DD, NF_KEY_DDD, NF_KEY_DDDD, NF_KEY_EC, NF_KEY_EEC, NF_KEY_G, NF_KEY_GG, NF_KEY_GGG, NF_KEY_M, NF_KEY_MM, NF_KEY_MMM, NF_KEY_MMMM, NF_KEY_MMMMM, NF_KEY_NN, NF_KEY_NNN, NF_KEY_NNNN, NF_KEY_Q, NF_KEY_QQ, NF_KEY_R, NF_KEY_RR, NF_KEY_WW, NF_KEY_YY, NF_KEY_YYYY, svt::NF_SYMBOLTYPE_BLANK, svt::NF_SYMBOLTYPE_CALENDAR, svt::NF_SYMBOLTYPE_CURRENCY, svt::NF_SYMBOLTYPE_DATESEP, svt::NF_SYMBOLTYPE_STAR, svt::NF_SYMBOLTYPE_STRING, svt::NF_SYMBOLTYPE_TIME100SECSEP, svt::NF_SYMBOLTYPE_TIMESEP, nNatNum, ImpSvNumberformatInfo::nTypeArray, NumFor, padToLength(), rLoc(), rScan, ImpSvNumberformatScan::sErrStr, CalendarWrapper::setDateTime(), CalendarWrapper::setLocalDateTime(), ImpSvNumberformatInfo::sStrArray, SwitchToGregorianCalendar(), and SwitchToOtherCalendar().

Referenced by GetOutputString().

◆ ImpGetDateTimeOutput()

bool SvNumberformat::ImpGetDateTimeOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

Definition at line 3972 of file zformat.cxx.

References aBuf, bStarFlag, ImpSvNumberformatInfo::bThousand, GetCal(), tools::Time::GetClock(), ImpSvNumFor::GetCount(), CalendarWrapper::getDateTime(), CalendarWrapper::getDisplayName(), CalendarWrapper::getDisplayString(), CalendarWrapper::getEpochStart(), getLanguageTag(), LocaleDataWrapper::getLanguageTag(), getLocale(), LanguageTag::getLocale(), SvNumberNatNum::GetNatNum(), ImpSvNumFor::GetNatNum(), ImpSvNumberformatScan::GetNullDate(), ImpSvNumberformatScan::GetStandardPrec(), CalendarWrapper::getUniqueID(), CalendarWrapper::getValue(), i, ImpAppendEraG(), ImpFallBackToGregorianCalendar(), ImpGetFractionOfSecondString(), ImpIntToString(), ImpIsOtherCalendar(), impTransliterate(), ImpUseMonthCase(), ImpSvNumFor::Info(), SvNumberFormatter::INPUTSTRING_PRECISION, InsertBlanks(), lcl_appendStarFillChar(), lcl_getValidDate(), lcl_hasEra(), lcl_isSignedYear(), CalendarWrapper::loadCalendar(), ImpSvNumberformatInfo::nCntExp, ImpSvNumberformatInfo::nCntPost, NF_KEY_AAA, NF_KEY_AAAA, NF_KEY_AMPM, NF_KEY_AP, NF_KEY_D, NF_KEY_DD, NF_KEY_DDD, NF_KEY_DDDD, NF_KEY_EC, NF_KEY_EEC, NF_KEY_G, NF_KEY_GG, NF_KEY_GGG, NF_KEY_H, NF_KEY_HH, NF_KEY_M, NF_KEY_MI, NF_KEY_MM, NF_KEY_MMI, NF_KEY_MMM, NF_KEY_MMMM, NF_KEY_MMMMM, NF_KEY_NN, NF_KEY_NNN, NF_KEY_NNNN, NF_KEY_Q, NF_KEY_QQ, NF_KEY_R, NF_KEY_RR, NF_KEY_S, NF_KEY_SS, NF_KEY_WW, NF_KEY_YY, NF_KEY_YYYY, svt::NF_SYMBOLTYPE_BLANK, svt::NF_SYMBOLTYPE_CALENDAR, svt::NF_SYMBOLTYPE_CURRENCY, svt::NF_SYMBOLTYPE_DATESEP, svt::NF_SYMBOLTYPE_DIGIT, svt::NF_SYMBOLTYPE_STAR, svt::NF_SYMBOLTYPE_STRING, svt::NF_SYMBOLTYPE_TIME100SECSEP, svt::NF_SYMBOLTYPE_TIMESEP, nNatNum, ImpSvNumberformatInfo::nThousand, ImpSvNumberformatInfo::nTypeArray, NumFor, padToLength(), rLoc(), rScan, ImpSvNumberformatScan::sErrStr, CalendarWrapper::setDateTime(), CalendarWrapper::setLocalDateTime(), ImpSvNumberformatInfo::sStrArray, SwitchToGregorianCalendar(), and SwitchToOtherCalendar().

Referenced by GetOutputString().

◆ ImpGetFractionElements()

void SvNumberformat::ImpGetFractionElements ( double &  fNumber,
sal_uInt16  nIx,
double &  fIntPart,
sal_Int64 &  nFrac,
sal_Int64 &  nDiv 
) const
private

Calculate each element of fraction: integer part, numerator part, denominator part.

Parameters
fNumbervalue to be represented as fraction. Will contain absolute fractional part
nIxsubformat number 0..3
fIntPartintegral part of fraction
nFracnumerator of fraction
nDicdenominator of fraction

Definition at line 2825 of file zformat.cxx.

References ImpSvNumFor::Info(), ImpSvNumberformatInfo::nCntExp, and NumFor.

Referenced by GetRoundFractionValue(), and ImpGetFractionOutput().

◆ ImpGetFractionOfSecondString()

sal_uInt16 SvNumberformat::ImpGetFractionOfSecondString ( OUStringBuffer &  rBuf,
double  fFractionOfSecond,
int  nFractionDecimals,
bool  bAddOneRoundingDecimal,
sal_uInt16  nIx,
sal_uInt16  nMinimumInputLineDecimals 
)
private

Definition at line 3052 of file zformat.cxx.

References impTransliterate(), index, and NumFor.

Referenced by ImpGetDateTimeOutput(), and ImpGetTimeOutput().

◆ ImpGetFractionOutput()

bool SvNumberformat::ImpGetFractionOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

◆ ImpGetLocaleType()

SvNumberformat::LocaleType SvNumberformat::ImpGetLocaleType ( std::u16string_view  rString,
sal_Int32 &  nPos 
)
staticprivate

Parse the content of '[$-xxx] or '[$-xxxxxxxx]' and extract the locale type from it.

Given the string, start parsing at position specified by nPos, and store the end position with nPos when the parsing is complete. The nPos should point to the '$' before the parsing, and to the closing bracket after the parsing. When the content is [$-xxx], the xxx part represents the language type (aka LCID) in hex numerals. When the content is [$-xxxxxxxx] the last 4 digits represent the LCID (again in hex), the next 2 digits represent the calendar type, and the 2 highest digits (if exists) is the numeral shape.

@reference http://office.microsoft.com/en-us/excel-help/creating-international-number-formats-HA001034635.aspx

Parameters
rStringinput string
nPosposition (see above).
Returns
struct containing numeral shape, calendar type, and LCID that specifies language type. See i18nlangtag/lang.h for a complete list of language types. These numbers also correspond with the numbers used by Microsoft Office.

Definition at line 1607 of file zformat.cxx.

References nPos.

Referenced by SvNumberformat().

◆ ImpGetLogicalOutput()

bool SvNumberformat::ImpGetLogicalOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

◆ ImpGetNatNumString()

OUString SvNumberformat::ImpGetNatNumString ( const SvNumberNatNum rNum,
sal_Int64  nVal,
sal_uInt16  nMinDigits 
) const
private

Definition at line 5615 of file zformat.cxx.

References aBuf, aStr, impTransliterate(), index, and SAL_N_ELEMENTS.

◆ ImpGetNumber()

sal_Int32 SvNumberformat::ImpGetNumber ( OUStringBuffer &  rString,
sal_Int32 &  nPos,
OUString &  sSymbol 
)
staticprivate

Definition at line 1436 of file zformat.cxx.

References nPos.

Referenced by SvNumberformat().

◆ ImpGetNumberOutput()

bool SvNumberformat::ImpGetNumberOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

◆ ImpGetNumForStringElementCount()

sal_uInt16 SvNumberformat::ImpGetNumForStringElementCount ( sal_uInt16  nNumFor) const
private

◆ ImpGetOutputInputLine()

void SvNumberformat::ImpGetOutputInputLine ( double  fNumber,
OUString &  OutString 
) const
private

Definition at line 2118 of file zformat.cxx.

References D_MAX_D_BY_100, eType, GetFormatter(), OutString(), and PERCENT.

Referenced by GetOutputString().

◆ ImpGetOutputStandard() [1/2]

void SvNumberformat::ImpGetOutputStandard ( double &  fNumber,
OUString &  OutString 
) const
private

◆ ImpGetOutputStandard() [2/2]

void SvNumberformat::ImpGetOutputStandard ( double &  fNumber,
OUStringBuffer &  OutString 
) const
private

Definition at line 2053 of file zformat.cxx.

References ImpGetOutputStandard().

◆ ImpGetOutputStdToPrecision()

void SvNumberformat::ImpGetOutputStdToPrecision ( double &  rNumber,
OUString &  rOutString,
sal_uInt16  nPrecision 
) const
private

◆ ImpGetScientificOutput()

bool SvNumberformat::ImpGetScientificOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

◆ ImpGetTimeOutput()

bool SvNumberformat::ImpGetTimeOutput ( double  fNumber,
sal_uInt16  nIx,
OUStringBuffer &  OutString 
)
private

◆ ImpIntToString()

OUString SvNumberformat::ImpIntToString ( sal_uInt16  nIx,
sal_Int64  nVal,
sal_uInt16  nMinDigits = 0 
) const
inlineprivate

◆ ImpIsIso8601()

bool SvNumberformat::ImpIsIso8601 ( const ImpSvNumFor rNumFor) const
private

◆ ImpIsOtherCalendar()

bool SvNumberformat::ImpIsOtherCalendar ( const ImpSvNumFor rNumFor) const
private

◆ ImpNextSymbol()

short SvNumberformat::ImpNextSymbol ( OUStringBuffer &  rString,
sal_Int32 &  nPos,
OUString &  sSymbol 
) const
private

◆ ImpNumberFill()

bool SvNumberformat::ImpNumberFill ( OUStringBuffer &  sStr,
double &  rNumber,
sal_Int32 &  k,
sal_uInt16 &  j,
sal_uInt16  nIx,
short  eSymbolType,
bool  bInsertRightBlank = false 
)
private

◆ ImpNumberFillWithThousands()

bool SvNumberformat::ImpNumberFillWithThousands ( OUStringBuffer &  sStr,
double &  rNumber,
sal_Int32  k,
sal_uInt16  j,
sal_uInt16  nIx,
sal_Int32  nDigCnt,
bool  bAddDecSep = true 
)
private

◆ ImpObtainCalendarAndNumerals()

OUString SvNumberformat::ImpObtainCalendarAndNumerals ( OUStringBuffer &  rString,
sal_Int32  nPos,
LanguageType nLang,
const LocaleType aTmpLocale 
)
private

Obtain calendar and numerals from a LocaleType that was parsed from a LCID with ImpGetLocaleType().

Import extended LCID from Excel.

Inserts a NatNum modifier to rString at nPos if needed as determined from the numeral code.

@ATTENTION: may modify <member>maLocale</member> to make it follow aTmpLocale, in which case also nLang is adapted.

Returns
a string with the calendar if one was determined from the calendar code, else an empty string. The calendar string needs to be inserted at a proper position to rString after all bracketed prefixes.

Reference language for each numeral ID

Definition at line 423 of file zformat.cxx.

References MsLangId::getRealLanguage(), LANGUAGE_ARABIC_PRIMARY_ONLY, LANGUAGE_ARABIC_SAUDI_ARABIA, LANGUAGE_BENGALI, LANGUAGE_BURMESE, LANGUAGE_CHINESE_HONGKONG, LANGUAGE_CHINESE_LSO, LANGUAGE_CHINESE_MACAU, LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_SINGAPORE, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_DONTKNOW, LANGUAGE_ENGLISH_US, LANGUAGE_FARSI, LANGUAGE_GUJARATI, LANGUAGE_HINDI, LANGUAGE_JAPANESE, LANGUAGE_KANNADA, LANGUAGE_KHMER, LANGUAGE_KOREAN, LANGUAGE_LAO, LANGUAGE_MALAYALAM, LANGUAGE_MARATHI, LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA, LANGUAGE_MONGOLIAN_MONGOLIAN_LSO, LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA, LANGUAGE_NEPALI, LANGUAGE_ODIA, LANGUAGE_PUNJABI, LANGUAGE_PUNJABI_ARABIC_LSO, LANGUAGE_TAMIL, LANGUAGE_TELUGU, LANGUAGE_THAI, LANGUAGE_TIBETAN, LANGUAGE_TIGRIGNA_ETHIOPIA, maLocale, SvNumberformat::LocaleType::meLanguage, SvNumberformat::LocaleType::mnCalendarType, SvNumberformat::LocaleType::mnNumeralShape, nNatNum, nPos, and primary().

Referenced by SvNumberformat().

◆ impTransliterate() [1/3]

OUString SvNumberformat::impTransliterate ( const OUString &  rStr,
const SvNumberNatNum rNum 
) const
inlineprivate

◆ impTransliterate() [2/3]

OUString SvNumberformat::impTransliterate ( const OUString &  rStr,
const SvNumberNatNum rNum,
sal_uInt16  nDateKey 
) const
inlineprivate

Definition at line 754 of file zformat.hxx.

References SvNumberNatNum::IsComplete().

◆ impTransliterate() [3/3]

SVL_DLLPRIVATE void SvNumberformat::impTransliterate ( OUStringBuffer &  rStr,
const SvNumberNatNum rNum 
) const
inlineprivate

Definition at line 746 of file zformat.hxx.

References SvNumberNatNum::IsComplete().

◆ impTransliterateImpl() [1/3]

OUString SvNumberformat::impTransliterateImpl ( const OUString &  rStr,
const SvNumberNatNum rNum 
) const
private

◆ impTransliterateImpl() [2/3]

OUString SvNumberformat::impTransliterateImpl ( const OUString &  rStr,
const SvNumberNatNum rNum,
sal_uInt16  nDateKey 
) const
private

◆ impTransliterateImpl() [3/3]

void SvNumberformat::impTransliterateImpl ( OUStringBuffer &  rStr,
const SvNumberNatNum rNum 
) const
private

◆ ImpUseMonthCase()

sal_Int32 SvNumberformat::ImpUseMonthCase ( int io_nState,
const ImpSvNumFor rNumFor,
NfKeywordIndex  eCodeType 
)
staticprivate

Whether to use possessive genitive case month name, or partitive case month name, instead of nominative name (noun).

If a day of month occurs within the format, the month name is in possessive genitive case if the day follows the month, and partitive case if the day precedes the month.

Parameters
io_nState0: execute check
set to 1 if nominative case is returned,
set to 2 if genitive case is returned,
set to 3 if partitive case is returned
1: don't execute check, return nominative case
2: don't execute check, return genitive case
3: don't execute check, return partitive case
eCodeTypea NfKeywordIndex, must designate a month type code
Returns
one of css::i18n::CalendarDisplayCode values according to eCodeType and the check executed (or passed).

If there is no day of month the nominative case (noun) is returned. Also if the month is immediately preceded or followed by a literal string other than space and not followed by a comma, the nominative name is used, this prevents duplicated casing for MMMM\tand such in documents imported from (e.g. Finnish) Excel or older LibO/OOo releases.

Definition at line 3300 of file zformat.cxx.

References ImpSvNumFor::GetCount(), i, ImpSvNumFor::Info(), nCount, NF_KEY_D, NF_KEY_DD, NF_KEY_MMM, NF_KEY_MMMM, NF_KEY_MMMMM, svt::NF_SYMBOLTYPE_STRING, ImpSvNumberformatInfo::nTypeArray, SAL_WARN, and ImpSvNumberformatInfo::sStrArray.

Referenced by ImpGetDateOutput(), and ImpGetDateTimeOutput().

◆ InsertBlanks() [1/2]

static sal_Int32 SvNumberformat::InsertBlanks ( OUString &  r,
sal_Int32  nPos,
sal_Unicode  c 
)
inlinestatic

Insert the number of blanks into the string that is needed to simulate the width of character c for underscore formats.

Definition at line 428 of file zformat.hxx.

References nPos, and result.

Referenced by GetOutputString(), ImpDecimalFill(), ImpGetDateOutput(), ImpGetDateTimeOutput(), ImpGetTimeOutput(), ImpNumberFill(), and ImpNumberFillWithThousands().

◆ InsertBlanks() [2/2]

sal_Int32 SvNumberformat::InsertBlanks ( OUStringBuffer &  r,
sal_Int32  nPos,
sal_Unicode  c 
)
static

Insert the number of blanks into the string that is needed to simulate the width of character c for underscore formats.

Definition at line 85 of file zformat.cxx.

References cCharWidths, n, and nPos.

◆ IsAdditionalBuiltin()

bool SvNumberformat::IsAdditionalBuiltin ( ) const
inline

Definition at line 199 of file zformat.hxx.

◆ IsFirstSubformatRealNegative()

bool SvNumberformat::IsFirstSubformatRealNegative ( ) const
inline

◆ IsInQuote()

bool SvNumberformat::IsInQuote ( const OUString &  rString,
sal_Int32  nPos,
sal_Unicode  cQuote = '"',
sal_Unicode  cEscIn = '\0',
sal_Unicode  cEscOut = '\\' 
)
static

Whether a character at position nPos is somewhere between two matching cQuote or not.

If nPos points to a cQuote, a true is returned on an opening cQuote, a false is returned on a closing cQuote. A cQuote between quotes may be escaped by a cEscIn, a cQuote outside of quotes may be escaped by a cEscOut. The default '\0' results in no escapement possible. Defaults are set right according to the "unlogic" of the Numberformatter

Definition at line 5815 of file zformat.cxx.

References nPos, and p.

Referenced by GetQuoteEnd().

◆ IsIso8601()

bool SvNumberformat::IsIso8601 ( sal_uInt16  nNumFor) const
inline

Whether it's a (YY)YY-M(M)-D(D) format.

Definition at line 497 of file zformat.hxx.

Referenced by SvNumberFormatter::GetEditFormat().

◆ IsMinuteSecondFormat()

bool SvNumberformat::IsMinuteSecondFormat ( ) const

◆ IsNegativeInBracket()

bool SvNumberformat::IsNegativeInBracket ( ) const

◆ IsNegativeWithoutSign()

bool SvNumberformat::IsNegativeWithoutSign ( ) const

◆ IsNumForStringElementCountEqual()

bool SvNumberformat::IsNumForStringElementCountEqual ( sal_uInt16  nNumFor,
sal_uInt16  nAllCount,
sal_uInt16  nNumCount 
) const
inline

If the count of string elements (substrings, ignoring [modifiers] and so on) in a subformat code nNumFor (0..3) is equal to the given number.

Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched format.

Definition at line 323 of file zformat.hxx.

Referenced by ImpSvNumberInputScan::IsNumberFormatMain().

◆ IsSecondSubformatRealNegative()

bool SvNumberformat::IsSecondSubformatRealNegative ( ) const
inline

◆ IsStandard()

bool SvNumberformat::IsStandard ( ) const
inline

◆ IsSubstituted()

bool SvNumberformat::IsSubstituted ( ) const
inline

If the format is a placeholder and needs to be substituted.

Definition at line 204 of file zformat.hxx.

Referenced by SvNumberFormatter::ImpSubstituteEntry(), and SvNumberformat().

◆ IsSystemLongDateFormat()

bool SvNumberformat::IsSystemLongDateFormat ( ) const
inline

If the format is a placeholder for the system long date format and needs to be substituted during formatting time.

Definition at line 220 of file zformat.hxx.

References LANGUAGE_SYSTEM.

Referenced by SvNumberFormatter::ImpSubstituteEntry(), and SvNumberformat().

◆ IsSystemTimeFormat()

bool SvNumberformat::IsSystemTimeFormat ( ) const
inline

If the format is a placeholder for the system time format and needs to be substituted during formatting time.

Definition at line 212 of file zformat.hxx.

References LANGUAGE_SYSTEM.

Referenced by SvNumberFormatter::ImpSubstituteEntry(), and SvNumberformat().

◆ IsTextFormat()

bool SvNumberformat::IsTextFormat ( ) const
inline

◆ rChrCls()

const CharClass & SvNumberformat::rChrCls ( ) const
private

Definition at line 6061 of file zformat.cxx.

References ImpSvNumberformatScan::GetChrCls(), and rScan.

Referenced by ImpNextSymbol().

◆ rLoc()

const LocaleDataWrapper & SvNumberformat::rLoc ( ) const
private

◆ SetAdditionalBuiltin()

void SvNumberformat::SetAdditionalBuiltin ( )
inline

Definition at line 198 of file zformat.hxx.

◆ SetComment()

void SvNumberformat::SetComment ( const OUString &  rStr)
inline

Definition at line 422 of file zformat.hxx.

Referenced by SvNumberFormatter::ImpGenerateFormats().

◆ SetLastInsertKey()

void SvNumberformat::SetLastInsertKey ( sal_uInt16  nKey,
const FormatterPrivateAccess  
)
inline

◆ SetStandard()

void SvNumberformat::SetStandard ( )
inline

◆ SetStarFormatSupport()

void SvNumberformat::SetStarFormatSupport ( bool  b)
inline

◆ SetType()

void SvNumberformat::SetType ( SvNumFormatType  eSetType)
inline

Definition at line 192 of file zformat.hxx.

References eType.

Referenced by SvNumberFormatter::ImpGenerateFormats().

◆ StripNewCurrencyDelimiters()

OUString SvNumberformat::StripNewCurrencyDelimiters ( const OUString &  rStr)
static

Definition at line 1993 of file zformat.cxx.

References GetQuoteEnd(), and nPos.

Referenced by SvNumberFormatter::ImpInsertFormat().

◆ SwitchToGregorianCalendar()

void SvNumberformat::SwitchToGregorianCalendar ( std::u16string_view  rOrgCalendar,
double  fOrgDateTime 
) const

Switches to the "gregorian" calendar, but only if the current calendar is non-"gregorian" and rOrgCalendar is not empty.

Thus a preceding ImpSwitchToOtherCalendar() call should have been placed prior to calling this method.

Definition at line 3464 of file zformat.cxx.

References GetCal(), getLanguageTag(), getLocale(), CalendarWrapper::getUniqueID(), CalendarWrapper::loadCalendar(), rLoc(), and CalendarWrapper::setDateTime().

Referenced by ImpGetDateOutput(), and ImpGetDateTimeOutput().

◆ SwitchToOtherCalendar()

void SvNumberformat::SwitchToOtherCalendar ( OUString &  rOrgCalendar,
double &  fOrgDateTime 
) const

Switches to the first non-"gregorian" calendar, but only if the current calendar is "gregorian"; original calendar name and date/time returned, but only if calendar switched and rOrgCalendar was empty.

Definition at line 3436 of file zformat.cxx.

References CalendarWrapper::getAllCalendars(), GetCal(), CalendarWrapper::getDateTime(), getLanguageTag(), getLocale(), CalendarWrapper::getUniqueID(), CalendarWrapper::loadCalendar(), rLoc(), and CalendarWrapper::setDateTime().

Referenced by ImpSvNumberInputScan::GetDateRef(), ImpGetDateOutput(), and ImpGetDateTimeOutput().

Member Data Documentation

◆ bAdditionalBuiltin

bool SvNumberformat::bAdditionalBuiltin
private

Definition at line 515 of file zformat.hxx.

Referenced by ImpCopyNumberformat().

◆ bIsUsed

bool SvNumberformat::bIsUsed
private

Definition at line 518 of file zformat.hxx.

Referenced by ImpCopyNumberformat(), and SvNumberformat().

◆ bStandard

bool SvNumberformat::bStandard
private

Definition at line 517 of file zformat.hxx.

Referenced by GetNumForInfo(), GetOutputString(), ImpCopyNumberformat(), and SvNumberformat().

◆ bStarFlag

bool SvNumberformat::bStarFlag
private

◆ eOp1

SvNumberformatLimitOps SvNumberformat::eOp1
private

◆ eOp2

SvNumberformatLimitOps SvNumberformat::eOp2
private

◆ eType

SvNumFormatType SvNumberformat::eType
private

◆ fLimit1

double SvNumberformat::fLimit1
private

◆ fLimit2

double SvNumberformat::fLimit2
private

◆ maLocale

LocaleType SvNumberformat::maLocale
private

◆ NumFor

ImpSvNumFor SvNumberformat::NumFor[4]
private

◆ rScan

ImpSvNumberformatScan& SvNumberformat::rScan
private

◆ sComment

OUString SvNumberformat::sComment
private

Definition at line 507 of file zformat.hxx.

Referenced by ImpCopyNumberformat().

◆ sFormatstring

OUString SvNumberformat::sFormatstring
private

Definition at line 506 of file zformat.hxx.

Referenced by ConvertLanguage(), GetOutputString(), ImpCopyNumberformat(), and SvNumberformat().


The documentation for this class was generated from the following files: