bump product version to 5.0.4.1
[LibreOffice.git] / editeng / source / misc / SvXMLAutoCorrectTokenHandler.hxx
blobeaf15d64339d80af7650b6dd014dcbed7c62ddcf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef EDITENG_SOURCE_MISC_SVXMLAUTOCORRECTTOKENHANDLER_HXX
11 #define EDITENG_SOURCE_MISC_SVXMLAUTOCORRECTTOKENHANDLER_HXX
13 #include <sal/types.h>
14 #include <xmloff/xmltoken.hxx>
15 #include <xmloff/xmlnmspe.hxx>
16 #include <cppuhelper/implbase1.hxx>
17 #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
18 #include <com/sun/star/xml/sax/FastToken.hpp>
19 #include <sax/fastattribs.hxx>
21 using namespace ::css::xml::sax;
22 using namespace ::xmloff::token;
24 enum SvXMLAutoCorrectToken : sal_Int32
26 NAMESPACE = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST, //65553
27 ABBREVIATED_NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_ABBREVIATED_NAME, //65655
28 BLOCK = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_BLOCK, //65791
29 BLOCKLIST = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_BLOCK_LIST, //65792
30 NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_NAME //66737
33 class SvXMLAutoCorrectTokenHandler : public
34 cppu::WeakImplHelper1< css::xml::sax::XFastTokenHandler >,
35 public sax_fastparser::FastTokenHandlerBase
37 public:
38 explicit SvXMLAutoCorrectTokenHandler();
39 virtual ~SvXMLAutoCorrectTokenHandler();
41 //XFastTokenHandler
42 virtual sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier )
43 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
44 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 Token )
45 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
47 // Much faster direct C++ shortcut to the method that matters
48 virtual sal_Int32 getTokenDirect( const char *pToken, sal_Int32 nLength ) const SAL_OVERRIDE;
51 #endif // EDITENG_SOURCE_MISC_SVXMLAUTOCORRECTTOKENHANDLER_HXX
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */