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
39 maTokenNamesUtf8( static_cast< size_t >( XML_TOKEN_COUNT ) ),
40 maTokenNames( static_cast< size_t >( XML_TOKEN_COUNT ) )
42 static const char* sppcTokenNames[] =
44 #include <tokennames.inc>
48 const char*
const* ppcTokenName = sppcTokenNames;
52 OString aUtf8Token( *ppcTokenName );
53 rTokenName = uno::Sequence< sal_Int8 >(
reinterpret_cast< const sal_Int8*
>(
54 aUtf8Token.getStr() ), aUtf8Token.getLength() );
55 maTokenNames[i++] = OUString( aUtf8Token.getStr(), aUtf8Token.getLength(), RTL_TEXTENCODING_UTF8 );
66 const struct xmltoken *pToken = Perfect_Hash::in_word_set( pStr, nLength );
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
css::uno::Sequence< sal_Int8 > const & getUtf8TokenName(sal_Int32 nToken) const
Returns the UTF-8 name of the passed token identifier as byte sequence.
virtual ~FastTokenHandler() override
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
const OUString & getTokenName(sal_Int32 nToken) const
virtual sal_Int32 getTokenDirect(const char *pToken, sal_Int32 nLength) const override
virtual sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< sal_Int8 > &Identifier) override
static sal_Int32 getTokenFromUtf8(const css::uno::Sequence< sal_Int8 > &rUtf8Name)
Returns the token identifier for the passed UTF-8 token name.
std::vector< css::uno::Sequence< sal_Int8 > > maTokenNamesUtf8
const OUString & getIdentifier(sal_Int32 nToken) const
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier(sal_Int32 nToken) override
std::vector< OUString > maTokenNames
static sal_Int32 getTokenFromUTF8(const char *pToken, sal_Int32 nLength)
Returns the token identifier for a UTF-8 string.