diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-15 13:38:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-15 20:14:44 +0100 |
commit | 9dceb75ec9af78df6f683443c7f4008076412903 (patch) | |
tree | ed0e4cf3b596d3ac433b92d71d6dc7266a2b5471 /linguistic | |
parent | 45e479bf35bb74d467ed5a5e583f126c035d93b1 (diff) |
no need to construct an extra parser in ConvDicXMLImport
the SvXMLImport superclass already constructs a parser
Change-Id: I867db2ddede93f07cdc23c8fe9ddf2bffd9f41aa
Reviewed-on: https://gerrit.libreoffice.org/82781
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/convdic.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 1a7b559a203b..b07ea422a119 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -42,7 +42,6 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> -#include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/container/ElementExistException.hpp> @@ -93,21 +92,10 @@ static void ReadThroughDic( const OUString &rMainURL, ConvDicXMLImport &rImport xml::sax::InputSource aParserInput; aParserInput.aInputStream = xIn; - // get parser - 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 - uno::Reference < xml::sax::XDocumentHandler > xFilter( - static_cast<xml::sax::XExtendedDocumentHandler *>(&rImport), UNO_QUERY ); - - // connect parser and filter - xParser->setDocumentHandler( xFilter ); - // finally, parser the stream try { - xParser->parseStream( aParserInput ); // implicitly calls ConvDicXMLImport::CreateContext + rImport.parseStream( aParserInput ); // implicitly calls ConvDicXMLImport::CreateContext } catch( xml::sax::SAXParseException& ) { |