summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-03 13:30:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 16:29:53 +0200
commita20f9a410fdd3f776f870434bc39219d5fc64b40 (patch)
tree079278e5859c5782fbe9bfcc34302d09bd8dfadd /linguistic
parentbd6b41bce491ac5a5f562652b7e32045cc22c35c (diff)
fdo#46808, Adapt xml::sax::XParser UNO service to new style
The xml.sax.Parser service already existed, it just did not have a new-style service to create it. Change-Id: I6f145a7504ff9e149c802f723991954a2801cbc9
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 212506c4337b..347707e7683e 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -61,7 +61,7 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
#include "convdic.hxx"
@@ -88,7 +88,6 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
return;
DBG_ASSERT(!INetURLObject( rMainURL ).HasError(), "invalid URL");
- uno::Reference< lang::XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() );
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
// get xInputStream stream
@@ -112,17 +111,7 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
aParserInput.aInputStream = xIn;
// get parser
- uno::Reference< xml::sax::XParser > xParser;
- try
- {
- xParser = uno::Reference< xml::sax::XParser >( xServiceFactory->createInstance( "com.sun.star.xml.sax.Parser" ), UNO_QUERY );
- }
- catch (uno::Exception &)
- {
- }
- DBG_ASSERT( xParser.is(), "Can't create parser" );
- if (!xParser.is())
- return;
+ uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
//!! keep a reference until everything is done to
//!! ensure the proper lifetime of the object