10#include <fasttokenhandler.hxx>
12#include <xmloff/token/tokens.hxx>
19#pragma GCC diagnostic push
20#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
21#if __has_warning("-Wdeprecated-register")
22#pragma GCC diagnostic ignored "-Wdeprecated-register"
25#include <tokenhash.inc>
27#pragma GCC diagnostic pop
45 maTokenNamesUtf8( static_cast< size_t >( XML_TOKEN_COUNT ) ),
46 maTokenNames( static_cast< size_t >( XML_TOKEN_COUNT ) )
48 static const char* sppcTokenNames[] =
50#include <tokennames.inc>
54 const char*
const* ppcTokenName = sppcTokenNames;
58 std::string_view pStr = *ppcTokenName;
59 rTokenName = uno::Sequence< sal_Int8 >(
60 reinterpret_cast< const sal_Int8*
>( pStr.data() ), pStr.length() );
61 maTokenNames[
i++] = OStringToOUString( pStr, RTL_TEXTENCODING_UTF8 );
72 const struct xmltoken *pToken = Perfect_Hash::in_word_set( pStr,
nLength );
virtual sal_Int32 getTokenDirect(const char *pToken, sal_Int32 nLength) const override
const OUString & getIdentifier(sal_Int32 nToken) const
virtual ~FastTokenHandler() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier(sal_Int32 nToken) override
virtual sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< sal_Int8 > &Identifier) override
css::uno::Sequence< sal_Int8 > const & getUtf8TokenName(sal_Int32 nToken) const
Returns the UTF-8 name of the passed token identifier as byte sequence.
const OUString & getTokenName(sal_Int32 nToken) const
static sal_Int32 getTokenFromUtf8(const css::uno::Sequence< sal_Int8 > &rUtf8Name)
Returns the token identifier for the passed UTF-8 token name.
static sal_Int32 getTokenPerfectHash(const char *pToken, sal_Int32 nLength)
static const OUString EMPTY_STRING
static const css::uno::Sequence< sal_Int8 > EMPTY_BYTE_SEQ
std::vector< css::uno::Sequence< sal_Int8 > > maTokenNamesUtf8
static sal_Int32 getTokenFromUTF8(const char *pToken, sal_Int32 nLength)
Returns the token identifier for a UTF-8 string.
std::vector< OUString > maTokenNames
TokenMap & StaticTokenMap()