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 /vcl/source/app/settings.cxx | |
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 'vcl/source/app/settings.cxx')
-rw-r--r-- | vcl/source/app/settings.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 29588d9a1316..72dc9066a6c7 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -1579,7 +1579,7 @@ LanguageType AllSettings::GetUILanguage() const const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const { if ( !mpData->mpLocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetLocale() ); + ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetLocale() ); return *mpData->mpLocaleDataWrapper; } @@ -1588,7 +1588,7 @@ const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const { if ( !mpData->mpUILocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessServiceFactory(), GetUILocale() ); + ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetUILocale() ); return *mpData->mpUILocaleDataWrapper; } @@ -1597,8 +1597,7 @@ const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const { if ( !mpData->mpI18nHelper ) { - ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> aFactory(comphelper::getProcessServiceFactory()); - ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( aFactory, GetLocale() ); + ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetLocale() ); } return *mpData->mpI18nHelper; } @@ -1608,8 +1607,7 @@ const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const { if ( !mpData->mpUII18nHelper ) { - ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> aFactory(comphelper::getProcessServiceFactory()); - ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( aFactory, GetUILocale() ); + ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetUILocale() ); } return *mpData->mpUII18nHelper; } |