23 #include <rtl/string.hxx>
24 #include <oox/token/tokens.hxx>
28 using ::com::sun::star::uno::Sequence;
33 #pragma GCC diagnostic push
34 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
35 #if __has_warning("-Wdeprecated-register")
36 #pragma GCC diagnostic ignored "-Wdeprecated-register"
39 #include <tokenhash.inc>
41 #pragma GCC diagnostic pop
48 maTokenNames( static_cast< size_t >( XML_TOKEN_COUNT ) )
50 static const char* sppcTokenNames[] =
53 #include <tokennames.inc>
57 const char*
const* ppcTokenName = sppcTokenNames;
60 OString aUtf8Token( *ppcTokenName );
65 for (
unsigned char c =
'a'; c <=
'z'; c++)
67 const struct xmltoken* pToken = Perfect_Hash::in_word_set(
68 reinterpret_cast< const char* >( &c ), 1 );
80 const struct xmltoken* pToken = Perfect_Hash::in_word_set( aUtf8Name.getStr(), aUtf8Name.getLength() );
86 const struct xmltoken* pToken = Perfect_Hash::in_word_set( pStr, nLength );
TokenMap & StaticTokenMap()
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
static sal_Int32 getTokenFromUnicode(std::u16string_view rUnicodeName)
Returns the token identifier for the passed Unicode token name.
sal_Int32 mnAlphaTokens[26]
static sal_Int32 getTokenPerfectHash(const char *pToken, sal_Int32 nLength)
static const css::uno::Sequence< sal_Int8 > EMPTY_BYTE_SEQ
std::vector< css::uno::Sequence< sal_Int8 > > maTokenNames