LibreOffice Module editeng (master) 1
SvXMLAutoCorrectTokenHandler.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
11#include <xmloff/xmltoken.hxx>
12#if defined __clang__
13#if __has_warning("-Wdeprecated-register")
14#pragma GCC diagnostic push
15#pragma GCC diagnostic ignored "-Wdeprecated-register"
16#endif
17#endif
18#include <tokens.cxx>
19#if defined __clang__
20#if __has_warning("-Wdeprecated-register")
21#pragma GCC diagnostic pop
22#endif
23#endif
24
25using namespace css::uno;
26using namespace ::xmloff::token;
27
29{
30}
31
33{
34}
35
37{
38 return getTokenDirect( reinterpret_cast< const char* >( Identifier.getConstArray() ), Identifier.getLength() );
39}
40
42{
43 return Sequence< sal_Int8 >();
44}
45
46sal_Int32 SvXMLAutoCorrectTokenHandler::getTokenDirect( const char *pTag, sal_Int32 nLength ) const
47{
48 if( !nLength )
49 nLength = strlen( pTag );
50 const struct xmltoken* pToken = Perfect_Hash::in_word_set( pTag, nLength );
51 return pToken ? pToken->nToken : XML_TOKEN_INVALID;
52}
53
54/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Int32 getTokenDirect(const char *pToken, sal_Int32 nLength) const override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier(sal_Int32 Token) override
virtual sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< sal_Int8 > &Identifier) override
XML_TOKEN_INVALID
sal_Int32 nLength