diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-05 11:28:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-15 08:28:44 +0100 |
commit | d2f6a87ac7adb3f60f7eae7c5a8f8a9076b7a75c (patch) | |
tree | 0bcc19623fa6cda27b78df47c54192bd3e73ef41 /xmloff/source | |
parent | 5837402fb1daa437d9a1a37edc9ede57319944f1 (diff) |
fdo#46808, use service constructor for i18n::NumberFormatMapper
Also create a utility constructor for LocaleDataWrapper, which
simplifies many of the calling sites.
Change-Id: Ic8510b51c4201fa17fc0620e18d3e258e43636ba
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 2bc69affc454..e23ec22a2f17 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -247,7 +247,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()), pFormatter->GetLocale() ); - pLocaleData = new LocaleDataWrapper( pFormatter->GetServiceManager(), + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()), pFormatter->GetLocale() ); } else @@ -255,7 +255,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) ); pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); - pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale ); + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); } pUsedList = new SvXMLNumUsedList_Impl; @@ -282,7 +282,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { pCharClass = new CharClass( comphelper::getComponentContext(pFormatter->GetServiceManager()), pFormatter->GetLocale() ); - pLocaleData = new LocaleDataWrapper( pFormatter->GetServiceManager(), + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(pFormatter->GetServiceManager()), pFormatter->GetLocale() ); } else @@ -290,7 +290,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) ); pCharClass = new CharClass( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); - pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale ); + pLocaleData = new LocaleDataWrapper( comphelper::getComponentContext(rExport.getServiceFactory()), aLocale ); } pUsedList = new SvXMLNumUsedList_Impl; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 13cfef1e57c6..d36c12887c28 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -609,8 +609,8 @@ const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang ) { if ( !pLocaleData ) pLocaleData = new LocaleDataWrapper( - (pFormatter ? pFormatter->GetServiceManager() : - mxServiceFactory), + comphelper::getComponentContext( + pFormatter ? pFormatter->GetServiceManager() : mxServiceFactory), MsLangId::convertLanguageToLocale( nLang ) ); else pLocaleData->setLocale( MsLangId::convertLanguageToLocale( nLang ) ); |