summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/dlelstnr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno/dlelstnr.cxx')
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index 31572d9e8c24..93345da0889f 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/linguistic2/XDictionaryList.hpp>
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
-#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#include <com/sun/star/linguistic2/ProofreadingIterator.hpp>
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
#include <unotools/lingucfg.hxx>
@@ -48,7 +48,6 @@ using namespace ::com::sun::star::linguistic2::LinguServiceEventFlags;
SwLinguServiceEventListener::SwLinguServiceEventListener()
{
- Reference< XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
try
{
@@ -60,8 +59,7 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
if (SvtLinguConfig().HasGrammarChecker())
{
- OUString aSvcName( "com.sun.star.linguistic2.ProofreadingIterator" );
- xGCIterator = Reference< XProofreadingIterator >( xMgr->createInstance( aSvcName ), UNO_QUERY );
+ xGCIterator = ProofreadingIterator::create(xContext);
Reference< XLinguServiceEventBroadcaster > xBC( xGCIterator, UNO_QUERY );
if (xBC.is())
xBC->addLinguServiceEventListener( (XLinguServiceEventListener *) this );