diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-02 09:46:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-05 16:43:15 +0100 |
commit | d2c45d0460cf99aadde1aaec11e032f488fa277b (patch) | |
tree | c04080649e3d5393d9d73e2ab9326b56ee3cc6cb /unotools | |
parent | ec1c96a9b69a5a2546fe2564cd92fe9e33471fbc (diff) |
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
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/transliterationwrapper.hxx | 8 | ||||
-rw-r--r-- | unotools/source/i18n/transliterationwrapper.cxx | 10 |
2 files changed, 7 insertions, 11 deletions
diff --git a/unotools/inc/unotools/transliterationwrapper.hxx b/unotools/inc/unotools/transliterationwrapper.hxx index 46f0a3917e9a..3a0a8de05042 100644 --- a/unotools/inc/unotools/transliterationwrapper.hxx +++ b/unotools/inc/unotools/transliterationwrapper.hxx @@ -25,8 +25,8 @@ #include <com/sun/star/i18n/XExtendedTransliteration.hpp> namespace com { namespace sun { namespace star { - namespace lang { - class XMultiServiceFactory; + namespace uno { + class XComponentContext; } }}} @@ -36,8 +36,6 @@ namespace utl class UNOTOOLS_DLLPUBLIC TransliterationWrapper { ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > xSMgr; - ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XExtendedTransliteration > xTrans; ::com::sun::star::lang::Locale aLocale; sal_uInt32 nType; @@ -53,7 +51,7 @@ class UNOTOOLS_DLLPUBLIC TransliterationWrapper public: TransliterationWrapper( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & xSF, + ::com::sun::star::uno::XComponentContext > & rxContext, sal_uInt32 nType ); ~TransliterationWrapper(); diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index f6637521a2b9..517f51008ea1 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -24,6 +24,7 @@ #include "instance.hxx" #include <com/sun/star/i18n/TransliterationModulesExtra.hpp> +#include <com/sun/star/i18n/Transliteration.hpp> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::i18n; @@ -31,14 +32,11 @@ using namespace ::com::sun::star::uno; using namespace ::utl; TransliterationWrapper::TransliterationWrapper( - const Reference< XMultiServiceFactory > & xSF, + const Reference< XComponentContext > & rxContext, sal_uInt32 nTyp ) - : xSMgr( xSF ), nType( nTyp ), nLanguage( 0 ), bFirstCall( sal_True ) + : nType( nTyp ), nLanguage( 0 ), bFirstCall( sal_True ) { - xTrans = Reference< XExtendedTransliteration > ( - intl_createInstance( xSMgr, "com.sun.star.i18n.Transliteration", - "TransliterationWrapper" ), UNO_QUERY ); - DBG_ASSERT( xTrans.is(), "TransliterationWrapper: no Transliteraion available" ); + xTrans = Transliteration::create(rxContext); } |