1*b8a377c6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*b8a377c6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*b8a377c6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*b8a377c6SAndrew Rist * distributed with this work for additional information 6*b8a377c6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*b8a377c6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*b8a377c6SAndrew Rist * "License"); you may not use this file except in compliance 9*b8a377c6SAndrew Rist * with the License. You may obtain a copy of the License at 10*b8a377c6SAndrew Rist * 11*b8a377c6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*b8a377c6SAndrew Rist * 13*b8a377c6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*b8a377c6SAndrew Rist * software distributed under the License is distributed on an 15*b8a377c6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b8a377c6SAndrew Rist * KIND, either express or implied. See the License for the 17*b8a377c6SAndrew Rist * specific language governing permissions and limitations 18*b8a377c6SAndrew Rist * under the License. 19*b8a377c6SAndrew Rist * 20*b8a377c6SAndrew Rist *************************************************************/ 21*b8a377c6SAndrew Rist 22*b8a377c6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX 25cdf0e10cSrcweir #define INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "sal/config.h" 28cdf0e10cSrcweir #include "com/sun/star/uno/XComponentContext.hpp" 29cdf0e10cSrcweir #include "cppuhelper/implbase1.hxx" 30cdf0e10cSrcweir #include "com/sun/star/xml/sax/XFastTokenHandler.hpp" 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace css = ::com::sun::star; 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace writerfilter { 35cdf0e10cSrcweir namespace ooxml 36cdf0e10cSrcweir { 37cdf0e10cSrcweir 38cdf0e10cSrcweir class OOXMLFastTokenHandler: 39cdf0e10cSrcweir public ::cppu::WeakImplHelper1< 40cdf0e10cSrcweir css::xml::sax::XFastTokenHandler> 41cdf0e10cSrcweir { 42cdf0e10cSrcweir public: 43cdf0e10cSrcweir explicit OOXMLFastTokenHandler(css::uno::Reference< css::uno::XComponentContext > const & context); 44cdf0e10cSrcweir 45cdf0e10cSrcweir // ::com::sun::star::xml::sax::XFastTokenHandler: 46cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getToken(const ::rtl::OUString & Identifier) throw (css::uno::RuntimeException); 47cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getIdentifier(::sal_Int32 Token) throw (css::uno::RuntimeException); 48cdf0e10cSrcweir virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getUTF8Identifier(::sal_Int32 Token) throw (css::uno::RuntimeException); 49cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< ::sal_Int8 > & Identifier) throw (css::uno::RuntimeException); 50cdf0e10cSrcweir 51cdf0e10cSrcweir private: 52cdf0e10cSrcweir OOXMLFastTokenHandler(OOXMLFastTokenHandler &); // not defined 53cdf0e10cSrcweir void operator =(OOXMLFastTokenHandler &); // not defined 54cdf0e10cSrcweir ~OOXMLFastTokenHandler()55cdf0e10cSrcweir virtual ~OOXMLFastTokenHandler() {} 56cdf0e10cSrcweir 57cdf0e10cSrcweir css::uno::Reference< css::uno::XComponentContext > m_xContext; 58cdf0e10cSrcweir }; 59cdf0e10cSrcweir 60cdf0e10cSrcweir }} 61cdf0e10cSrcweir #endif // INCLUDED_OOXML_FAST_TOKEN_HANDLER_HXX 62