From 11e37911a5a796cbcc2b191ab017ebad85c57901 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 Nov 2019 16:35:06 +0200 Subject: no need to construct a parser in SwXMLSectionList the SvXMLImport superclass already constructs a parser Change-Id: I6ff53caf4329da439b590e4b581d2ece92d8f96d Reviewed-on: https://gerrit.libreoffice.org/82796 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/xml/swxml.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 1b671c834d32..ee3f75373dae 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -1003,14 +1002,10 @@ size_t XMLReader::GetSectionList( SfxMedium& rMedium, aParserInput.aInputStream = xStm->getInputStream(); // get filter - uno::Reference< xml::sax::XFastDocumentHandler > xFilter = new SwXMLSectionList( xContext, rStrings ); - - // connect parser and filter - uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create(xContext); - xParser->setFastDocumentHandler( xFilter ); + rtl::Reference< SwXMLSectionList > xImport = new SwXMLSectionList( xContext, rStrings ); // parse - xParser->parseStream( aParserInput ); + xImport->parseStream( aParserInput ); } catch( xml::sax::SAXParseException& ) { -- cgit