summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-01 13:51:04 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:19 +0200
commiteb2f8c5a63df0bfcd3cc13b2071ea2194fa425f0 (patch)
tree8b699d6dace733bdb6ea67ce704936fbf9e8d7a5 /sw
parentfdo#46808, convert code in desktop module to XComponentContext (diff)
downloadcore-eb2f8c5a63df0bfcd3cc13b2071ea2194fa425f0.tar.gz
core-eb2f8c5a63df0bfcd3cc13b2071ea2194fa425f0.zip
fdo#46808, use linguistic2::LanguageGuessing service constructor
Change-Id: I5c650a96ea99a1cf16ca8aa61f2db4986790040b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/app/swmodule.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 9d4bc1d5f79b..8d2c6266a874 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -54,6 +54,7 @@
#include <svx/modctrl.hxx>
#include <com/sun/star/scanner/XScannerManager2.hpp>
#include <com/sun/star/container/XSet.hpp>
+#include <com/sun/star/linguistic2/LanguageGuessing.hpp>
#include <comphelper/processfactory.hxx>
#include <docsh.hxx>
#include <swmodule.hxx>
@@ -227,14 +228,7 @@ uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser()
{
if (!m_xLanguageGuesser.is())
{
- uno::Reference< lang::XMultiServiceFactory > xMgr ( comphelper::getProcessServiceFactory() );
- if (xMgr.is())
- {
- m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
- xMgr->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.LanguageGuessing"))),
- uno::UNO_QUERY );
- }
+ m_xLanguageGuesser = linguistic2::LanguageGuessing::create( comphelper::getProcessComponentContext() );
}
return m_xLanguageGuesser;
}