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 /editeng/source/misc | |
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 'editeng/source/misc')
-rw-r--r-- | editeng/source/misc/forbiddencharacterstable.cxx | 8 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx index 0bc4a22885cd..5c4f3c8a0ff8 100644 --- a/editeng/source/misc/forbiddencharacterstable.cxx +++ b/editeng/source/misc/forbiddencharacterstable.cxx @@ -25,9 +25,9 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF) +SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext) { - mxMSF = xMSF; + m_xContext = rxContext; } const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) @@ -36,9 +36,9 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge Map::iterator it = maMap.find( nLanguage ); if ( it != maMap.end() ) pForbiddenCharacters = &(it->second); - else if ( bGetDefault && mxMSF.is() ) + else if ( bGetDefault && m_xContext.is() ) { - LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) ); + LocaleDataWrapper aWrapper( m_xContext, SvxCreateLocale( nLanguage ) ); maMap[ nLanguage ] = aWrapper.getForbiddenCharacters(); pForbiddenCharacters = &maMap[ nLanguage ]; } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index e436cdcc4c33..3f2298a9730f 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -202,8 +202,7 @@ static sal_uInt16 GetAppLang() } static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang ) { - static LocaleDataWrapper aLclDtWrp( GetProcessFact(), - SvxCreateLocale( GetAppLang() ) ); + static LocaleDataWrapper aLclDtWrp( SvxCreateLocale( GetAppLang() ) ); ::com::sun::star::lang::Locale aLcl( SvxCreateLocale( nLang )); const ::com::sun::star::lang::Locale& rLcl = aLclDtWrp.getLoadedLocale(); if( aLcl.Language != rLcl.Language || |