sw/source/filter/xml/swxml.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 11e37911a5a796cbcc2b191ab017ebad85c57901
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Nov 15 16:35:06 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Nov 16 10:47:43 2019 +0100

    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 <noel.gran...@collabora.co.uk>

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 <com/sun/star/packages/zip/ZipIOException.hpp>
 #include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-#include <com/sun/star/xml/sax/FastParser.hpp>
 #include <com/sun/star/task/XStatusIndicator.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <officecfg/Office/Common.hxx>
@@ -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&  )
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to