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 | |
parent | fdo#46808, use service constructor for ucb::SimpleFileAccess (diff) | |
download | core-d2f6a87ac7adb3f60f7eae7c5a8f8a9076b7a75c.tar.gz core-d2f6a87ac7adb3f60f7eae7c5a8f8a9076b7a75c.zip |
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')
-rw-r--r-- | xmloff/inc/xmloff/xmlnumfi.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/xmloff/inc/xmloff/xmlnumfi.hxx b/xmloff/inc/xmloff/xmlnumfi.hxx index cd93e810461c..b38a45f8ef4e 100644 --- a/xmloff/inc/xmloff/xmlnumfi.hxx +++ b/xmloff/inc/xmloff/xmlnumfi.hxx @@ -71,6 +71,10 @@ class SvXMLStylesContext; struct SvXMLNumberInfo; class SvNumberFormatter; class SvtSysLocale; +namespace com { namespace sun { namespace star { namespace lang { + class XMultiServiceFactory; +}}}} + // use SvXMLNumFmtHelper in the context for <office:styles> to create // child contexts for data styles 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 ) ); |