diff options
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/fastattribs.hxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 839f4c2b8cfd..60090f88f2f5 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SAX_FASTATTRIBS_HXX #include <com/sun/star/xml/sax/XFastAttributeList.hpp> +#include <com/sun/star/xml/sax/XFastTokenHandler.hpp> #include <cppuhelper/implbase.hxx> #include <sax/saxdllapi.h> @@ -49,7 +50,8 @@ struct UnknownAttribute typedef std::vector< UnknownAttribute > UnknownAttributeList; /// A native C++ interface to tokenisation -class SAX_DLLPUBLIC FastTokenHandlerBase +class SAX_DLLPUBLIC FastTokenHandlerBase : + public cppu::WeakImplHelper< css::xml::sax::XFastTokenHandler > { public: virtual ~FastTokenHandlerBase(); @@ -57,24 +59,21 @@ class SAX_DLLPUBLIC FastTokenHandlerBase /** * Client method to attempt the use of this interface if possible. - * @xTokenHandler - the UNO handle for the token lookup interface - * @pTokenHandler - a dynamic_cast version of @xTokenHandler to this interface + * @xTokenHandler - the token lookup interface * @pStr - string buffer to lookup * @nLength - optional length of chars in that buffer * * @return Tokenized form of pStr */ static sal_Int32 getTokenFromChars( - const css::uno::Reference<css::xml::sax::XFastTokenHandler > &xTokenHandler, - const FastTokenHandlerBase *pTokenHandler /* can be NULL */, + const FastTokenHandlerBase *pTokenHandler, const char *pStr, size_t nLength ); }; class SAX_DLLPUBLIC FastAttributeList final : public cppu::WeakImplHelper< css::xml::sax::XFastAttributeList > { public: - FastAttributeList( const css::uno::Reference< css::xml::sax::XFastTokenHandler >& xTokenHandler, - FastTokenHandlerBase *pOptHandlerBase = nullptr ); + FastAttributeList( FastTokenHandlerBase *pTokenHandler ); virtual ~FastAttributeList() override; void clear(); @@ -208,8 +207,7 @@ private: std::vector< sal_Int32 > maAttributeValues; std::vector< sal_Int32 > maAttributeTokens; UnknownAttributeList maUnknownAttributes; - css::uno::Reference< css::xml::sax::XFastTokenHandler > mxTokenHandler; - FastTokenHandlerBase *mpTokenHandler; + FastTokenHandlerBase * mpTokenHandler; }; } |