summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-10-27 14:52:43 +0200
committerEike Rathke <erack@redhat.com>2017-10-27 18:29:44 +0200
commit922a94f376d90c72315f86f2604924c142fca5be (patch)
tree649e71f73040fb952087ac9d066409e55d9c0ce2
parent51a7ae749de90485f3b15a3f935f0f11d5aeff5b (diff)
Add LocaleDataWrapper::getNumDecimalSepAlt(), tdf#81671
Change-Id: Id3a16004603685ef859506c2c6d86f8ff097c1d0
-rw-r--r--include/unotools/localedatawrapper.hxx4
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 398c990fe53b..a5f1988f1db4 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -65,7 +65,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
css::uno::Sequence< OUString > aDateAcceptancePatterns;
css::uno::Sequence< sal_Int32 > aGrouping;
// cached items
- OUString aLocaleItem[css::i18n::LocaleItem::COUNT];
+ OUString aLocaleItem[css::i18n::LocaleItem::COUNT2];
OUString aReservedWord[css::i18n::reservedWords::COUNT];
OUString aCurrSymbol;
OUString aCurrBankSymbol;
@@ -209,6 +209,8 @@ public:
{ return getOneLocaleItem( css::i18n::LocaleItem::THOUSAND_SEPARATOR ); }
const OUString& getNumDecimalSep() const
{ return getOneLocaleItem( css::i18n::LocaleItem::DECIMAL_SEPARATOR ); }
+ const OUString& getNumDecimalSepAlt() const
+ { return getOneLocaleItem( css::i18n::LocaleItem::DECIMAL_SEPARATOR_ALTERNATIVE ); }
const OUString& getTimeSep() const
{ return getOneLocaleItem( css::i18n::LocaleItem::TIME_SEPARATOR ); }
const OUString& getTime100SecSep() const
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index d2552ffe4a82..52269c291fcc 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -355,7 +355,7 @@ std::vector< LanguageType > LocaleDataWrapper::getInstalledLanguageTypes()
const OUString& LocaleDataWrapper::getOneLocaleItem( sal_Int16 nItem ) const
{
::utl::ReadWriteGuard aGuard( aMutex );
- if ( nItem >= LocaleItem::COUNT )
+ if ( nItem >= LocaleItem::COUNT2 )
{
SAL_WARN( "unotools.i18n", "getOneLocaleItem: bounds" );
return aLocaleItem[0];
@@ -428,6 +428,9 @@ void LocaleDataWrapper::getOneLocaleItemImpl( sal_Int16 nItem )
case LocaleItem::LONG_DATE_YEAR_SEPARATOR :
aLocaleItem[nItem] = aLocaleDataItem.LongDateYearSeparator;
break;
+ case LocaleItem::DECIMAL_SEPARATOR_ALTERNATIVE :
+ aLocaleItem[nItem] = aLocaleDataItem.decimalSeparatorAlternative;
+ break;
default:
SAL_WARN( "unotools.i18n", "getOneLocaleItemImpl: which one?" );
}