From d2c45d0460cf99aadde1aaec11e032f488fa277b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 2 Nov 2012 09:46:12 +0200 Subject: fdo#46808, Adapt i18n::Transliteration UNO service to new style Simply make the service implement XExtendedTransliteration, since all of the implementatins already do that. Change-Id: If03bf56a8d33931ad0230743a4603e2ae9b104ac --- basic/source/classes/global.cxx | 2 +- basic/source/runtime/methods.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/global.cxx b/basic/source/classes/global.cxx index 324a18a12aa7..2907b5cdb65f 100644 --- a/basic/source/classes/global.cxx +++ b/basic/source/classes/global.cxx @@ -42,7 +42,7 @@ namespace public: lclTransliterationWrapper() : m_aTransliteration( - comphelper::getProcessServiceFactory(), + comphelper::getProcessComponentContext(), com::sun::star::i18n::TransliterationModules_IGNORE_CASE ) { const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage(); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e189b2866d6d..5dab1a21a084 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1626,9 +1626,9 @@ RTLFUNC(StrComp) ::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->pTransliterationWrapper; if( !pTransliterationWrapper ) { - uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext(); pTransliterationWrapper = GetSbData()->pTransliterationWrapper = - new ::utl::TransliterationWrapper( xSMgr, + new ::utl::TransliterationWrapper( xContext, i18n::TransliterationModules_IGNORE_CASE | i18n::TransliterationModules_IGNORE_KANA | i18n::TransliterationModules_IGNORE_WIDTH ); @@ -4082,8 +4082,8 @@ RTLFUNC(StrConv) String aNewStr( aOldStr ); if( nType != 0 ) { - uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory(); - ::utl::TransliterationWrapper aTransliterationWrapper( xSMgr,nType ); + uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext(); + ::utl::TransliterationWrapper aTransliterationWrapper( xContext, nType ); uno::Sequence aOffsets; aTransliterationWrapper.loadModuleIfNeeded( nLanguage ); aNewStr = aTransliterationWrapper.transliterate( aOldStr, nLanguage, 0, nOldLen, &aOffsets ); -- cgit