summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index b5869c95991d..981dce45743e 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -22,6 +22,7 @@
#include <cppuhelper/factory.hxx> // helper for factories
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <i18npool/mslangid.hxx>
#include <tools/debug.hxx>
#include <comphelper/processfactory.hxx>
@@ -66,17 +67,10 @@ using ::rtl::OUStringToOString;
///////////////////////////////////////////////////////////////////////////
-static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl()
+static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl()
{
- uno::Reference< XLinguServiceManager > xRes;
- uno::Reference< XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
- if (xMgr.is())
- {
- xRes = uno::Reference< XLinguServiceManager > ( xMgr->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.linguistic2.LinguServiceManager" ) ) ), UNO_QUERY ) ;
- }
+ uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ uno::Reference< XLinguServiceManager2 > xRes = LinguServiceManager::create( xContext ) ;
return xRes;
}
@@ -306,7 +300,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
uno::Sequence< Reference< XMeaning > > aMeanings( 1 );
uno::Sequence< Reference< XMeaning > > noMeanings( 0 );
- uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
+ uno::Reference< XLinguServiceManager2 > xLngSvcMgr( GetLngSvcMgr_Impl() );
uno::Reference< XSpellChecker1 > xSpell;
OUString rTerm(qTerm);