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

New commits:
commit ad66197f9e18da53afb42042bd0c86e0f3d94675
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Nov 5 17:57:34 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 6 07:07:09 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.gran...@collabora.co.uk>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ea7372f1e15d..70ff36c5594f 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2215,16 +2215,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& )
                 {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to