summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-07 13:13:10 +0200
committerNoel Grandin <noel@peralex.com>2013-03-20 07:32:48 +0200
commit524cedbd307e73badd3c6e64ae290922c75fd2dd (patch)
tree1d9af50ec71f5a92f17106471f62c041a58087d8 /linguistic
parent70e7bd63adda4c17a47fd7caeacdf5b91ace6157 (diff)
fdo#46808, Convert linguistic2::ProofreadingIterator to new style
Change-Id: I1551f67ce503d58ea9b0e701219b26baadb25b78
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/linguistic/misc.hxx1
-rw-r--r--linguistic/source/gciterator.cxx2
-rw-r--r--linguistic/source/lngsvcmgr.cxx8
3 files changed, 4 insertions, 7 deletions
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index aa6a3223918a..c7f91105d3fb 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -53,7 +53,6 @@ class LocaleDataWrapper;
#define SN_GRAMMARCHECKER "com.sun.star.linguistic2.Proofreader"
-#define SN_GRAMMARCHECKINGITERATOR "com.sun.star.linguistic2.ProofreadingIterator"
#define SN_SPELLCHECKER "com.sun.star.linguistic2.SpellChecker"
#define SN_HYPHENATOR "com.sun.star.linguistic2.Hyphenator"
#define SN_THESAURUS "com.sun.star.linguistic2.Thesaurus"
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 792d406a3e84..aa35465364e3 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -1126,7 +1126,7 @@ static OUString GrammarCheckingIterator_getImplementationName() throw()
static uno::Sequence< OUString > GrammarCheckingIterator_getSupportedServiceNames() throw()
{
uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = SN_GRAMMARCHECKINGITERATOR ;
+ aSNS[0] = "com.sun.star.linguistic2.ProofreadingIterator";
return aSNS;
}
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index a41fe51224bf..63f456457b44 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
+#include <com/sun/star/linguistic2/ProofreadingIterator.hpp>
#include <tools/solar.h>
#include <unotools/lingucfg.hxx>
@@ -1010,12 +1011,9 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
uno::Reference< linguistic2::XProofreadingIterator > xGCI;
try
{
- uno::Reference< lang::XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- xGCI = uno::Reference< linguistic2::XProofreadingIterator >(
- xMgr->createInstance( SN_GRAMMARCHECKINGITERATOR ), uno::UNO_QUERY_THROW );
+ xGCI = linguistic2::ProofreadingIterator::create( comphelper::getProcessComponentContext() );
}
- catch (uno::Exception &)
+ catch (const uno::Exception &)
{
}
DBG_ASSERT( xGCI.is(), "instantiating grammar checking iterator failed" );