[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - editeng/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 6 10:58:28 UTC 2020


 editeng/source/misc/svxacorr.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit dfa3e57aea355c0f6f5ec5e8af4ae2749279837c
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Thu Nov 5 17:57:34 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 6 11:57:56 2020 +0100

    tdf#137908 Revert "use FasterParser for LoadXMLExceptList_Imp"
    
    This reverts commit 79ea745d595945e454ced9f6cacd2bb57aa51f95.
    
    Change-Id: I88d0ae9f0a3ec6691fdd09c58b20532833d8c090
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105373
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit ad66197f9e18da53afb42042bd0c86e0f3d94675)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105355
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 217143f42845..df6e8985e11e 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2218,16 +2218,19 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
                 aParserInput.aInputStream = new utl::OInputStreamWrapper( *xStrm );
 
                 // get filter
-                rtl::Reference< SvXMLExceptionListImport > xImport = new SvXMLExceptionListImport ( xContext, *rpLst );
+                uno::Reference< xml::sax::XFastDocumentHandler > xFilter = new SvXMLExceptionListImport ( xContext, *rpLst );
 
                 // connect parser and filter
+                uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create( xContext );
                 uno::Reference<xml::sax::XFastTokenHandler> xTokenHandler = new SvXMLAutoCorrectTokenHandler;
-                xImport->setTokenHandler( xTokenHandler );
+                xParser->setFastDocumentHandler( xFilter );
+                xParser->registerNamespace( "http://openoffice.org/2001/block-list", SvXMLAutoCorrectToken::NAMESPACE );
+                xParser->setTokenHandler( xTokenHandler );
 
                 // parse
                 try
                 {
-                    xImport->parseStream( aParserInput );
+                    xParser->parseStream( aParserInput );
                 }
                 catch( const xml::sax::SAXParseException& )
                 {


More information about the Libreoffice-commits mailing list