linguistic/source/convdic.cxx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
New commits: commit 9dceb75ec9af78df6f683443c7f4008076412903 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Nov 15 13:38:04 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Nov 15 20:14:44 2019 +0100 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.gran...@collabora.co.uk> 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& ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits