[Libreoffice-commits] core.git: editeng/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 18 17:11:40 UTC 2019
editeng/source/xml/xmltxtimp.cxx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 87bea6ff734a251165d0fd1b03077fc5e27a95c5
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Nov 18 13:19:28 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Nov 18 18:10:23 2019 +0100
use FasterParser for SvxReadXML
the SvXMLImport superclass of XMLVersionListImport already constructs a
parser, so we can just use that one
Change-Id: I09d946a9d0e978582fbecc67c74cd1ae5c97178e
Reviewed-on: https://gerrit.libreoffice.org/83076
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 51994a323080..b3e40380fba0 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -175,8 +175,6 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection
{
uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
-
uno::Reference<io::XInputStream> xInputStream = new utl::OInputStreamWrapper( rStream );
/* testcode
@@ -212,14 +210,12 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection
*/
// uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTextImportComponent( xText ) );
- uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTextImportComponent( xContext, xText ) );
-
- xParser->setDocumentHandler( xHandler );
+ rtl::Reference< SvxXMLXTextImportComponent > xImport( new SvxXMLXTextImportComponent( xContext, xText ) );
xml::sax::InputSource aParserInput;
aParserInput.aInputStream = xInputStream;
// aParserInput.sSystemId = aMedium.GetName();
- xParser->parseStream( aParserInput );
+ xImport->parseStream( aParserInput );
}
while(false);
More information about the Libreoffice-commits
mailing list