summaryrefslogtreecommitdiff
path: root/chart2/source
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 /chart2/source
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 'chart2/source')
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx8
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx3
2 files changed, 7 insertions, 4 deletions
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 6362fc91beed..6eccb22be375 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -44,11 +44,11 @@
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/document/GraphicStorageHandler.hpp>
#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
-#include <sax/xfastparser.hxx>
using namespace ::com::sun::star;
@@ -463,9 +463,9 @@ ErrCode XMLFilter::impl_ImportStream(
aParserInput.aInputStream.set(xInputStream, uno::UNO_QUERY_THROW);
// the underlying SvXMLImport implements XFastParser, XImporter, XFastDocumentHandler
- XFastParser* pFastParser = dynamic_cast<XFastParser*>(xFilter.get());
- if (pFastParser)
- pFastParser->parseStream(aParserInput);
+ Reference< xml::sax::XFastParser > xFastParser(xFilter, uno::UNO_QUERY);
+ if (xFastParser.is())
+ xFastParser->parseStream(aParserInput);
else
{
Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(m_xContext);
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
index e8a2890c0b24..c26587c3ebad 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -36,6 +36,9 @@ namespace com::sun::star {
namespace embed {
class XStorage;
}
+ namespace xml::sax {
+ class XFastParser;
+ }
namespace document {
class XGraphicStorageHandler;
}