summaryrefslogtreecommitdiff
path: root/sax/qa/cppunit
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 /sax/qa/cppunit
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 'sax/qa/cppunit')
-rw-r--r--sax/qa/cppunit/parser.cxx7
-rw-r--r--sax/qa/cppunit/xmlimport.cxx3
2 files changed, 7 insertions, 3 deletions
diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx
index 2fb3b400d000..e5fd9e2ab23c 100644
--- a/sax/qa/cppunit/parser.cxx
+++ b/sax/qa/cppunit/parser.cxx
@@ -16,6 +16,7 @@
#include <cppuhelper/implbase.hxx>
#include <sax/fastparser.hxx>
+#include <sax/fastattribs.hxx>
#include <test/bootstrapfixture.hxx>
#include <rtl/ref.hxx>
@@ -24,7 +25,7 @@ using namespace css::xml::sax;
namespace {
-class DummyTokenHandler : public cppu::WeakImplHelper< xml::sax::XFastTokenHandler >
+class DummyTokenHandler : public sax_fastparser::FastTokenHandlerBase
{
public:
DummyTokenHandler() {}
@@ -38,6 +39,10 @@ public:
CPPUNIT_ASSERT_MESSAGE( "getUTF8Identifier: unexpected call", false );
return uno::Sequence<sal_Int8>();
}
+ virtual sal_Int32 getTokenDirect( const char * /* pToken */, sal_Int32 /* nLength */ ) const override
+ {
+ return -1;
+ }
};
class ParserTest: public test::BootstrapFixture
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 91c955982746..449c9ef3b38c 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -251,8 +251,7 @@ void SAL_CALL NSDocumentHandler::startElement( const OUString& aName, const Refe
CPPUNIT_ASSERT(false);
}
-class DummyTokenHandler : public cppu::WeakImplHelper< XFastTokenHandler >,
- public sax_fastparser::FastTokenHandlerBase
+class DummyTokenHandler : public sax_fastparser::FastTokenHandlerBase
{
public:
const static OString tokens[];