diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-18 13:19:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-18 18:10:23 +0100 |
commit | 87bea6ff734a251165d0fd1b03077fc5e27a95c5 (patch) | |
tree | 4e1d9605b157aac19adec340d649d4464a17f68f /editeng | |
parent | 43570eb811ec731d5f86b5fa00bb5dfacaceb2ef (diff) |
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@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/xml/xmltxtimp.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
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); |