summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-11 14:19:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-25 12:13:26 +0200
commit0dbc76a3ca25f43232073484541504e342380d0a (patch)
treed0324098ee97a845cbbf9f7205a43af94ca7306d /oox
parentaf9642350db024e9a9ff73f46693ff5d0a4ce66b (diff)
make FastParser always take a FastTokenHandlerBase subclass
since most of the call sites already do, and we can skip the slow path this way. Change-Id: I64ed30c51324e0510818f42ef838f97c401bb6dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/fasttokenhandler.cxx2
-rw-r--r--oox/source/crypto/AgileEngine.cxx8
2 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/core/fasttokenhandler.cxx b/oox/source/core/fasttokenhandler.cxx
index a57be30e0c2c..55b0389b8d18 100644
--- a/oox/source/core/fasttokenhandler.cxx
+++ b/oox/source/core/fasttokenhandler.cxx
@@ -76,7 +76,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_oox_core_FastTokenHandler_get_implementation(
uno::XComponentContext* /*pCtx*/, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return cppu::acquire(new oox::core::FastTokenHandler());
+ return cppu::acquire(static_cast<sax_fastparser::FastTokenHandlerBase*>(new oox::core::FastTokenHandler()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index eb2257f94f5f..d8c184caa46c 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -25,6 +25,7 @@
#include <filter/msfilter/mscodec.hxx>
#include <tools/stream.hxx>
#include <tools/XmlWriter.hxx>
+#include <sax/fastattribs.hxx>
#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
@@ -48,7 +49,7 @@ OUString stripNamespacePrefix(OUString const & rsInputName)
return rsInputName.copy(rsInputName.indexOf(":") + 1);
}
-class AgileTokenHandler : public cppu::WeakImplHelper<XFastTokenHandler>
+class AgileTokenHandler : public sax_fastparser::FastTokenHandlerBase
{
public:
virtual sal_Int32 SAL_CALL getTokenFromUTF8(const Sequence< sal_Int8 >& /*nIdentifier*/) override
@@ -60,6 +61,11 @@ public:
{
return Sequence<sal_Int8>();
}
+
+ virtual sal_Int32 getTokenDirect( const char * /* pToken */, sal_Int32 /* nLength */ ) const override
+ {
+ return -1;
+ }
};
class AgileDocumentHandler : public ::cppu::WeakImplHelper<XFastDocumentHandler>