summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-05-29 20:24:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-01 11:59:06 +0200
commit5e68d6cfade45f40b1ad46025a81afe4cb8dd337 (patch)
treeaf7740f3636e6b303371c764bfe7ff083e847879 /chart2/source
parentf15a6e1b1b186bf42e1ade05630d17841add2c46 (diff)
Convert XFastParser into a normal C++ interface
There is no need for it to be an UNO interface anymore (ever since we started supporting dynamic_cast on UNO objects). Which means that XImportFilter2 also needs become a C++ interface. Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388 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, 4 insertions, 7 deletions
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 6eccb22be375..6362fc91beed 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
- Reference< xml::sax::XFastParser > xFastParser(xFilter, uno::UNO_QUERY);
- if (xFastParser.is())
- xFastParser->parseStream(aParserInput);
+ XFastParser* pFastParser = dynamic_cast<XFastParser*>(xFilter.get());
+ if (pFastParser)
+ pFastParser->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 c26587c3ebad..e8a2890c0b24 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -36,9 +36,6 @@ namespace com::sun::star {
namespace embed {
class XStorage;
}
- namespace xml::sax {
- class XFastParser;
- }
namespace document {
class XGraphicStorageHandler;
}