diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-01 13:41:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-01 15:07:18 +0200 |
commit | e899a75fc6dd600ea9992c851a42734b334122b6 (patch) | |
tree | 1a54173803fc304f8af8802654ec147c6e6ad38d /sw/source/filter/xml | |
parent | 020d72fb85dac7a52eacb29731b8f2d536a2892d (diff) |
Revert "Convert XFastParser into a normal C++ interface"
This reverts commit 5e68d6cfade45f40b1ad46025a81afe4cb8dd337.
Reason for revert: Seems like outside users have been using this API
Change-Id: I8814cf1eb4f000eeb4cbbb5db9c282d001465993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 31ee26289830..b679f111a3b6 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -159,11 +159,11 @@ ErrCode ReadThroughComponent( if( !xFilter.is() ) return ERR_SWG_READ_ERROR; // the underlying SvXMLImport implements XFastParser, XImporter, XFastDocumentHandler - XFastParser* pFastParser = dynamic_cast<XFastParser*>(xFilter.get()); + uno::Reference< xml::sax::XFastParser > xFastParser(xFilter, UNO_QUERY); uno::Reference< xml::sax::XDocumentHandler > xDocumentHandler; - if (!pFastParser) + if (!xFastParser) xDocumentHandler.set(xFilter, UNO_QUERY); - if (!xDocumentHandler && !pFastParser) + if (!xDocumentHandler && !xFastParser) { SAL_WARN("sd", "service does not implement XFastParser or XDocumentHandler"); assert(false); @@ -177,8 +177,8 @@ ErrCode ReadThroughComponent( // finally, parse the stream try { - if (pFastParser) - pFastParser->parseStream( aParserInput ); + if (xFastParser) + xFastParser->parseStream( aParserInput ); else { uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext); |