From 42e07d5db5a55972c7ddb191dfd01decdab98134 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 19 Jun 2007 14:51:28 +0000 Subject: [PATCH] INTEGRATION: CWS languageguessing (1.56.56); FILE MERGED 2007/01/12 08:22:17 tl 1.56.56.1: #i73173# integrate Google SoC language-guessing --- sw/source/ui/app/swmodule.cxx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 9b5f6ed5185f..59d34f48016a 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -4,9 +4,9 @@ * * $RCSfile: swmodule.cxx,v $ * - * $Revision: 1.59 $ + * $Revision: 1.60 $ * - * last change: $Author: vg $ $Date: 2007-05-22 16:37:45 $ + * last change: $Author: kz $ $Date: 2007-06-19 15:51:28 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -345,6 +345,8 @@ namespace css = com::sun::star; TYPEINIT1( SwModule, SfxModule ); +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; //************************************************************************ @@ -438,6 +440,22 @@ SwModule::GetScannerManager() return m_xScannerManager; } +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::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), + uno::UNO_QUERY ); + } + } + return m_xLanguageGuesser; +} + //************************************************************************ SwModule::~SwModule()