diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-23 23:06:10 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-23 23:09:16 +0100 |
commit | af60316514f3ae3d4c475819bf86f2af837171e3 (patch) | |
tree | ccfbd673bd4a53047a04dad6457d09c7eea1566c /xmloff | |
parent | 37f5b864014e9ad17a561b77ea9f6141650e92ad (diff) |
some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 28 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 |
2 files changed, 16 insertions, 16 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 2d06b91b9c81..d33b2b77e5e4 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -238,16 +238,16 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()), - pFormatter->GetLocale() ); + pFormatter->GetLanguageTag() ); pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()), - pFormatter->GetLocale() ); + pFormatter->GetLanguageTag() ); } else { - lang::Locale aLocale( LanguageTag( MsLangId::getSystemLanguage() ).getLocale() ); + LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); - pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); + pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLanguageTag ); + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLanguageTag ); } pUsedList = new SvXMLNumUsedList_Impl; @@ -273,16 +273,16 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()), - pFormatter->GetLocale() ); + pFormatter->GetLanguageTag() ); pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()), - pFormatter->GetLocale() ); + pFormatter->GetLanguageTag() ); } else { - lang::Locale aLocale( LanguageTag( MsLangId::getSystemLanguage() ).getLocale() ); + LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); - pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); + pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLanguageTag ); + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLanguageTag ); } pUsedList = new SvXMLNumUsedList_Impl; @@ -803,12 +803,12 @@ sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, sal_Bool bRet = sal_False; - LanguageType nLang = LanguageTag( rLocale ).getLanguageType( false); - pFormatter->ChangeIntl( nLang ); + LanguageTag aLanguageTag( rLocale ); + pFormatter->ChangeIntl( aLanguageTag.getLanguageType( false) ); OUString sCurString, sDummy; pFormatter->GetCompatibilityCurrency( sCurString, sDummy ); - pCharClass->setLocale( rLocale ); + pCharClass->setLanguageTag( aLanguageTag ); OUString sUpperStr = pCharClass->uppercase(rString); sal_Int32 nPos = lcl_FindSymbol( sUpperStr, sCurString ); if ( nPos >= 0 ) @@ -1496,7 +1496,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt if ( nElemType == NF_KEY_NNNN ) { // write additional text element for separator - pLocaleData->setLocale( LanguageTag( nLang ).getLocale() ); + pLocaleData->setLanguageTag( LanguageTag( nLang ) ); AddToTextElement_Impl( pLocaleData->getLongDateDayOfWeekSep() ); } } diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index de3d238d2013..b9a105d6a5dc 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -602,9 +602,9 @@ const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang ) pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext( pFormatter ? pFormatter->GetServiceManager() : mxServiceFactory), - LanguageTag( nLang ).getLocale() ); + LanguageTag( nLang ) ); else - pLocaleData->setLocale( LanguageTag( nLang ).getLocale() ); + pLocaleData->setLanguageTag( LanguageTag( nLang ) ); return *pLocaleData; } |