summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-01 13:41:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-01 15:07:18 +0200
commite899a75fc6dd600ea9992c851a42734b334122b6 (patch)
tree1a54173803fc304f8af8802654ec147c6e6ad38d /sc
parent020d72fb85dac7a52eacb29731b8f2d536a2892d (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 'sc')
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index d403bc4cff26..3546bfe5f043 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
+#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -179,9 +180,9 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
// xImportInterface is either ScXMLImport or an XMLTransformer subclass.
// ScXMLImport implements XFastParser, but XMLTransformer only implements XExtendedDocumentHandler
- XFastParser* pFastParser = dynamic_cast<XFastParser*>(xImportInterface.get());
- if (pFastParser)
- pFastParser->parseStream( aParserInput );
+ uno::Reference< xml::sax::XFastParser > xFastParser(xImportInterface, uno::UNO_QUERY);
+ if (xFastParser)
+ xFastParser->parseStream( aParserInput );
else
{
uno::Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(xContext);