[Libreoffice-commits] core.git: sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 15 17:40:53 UTC 2019


 sw/source/uibase/config/StoredChapterNumbering.cxx |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 3efa861bbb10db0a98d5911fd9365da89f1c0a71
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 15 15:15:37 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 15 18:39:27 2019 +0100

    no need to construct a parser in ImportStoredChapterNumberingRules
    
    the SvXMLImport superclass already constructs a parser
    
    Change-Id: Ie99ccc4988d1daeb39e5e06ac0682f19648f3a6f
    Reviewed-on: https://gerrit.libreoffice.org/82788
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 1a1e2cf8553c..d0454dc5f20c 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -16,7 +16,6 @@
 #include <com/sun/star/io/XActiveDataSource.hpp>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/util/MeasureUnit.hpp>
-#include <com/sun/star/xml/sax/FastParser.hpp>
 #include <com/sun/star/xml/sax/Writer.hpp>
 
 #include <comphelper/processfactory.hxx>
@@ -440,19 +439,13 @@ void ImportStoredChapterNumberingRules(SwChapterNumRules & rRules,
     uno::Reference<io::XInputStream> const xInStream(
             new ::utl::OInputStreamWrapper(rStream));
 
-    uno::Reference<xml::sax::XFastParser> const xParser(
-            xml::sax::FastParser::create(xContext));
-
-    uno::Reference<xml::sax::XFastDocumentHandler> const xHandler(
-            new StoredChapterNumberingImport(xContext, rRules));
-
-    xParser->setFastDocumentHandler(xHandler);
+    rtl::Reference<StoredChapterNumberingImport> const xImport(new StoredChapterNumberingImport(xContext, rRules));
 
     xml::sax::InputSource const source(xInStream, "", "", rFileName);
 
     try
     {
-        xParser->parseStream(source);
+        xImport->parseStream(source);
     }
     catch (uno::Exception const&)
     {


More information about the Libreoffice-commits mailing list