diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-07 13:13:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-20 07:32:48 +0200 |
commit | 524cedbd307e73badd3c6e64ae290922c75fd2dd (patch) | |
tree | 1d9af50ec71f5a92f17106471f62c041a58087d8 /linguistic/source | |
parent | 70e7bd63adda4c17a47fd7caeacdf5b91ace6157 (diff) |
fdo#46808, Convert linguistic2::ProofreadingIterator to new style
Change-Id: I1551f67ce503d58ea9b0e701219b26baadb25b78
Diffstat (limited to 'linguistic/source')
-rw-r--r-- | linguistic/source/gciterator.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 8 |
2 files changed, 4 insertions, 6 deletions
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" ); |