diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-11 14:19:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-25 12:13:26 +0200 |
commit | 0dbc76a3ca25f43232073484541504e342380d0a (patch) | |
tree | d0324098ee97a845cbbf9f7205a43af94ca7306d /unoxml/qa | |
parent | af9642350db024e9a9ff73f46693ff5d0a4ce66b (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 'unoxml/qa')
-rw-r--r-- | unoxml/qa/unit/domtest.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx index 31909dba6e29..b6e468defdb5 100644 --- a/unoxml/qa/unit/domtest.cxx +++ b/unoxml/qa/unit/domtest.cxx @@ -19,6 +19,7 @@ #include <rtl/ref.hxx> #include <sal/log.hxx> +#include <sax/fastattribs.hxx> #include <comphelper/seqstream.hxx> #include <cppuhelper/implbase.hxx> #include <cppunit/extensions/HelperMacros.h> @@ -168,8 +169,7 @@ struct DocumentHandler } }; -struct TokenHandler - : public ::cppu::WeakImplHelper< xml::sax::XFastTokenHandler > +struct TokenHandler : public sax_fastparser::FastTokenHandlerBase { virtual ::sal_Int32 SAL_CALL getTokenFromUTF8( const uno::Sequence< ::sal_Int8 >& Identifier ) override { @@ -182,6 +182,11 @@ struct TokenHandler false ); return uno::Sequence<sal_Int8>(); } + + virtual sal_Int32 getTokenDirect( const char * /* pToken */, sal_Int32 /* nLength */ ) const override + { + return -1; + } }; struct BasicTest : public test::BootstrapFixture |