1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #include <iostream> 25 #include "resourcemodel/WW8ResourceModel.hxx" 26 #include "ooxml/OOXMLFastTokens.hxx" 27 28 namespace writerfilter 29 { 30 operator ()(const Token_t & rToken) const31size_t TokenHash::operator()(const Token_t & rToken) const 32 { 33 return rToken.getId(); 34 } 35 Token_t()36Token_t::Token_t() 37 { 38 assign(ooxml::OOXML_FAST_TOKENS_END); 39 } 40 Token_t(sal_Int32 nId)41Token_t::Token_t(sal_Int32 nId) 42 { 43 assign(nId); 44 } 45 assign(sal_Int32 nId)46void Token_t::assign(sal_Int32 nId) 47 { 48 m_nId = nId; 49 } 50 ~Token_t()51Token_t::~Token_t() 52 { 53 } 54 getId() const55sal_Int32 Token_t::getId() const 56 { 57 return m_nId; 58 } 59 operator sal_Int32() const60Token_t::operator sal_Int32() const 61 { 62 return getId(); 63 } 64 operator =(sal_Int32 nId)65Token_t & Token_t::operator = (sal_Int32 nId) 66 { 67 assign(nId); 68 69 return *this; 70 } 71 72 #ifdef DEBUG toString() const73::std::string Token_t::toString() const 74 { 75 return m_string; 76 } 77 #endif 78 } 79