update dev300-m58
[ooovba.git] / writerfilter / source / ooxml / OOXMLFastTokenHandler.hxx
blob7599aa39012a6aaf419b188a06960501db753af8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OOXMLFastTokenHandler.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX
32 #define INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX
34 #include "sal/config.h"
35 #include "com/sun/star/uno/XComponentContext.hpp"
36 #include "cppuhelper/implbase1.hxx"
37 #include "com/sun/star/xml/sax/XFastTokenHandler.hpp"
39 namespace css = ::com::sun::star;
41 namespace writerfilter {
42 namespace ooxml
45 class OOXMLFastTokenHandler:
46 public ::cppu::WeakImplHelper1<
47 css::xml::sax::XFastTokenHandler>
49 public:
50 explicit OOXMLFastTokenHandler(css::uno::Reference< css::uno::XComponentContext > const & context);
52 // ::com::sun::star::xml::sax::XFastTokenHandler:
53 virtual ::sal_Int32 SAL_CALL getToken(const ::rtl::OUString & Identifier) throw (css::uno::RuntimeException);
54 virtual ::rtl::OUString SAL_CALL getIdentifier(::sal_Int32 Token) throw (css::uno::RuntimeException);
55 virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getUTF8Identifier(::sal_Int32 Token) throw (css::uno::RuntimeException);
56 virtual ::sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< ::sal_Int8 > & Identifier) throw (css::uno::RuntimeException);
58 private:
59 OOXMLFastTokenHandler(OOXMLFastTokenHandler &); // not defined
60 void operator =(OOXMLFastTokenHandler &); // not defined
62 virtual ~OOXMLFastTokenHandler() {}
64 css::uno::Reference< css::uno::XComponentContext > m_xContext;
68 #endif // INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX