diff options
Diffstat (limited to 'sw/source/ui/app/swmodule.cxx')
-rw-r--r-- | sw/source/ui/app/swmodule.cxx | 10 |
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; } |