32#include <com/sun/star/i18n/KNumberFormatUsage.hpp>
33#include <com/sun/star/i18n/KNumberFormatType.hpp>
34#include <com/sun/star/i18n/LocaleData2.hpp>
35#include <com/sun/star/i18n/NumberFormatIndex.hpp>
36#include <com/sun/star/i18n/NumberFormatMapper.hpp>
40#include <rtl/ustrbuf.hxx>
41#include <rtl/math.hxx>
56 uno::Sequence< lang::Locale > gInstalledLocales;
57 std::vector< LanguageType > gInstalledLanguageTypes;
63 const Reference< uno::XComponentContext > & rxContext,
68 xLD( LocaleData2::
create(rxContext) ),
72 loadDateAcceptancePatterns({});
77 const std::vector<OUString> & rOverrideDateAcceptancePatterns
108 if ( !aCurrSeq.hasElements() )
111 outputCheckMessage(
"LocaleDataWrapper::getCurrSymbolsImpl: no currency at all, using ShellsAndPebbles");
119 auto pCurr = std::find_if(aCurrSeq.begin(), aCurrSeq.end(),
120 [](
const Currency2& rCurr) { return rCurr.Default; });
121 if ( pCurr == aCurrSeq.end() )
127 pCurr = aCurrSeq.begin();
141 if (xCals.getLength() > 1)
143 auto pCal = std::find_if(xCals.begin(), xCals.end(),
144 [](
const Calendar2& rCal) { return !rCal.Default; });
145 if (pCal != xCals.end())
148 auto pCal = xCals.begin();
149 if (xCals.getLength() > 1)
151 pCal = std::find_if(xCals.begin(), xCals.end(),
152 [](
const Calendar2& rCal) { return rCal.Default; });
153 if (pCal == xCals.end())
154 pCal = xCals.begin();
176 aReservedWords = comphelper::sequenceToContainer<std::vector<OUString>>(
xLD->getReservedWord( rMyLocale ));
190 static const css::i18n::LocaleDataItem2 aEmptyItem;
226 return css::i18n::LanguageCountryInfo();
270 return css::i18n::ForbiddenCharacters();
275 uno::Sequence< lang::Locale > &rInstalledLocales = gInstalledLocales;
277 if ( rInstalledLocales.hasElements() )
278 return rInstalledLocales;
282 rInstalledLocales =
xLD->getAllInstalledLocaleNames();
288 return rInstalledLocales;
296 const uno::Sequence< lang::Locale > &rInstalledLocales = gInstalledLocales;
298 if ( !rInstalledLocales.hasElements() )
303 return rInstalledLocales;
309 std::vector< LanguageType > &rInstalledLanguageTypes = gInstalledLanguageTypes;
311 if ( !rInstalledLanguageTypes.empty() )
312 return rInstalledLanguageTypes;
315 sal_Int32
nCount = xLoc.getLength();
316 std::vector< LanguageType > xLang;
318 for (
const auto& rLoc : xLoc )
321 OUString aDebugLocale;
324 aDebugLocale = aLanguageTag.
getBcp47(
false);
330 OUString aMsg =
"ConvertIsoNamesToLanguage: unknown MS-LCID for locale\n" +
340 if ( aLanguageTag != aBackLanguageTag )
345 && aDebugLocale !=
"ar-SD"
346 && aDebugLocale !=
"en-CB"
352 "ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)\n"
355 + OUString::number(
static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(eLang)), 16)
363 xLang.push_back(eLang);
365 rInstalledLanguageTypes = xLang;
367 return rInstalledLanguageTypes;
372 if ( nItem >= LocaleItem::COUNT2 )
374 SAL_WARN(
"unotools.i18n",
"getOneLocaleItem: bounds" );
384 SAL_WARN(
"unotools.i18n",
"getOneReservedWord: bounds" );
385 static const OUString
EMPTY;
407 const OUString& aBcp47( aLoaded.
getBcp47());
410 if ( aBcp47 !=
"ja-JP" &&
466 sal_Int32 nStart, sal_Int32& nSign, sal_Int32& nPar,
467 sal_Int32& nNum, sal_Int32& nBlank, sal_Int32& nSym )
const
469 nSign = nPar = nNum = nBlank = nSym = -1;
471 const sal_Unicode*
const pStop = pStr + rCode.size();
479 if ( *
p ==
'"' && *(
p-1) !=
'\\' )
487 if ( pStr ==
p || *(
p-1) !=
'\\' )
491 if (!nInSection && nSign == -1)
495 if (!nInSection && nPar == -1)
500 if (!nInSection && nNum == -1)
510 if (!nInSection && nBlank == -1
511 && nSym != -1 &&
p < pStop-1 && *(
p+1) ==
' ' )
512 nBlank =
p - pStr + 1;
516 if (nSym == -1 && nInSection && *(
p-1) ==
'[')
519 if (nNum != -1 && *(
p-2) ==
' ')
520 nBlank =
p - pStr - 2;
531 if (nBlank == -1 && pStr <
p && *(
p-1) ==
' ')
532 nBlank =
p - pStr - 1;
534 if (nBlank == -1 &&
p < pStop-2 && *(
p+2) ==
' ')
535 nBlank =
p - pStr + 2;
545 css::uno::Reference< css::i18n::XNumberFormatCode > xNFC = i18n::NumberFormatMapper::create(
m_xContext );
546 uno::Sequence< NumberFormatCode > aFormatSeq = xNFC->getAllFormatCode( KNumberFormatUsage::CURRENCY,
maLanguageTag.
getLocale() );
547 sal_Int32 nCnt = aFormatSeq.getLength();
558 NumberFormatCode
const *
const pFormatArr = aFormatSeq.getArray();
559 sal_Int32 nElem, nDef, nNeg, nMedium;
560 nDef = nNeg = nMedium = -1;
561 for ( nElem = 0; nElem < nCnt; nElem++ )
563 if ( pFormatArr[nElem].
Type == KNumberFormatType::MEDIUM )
565 if ( pFormatArr[nElem].
Default )
569 if ( pFormatArr[nElem].Code.indexOf(
';' ) >= 0 )
574 if ( (nNeg == -1 || nMedium == -1) && pFormatArr[nElem].Code.indexOf(
';' ) >= 0 )
582 if ( nDef == -1 && pFormatArr[nElem].
Default )
584 if ( nNeg == -1 && pFormatArr[nElem].Code.indexOf(
';' ) >= 0 )
589 sal_Int32 nSign, nPar, nNum, nBlank, nSym;
592 nElem = (nDef >= 0 ? nDef : (nNeg >= 0 ? nNeg : 0));
618 const OUString& rCode = pFormatArr[nNeg].Code;
619 sal_Int32 nDelim = rCode.indexOf(
';');
621 if (
areChecksEnabled() && (nNum == -1 || nSym == -1 || (nPar == -1 && nSign == -1)))
630 if ( -1 < nPar && nPar < nSym )
632 else if ( -1 < nSign && nSign < nSym )
634 else if ( nNum < nSign )
641 if ( -1 < nPar && nPar < nNum )
643 else if ( -1 < nSign && nSign < nNum )
645 else if ( nSym < nSign )
655 if ( -1 < nPar && nPar < nSym )
657 else if ( -1 < nSign && nSign < nSym )
659 else if ( nNum < nSign )
666 if ( -1 < nPar && nPar < nNum )
668 else if ( -1 < nSign && nSign < nNum )
670 else if ( nSym < nSign )
699 size_t nDay = rCode.find(
'D');
700 size_t nMonth = rCode.find(
'M');
701 size_t nYear = rCode.find(
'Y');
702 if (nDay == std::u16string_view::npos || nMonth == std::u16string_view::npos || nYear == std::u16string_view::npos)
704 if (nMonth == std::u16string_view::npos)
706 nMonth = rCode.find(
'K');
707 if (nMonth != std::u16string_view::npos)
709 nDay = rCode.find(
'P');
710 nYear = rCode.find(
'V');
713 else if (nDay == std::u16string_view::npos)
717 nDay = rCode.find(
'T');
718 if (nDay != std::u16string_view::npos)
719 nYear = rCode.find(
'J');
722 nYear = rCode.find(
'A');
723 if (nYear != std::u16string_view::npos)
725 nDay = rCode.find(
'J');
726 if (nDay == std::u16string_view::npos)
727 nDay = rCode.find(
'G');
735 nYear = rCode.find(
'A');
736 if (nYear == std::u16string_view::npos)
737 nYear = rCode.find(
'J');
739 if (nDay == std::u16string_view::npos || nMonth == std::u16string_view::npos || nYear == std::u16string_view::npos)
745 if (nDay == std::u16string_view::npos)
747 if (nMonth == std::u16string_view::npos)
748 nMonth = rCode.size();
749 if (nYear == std::u16string_view::npos)
750 nYear = rCode.size();
754 if ( nDay <= nMonth && nMonth <= nYear )
756 else if ( nMonth <= nDay && nDay <= nYear )
758 else if ( nYear <= nMonth && nMonth <= nDay )
760 else if ( nYear <= nDay && nDay <= nMonth )
787 assert(!
"unhandled LongDateOrder to DateOrder");
794 css::uno::Reference< css::i18n::XNumberFormatCode > xNFC = i18n::NumberFormatMapper::create(
m_xContext );
795 uno::Sequence< NumberFormatCode > aFormatSeq = xNFC->getAllFormatCode( KNumberFormatUsage::DATE,
maLanguageTag.
getLocale() );
796 sal_Int32 nCnt = aFormatSeq.getLength();
809 NumberFormatCode
const *
const pFormatArr = aFormatSeq.getArray();
810 sal_Int32 nEdit, nDef, nMedium, nLong;
811 nEdit = nDef = nMedium = nLong = -1;
812 for ( sal_Int32 nElem = 0; nElem < nCnt; nElem++ )
814 if ( nEdit == -1 && pFormatArr[nElem].
Index == NumberFormatIndex::DATE_SYS_DDMMYYYY )
816 if ( nDef == -1 && pFormatArr[nElem].
Default )
818 switch ( pFormatArr[nElem].
Type )
820 case KNumberFormatType::MEDIUM :
822 if ( pFormatArr[nElem].
Default )
827 else if ( nMedium == -1 )
831 case KNumberFormatType::LONG :
833 if ( pFormatArr[nElem].
Default )
835 else if ( nLong == -1 )
855 else if ( nLong != -1 )
863 if ( pFormatArr[nEdit].
Type == KNumberFormatType::LONG )
895 if (aLCInfo.Country.equalsIgnoreAsciiCase(
"IN") ||
896 aLCInfo.Country.equalsIgnoreAsciiCase(
"BT") )
916static void ImplAddUNum( OUStringBuffer& rBuf, sal_uInt64 nNumber )
923 *pTempBuf =
static_cast<sal_Unicode>(nNumber % 10) +
'0';
933 rBuf.append(*pTempBuf);
935 while ( pTempBuf != aTempBuf );
938static void ImplAddUNum( OUStringBuffer& rBuf, sal_uInt64 nNumber,
int nMinLen )
945 *pTempBuf =
static_cast<sal_Unicode>(nNumber % 10) +
'0';
953 while ( nMinLen > 0 )
963 rBuf.append(*pTempBuf);
965 while ( pTempBuf != aTempBuf );
968static void ImplAddNum( OUStringBuffer& rBuf, sal_Int64 nNumber,
int nMinLen )
980 DBG_ASSERT( nNumber < 100,
"ImplAdd2UNum() - Number >= 100" );
985 rBuf.append(
static_cast<char>(nNumber +
'0'));
989 sal_uInt16 nTemp = nNumber % 10;
991 rBuf.append(
static_cast<char>(nNumber +
'0'));
992 rBuf.append(
static_cast<char>(nTemp +
'0'));
998 DBG_ASSERT( nNumber < 1000000000,
"ImplAdd9UNum() - Number >= 1000000000" );
1000 std::ostringstream ostr;
1004 std::string
aStr = ostr.str();
1005 rBuf.appendAscii(
aStr.c_str(),
aStr.size());
1009 sal_Int64 nNumber, sal_uInt16 nDecimals,
bool bUseThousandSep,
1010 bool bTrailingZeros )
const
1012 OUStringBuffer aNumBuf(64);
1020 abs = nNumber == std::numeric_limits<sal_Int64>::min()
1021 ?
static_cast<sal_uInt64
>(std::numeric_limits<sal_Int64>::min()) : nNumber * -1;
1031 nNumLen =
static_cast<sal_uInt16
>(aNumBuf.getLength());
1033 if ( nNumLen <= nDecimals )
1036 if ( !nNumber && !bTrailingZeros )
1053 while (
i < (nDecimals-nNumLen) )
1060 rBuf.append(aNumBuf);
1068 sal_uInt16 nNumLen2 = nNumLen-nDecimals;
1069 uno::Sequence< sal_Bool > aGroupPos;
1070 if (bUseThousandSep)
1074 for (;
i < nNumLen2; ++
i )
1076 rBuf.append(aNumBuf[
i]);
1079 if ( bUseThousandSep && aGroupPos[
i] )
1080 rBuf.append( rThoSep );
1088 bool bNullEnd =
true;
1089 while (
i < nNumLen )
1091 if ( aNumBuf[
i] !=
'0' )
1094 rBuf.append(aNumBuf[
i]);
1099 if ( bNullEnd && !bTrailingZeros )
1100 rBuf.setLength( rBuf.getLength() - (nDecimals + 1) );
1110 OUStringBuffer
aBuf(128);
1111 sal_uInt16 nDay = rDate.
GetDay();
1112 sal_uInt16 nMonth = rDate.
GetMonth();
1113 sal_Int16 nYear = rDate.
GetYear();
1114 sal_uInt16 nYearLen;
1148 return aBuf.makeStringAndClear();
1154 OUStringBuffer
aBuf(128);
1155 sal_uInt16 nHour = rTime.
GetHour();
1174 return aBuf.makeStringAndClear();
1179 OUStringBuffer
aBuf(128);
1184 sal_Int64 nHours =
static_cast<sal_Int64
>(rDuration.
GetDays()) * 24 +
1206 return aBuf.makeStringAndClear();
1214 const size_t nDig = ((
sizeof(sal_Int64) * 8) / 3) + 1;
1216 size_t nGuess = ((nDecimals < nDig) ?
1217 (((nDig - nDecimals) * rLocaleDataItem.thousandSeparator.getLength()) + nDig) :
1218 nDecimals) + rLocaleDataItem.decimalSeparator.getLength() + 3;
1223 bool bUseThousandSep,
bool bTrailingZeros )
const
1227 OUStringBuffer
aBuf(
int(nGuess + 16));
1230 bUseThousandSep, bTrailingZeros );
1232 return aBuf.makeStringAndClear();
1236 std::u16string_view rCurrencySymbol,
bool bUseThousandSep )
const
1242 OUStringBuffer aNumBuf(sal_Int32(nGuess + 16));
1255 bUseThousandSep,
true );
1256 const sal_Int32 nNumLen = aNumBuf.getLength();
1259 if ( (cZeroChar !=
'0') && nDecimals )
1264 sal_uInt16 nNumBufIndex = nNumLen-nDecimals;
1268 if ( aNumBuf[nNumBufIndex] !=
'0' )
1277 while (
i < nDecimals );
1281 nNumBufIndex = nNumLen-nDecimals;
1285 aNumBuf[nNumBufIndex] = cZeroChar;
1289 while (
i < nDecimals );
1299 aCur = rCurrencySymbol + aNumBuf;
1302 aCur = aNumBuf + rCurrencySymbol;
1305 aCur = OUString::Concat(rCurrencySymbol) +
" " + aNumBuf;
1308 aCur = aNumBuf +
" " + rCurrencySymbol;
1317 aCur = OUString::Concat(
"(") + rCurrencySymbol + aNumBuf +
")";
1320 aCur = OUString::Concat(
"-") + rCurrencySymbol + aNumBuf;
1323 aCur = OUString::Concat(rCurrencySymbol) +
"-" + aNumBuf;
1326 aCur = rCurrencySymbol + aNumBuf +
"-";
1329 aCur =
"(" + aNumBuf + rCurrencySymbol +
")";
1332 aCur =
"-" + aNumBuf + rCurrencySymbol;
1335 aCur = aNumBuf +
"-" + rCurrencySymbol;
1338 aCur = aNumBuf + rCurrencySymbol +
"-";
1341 aCur =
"-" + aNumBuf +
" " + rCurrencySymbol;
1344 aCur = OUString::Concat(
"-") + rCurrencySymbol +
" " + aNumBuf;
1347 aCur = aNumBuf +
" " + rCurrencySymbol +
"-";
1350 aCur = OUString::Concat(rCurrencySymbol) +
" -" + aNumBuf;
1353 aCur = OUString::Concat(rCurrencySymbol) +
" " + aNumBuf +
"-";
1356 aCur = aNumBuf +
"- " + rCurrencySymbol;
1359 aCur = OUString::Concat(
"(") + rCurrencySymbol +
" " + aNumBuf +
")";
1362 aCur =
"(" + aNumBuf +
" " + rCurrencySymbol +
")";
1373 rtl_math_ConversionStatus* pStatus, sal_Int32* pParseEnd )
const
1376 double fValue =
stringToDouble(aString.data(), aString.data() + aString.size(), bUseGroupSep, pStatus, &pParseEndChar);
1378 *pParseEnd = pParseEndChar - aString.data();
1383 rtl_math_ConversionStatus* pStatus,
const sal_Unicode** ppParseEnd )
const
1386 rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
1388 double fValue = rtl_math_uStringToDouble( pBegin, pEnd,
aLocaleDataItem.decimalSeparator[0], cGroupSep, &eStatus, &pParseEnd);
1389 bool bTryAlt = (pParseEnd < pEnd && !
aLocaleDataItem.decimalSeparatorAlternative.isEmpty() &&
1393 fValue = rtl_math_uStringToDouble( pBegin, pEnd,
aLocaleDataItem.decimalSeparatorAlternative.toChar(), cGroupSep, &eStatus, &pParseEnd);
1397 *ppParseEnd = pParseEnd;
1406 return LanguageTag( lang::Locale( aLCInfo.Language, aLCInfo.Country, aLCInfo.Variant ));
1425 fprintf( stderr,
"\n%s\n", pStr);
1440 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex());
1447 const char* pEnv = getenv(
"OOO_ENABLE_LOCALE_DATA_CHECKS");
1448 if (pEnv && (pEnv[0] ==
'Y' || pEnv[0] ==
'y' || pEnv[0] ==
'1'))
1453 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
1458 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
1487 const std::vector<OUString> & rPatterns )
1499 if (rPatterns.empty())
Reference< XComponentContext > m_xContext
sal_Int16 GetYear() const
sal_uInt16 GetDay() const
sal_uInt16 GetMonth() const
LanguageType getLanguageType(bool bResolveSystem=true) const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
const OUString & getBcp47(bool bResolveSystem=true) const
This class can be accessed without locking because we load all of the data in the constructor.
const OUString & getOneLocaleItem(sal_Int16 nItem) const
css::uno::Sequence< css::i18n::Calendar2 > getAllCalendars() const
NOTE: this wraps XLocaleData3::getAllCalendars2() in fact.
sal_uInt16 getCurrNegativeFormat() const
OUString getCurr(sal_Int64 nNumber, sal_uInt16 nDecimals, std::u16string_view rCurrencySymbol, bool bUseThousandSep=true) const
"Secure" currency formatted string.
sal_Unicode getCurrZeroChar() const
OUString getDuration(const tools::Duration &rDuration, bool bSec=true, bool b100Sec=false) const
OUString getDate(const Date &rDate) const
only numerical values of Gregorian calendar
static sal_uInt8 nLocaleDataChecking
OUString getNum(sal_Int64 nNumber, sal_uInt16 nDecimals, bool bUseThousandSep=true, bool bTrailingZeros=true) const
Simple number formatting.
std::vector< OUString > aReservedWords
const OUString & getCurrBankSymbol() const
static const std::vector< LanguageType > & getInstalledLanguageTypes()
Get LanguageTypes for all installed locales which are unambiguous convertible back and forth between ...
LocaleDataWrapper(const css::uno::Reference< css::uno::XComponentContext > &rxContext, LanguageTag aLanguageTag)
css::uno::Sequence< css::i18n::Currency2 > getAllCurrencies() const
NOTE: this wraps XLocaleData2::getAllCurrencies2() in fact.
css::uno::Sequence< css::i18n::FormatElement > getAllFormats() const
LanguageTag getLoadedLanguageTag() const
get current loaded Locale, which might differ from the requested Locale
void loadCurrencyFormats()
css::i18n::ForbiddenCharacters getForbiddenCharacters() const
void ImplAddFormatNum(rtl::OUStringBuffer &rBuf, sal_Int64 nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros) const
const OUString & getCurrSymbol() const
static const css::uno::Sequence< css::lang::Locale > & getInstalledLocaleNames()
same as the wrapper implementation but static
LongDateOrder scanDateOrderImpl(std::u16string_view rCode) const
void loadDateAcceptancePatterns(const std::vector< OUString > &rOverrideDateAcceptancePatterns)
MeasurementSystem mapMeasurementStringToEnum(std::u16string_view rMS) const
maps the LocaleData string to the International enum
const css::lang::Locale & getMyLocale() const
css::uno::Sequence< css::i18n::CalendarItem2 > const & getDefaultCalendarDays() const
Convenience method to obtain the day names of the default calendar.
css::uno::Sequence< sal_Int32 > aGrouping
const css::uno::Sequence< OUString > & getDateAcceptancePatterns() const
sal_uInt16 getCurrPositiveFormat() const
const css::uno::Sequence< css::lang::Locale > & getAllInstalledLocaleNames() const
LongDateOrder nLongDateOrder
const std::shared_ptr< css::i18n::Calendar2 > & getDefaultCalendar() const
Convenience method to obtain the default calendar.
const OUString & getOneReservedWord(sal_Int16 nWord) const
sal_uInt16 nCurrPositiveFormat
double stringToDouble(std::u16string_view aString, bool bUseGroupSep, rtl_math_ConversionStatus *pStatus, sal_Int32 *pParseEnd) const
A wrapper around rtl::math::stringToDouble() using the locale dependent decimal separator,...
void scanCurrFormatImpl(std::u16string_view rCode, sal_Int32 nStart, sal_Int32 &nSign, sal_Int32 &nPar, sal_Int32 &nNum, sal_Int32 &nBlank, sal_Int32 &nSym) const
static void evaluateLocaleDataChecking()
const css::i18n::LocaleDataItem2 & getLocaleItem() const
NOTE: this wraps XLocaleData5::getLocaleItem2() in fact.
DateOrder getDateOrder() const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
static bool areChecksEnabled()
Return whether locale data checks are enabled.
LongDateOrder getLongDateOrder() const
css::i18n::LocaleDataItem2 aLocaleDataItem
bool doesSecondaryCalendarUseEC(std::u16string_view rName) const
If the secondary calendar, if any, is of the name passed AND number formats using it usually use the ...
sal_uInt16 getCurrDigits() const
LanguageTag maLanguageTag
OUString appendLocaleInfo(std::u16string_view rDebugMsg) const
Append locale info to string, used with locale data checking.
static void outputCheckMessage(std::u16string_view rMsg)
Output a message during locale data checking.
static bool isNumLeadingZero()
css::uno::Reference< css::uno::XComponentContext > m_xContext
const css::uno::Sequence< sal_Int32 > & getDigitGrouping() const
Obtain digit grouping.
sal_uInt16 nCurrNegativeFormat
css::uno::Sequence< OUString > aDateAcceptancePatterns
std::shared_ptr< css::i18n::Calendar2 > xSecondaryCalendar
const LanguageTag & getLanguageTag() const
get current requested Locale
std::shared_ptr< css::i18n::Calendar2 > xDefaultCalendar
css::i18n::LanguageCountryInfo getLanguageCountryInfo() const
css::uno::Reference< css::i18n::XLocaleData5 > xLD
css::uno::Sequence< css::i18n::CalendarItem2 > const & getDefaultCalendarMonths() const
Convenience method to obtain the month names of the default calendar.
OUString aLocaleItem[css::i18n::LocaleItem::COUNT2]
static css::uno::Sequence< sal_Bool > createForwardSequence(sal_Int32 nIntegerDigits, const css::uno::Sequence< sal_Int32 > &rGroupings)
Create a sequence of bool values containing positions where to add a separator when iterating forward...
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define LANGUAGE_DONTKNOW
#define LANGUAGE_NORWEGIAN
static void ImplAdd9UNum(OUStringBuffer &rBuf, sal_uInt32 nNumber)
static void ImplAdd2UNum(OUStringBuffer &rBuf, sal_uInt16 nNumber)
const sal_uInt16 nCurrFormatDefault
static size_t ImplGetNumberStringLengthGuess(const css::i18n::LocaleDataItem2 &rLocaleDataItem, sal_uInt16 nDecimals)
static void ImplAddUNum(OUStringBuffer &rBuf, sal_uInt64 nNumber)
static void ImplAddNum(OUStringBuffer &rBuf, sal_Int64 nNumber, int nMinLen)
static DateOrder getDateOrderFromLongDateOrder(LongDateOrder eLong)
#define SAL_WARN(area, stream)
LanguageTag maLanguageTag
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Reference< XComponentContext > getProcessComponentContext()
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
constexpr OUStringLiteral EMPTY
SwNodeOffset abs(const SwNodeOffset &a)