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<xsl:stylesheet 24 version="1.0" 25 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 26 xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 27 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 28 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 29 xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 30 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 31 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 32 xmlns:xlink="http://www.w3.org/1999/xlink" 33 xmlns:dc="http://purl.org/dc/elements/1.1/" 34 xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 35 xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 36 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 37 xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 38 xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 39 xmlns:math="http://www.w3.org/1998/Math/MathML" 40 xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 41 xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 42 xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 43 xmlns:ooo="http://openoffice.org/2004/office" 44 xmlns:ooow="http://openoffice.org/2004/writer" 45 xmlns:oooc="http://openoffice.org/2004/calc" 46 xmlns:dom="http://www.w3.org/2001/xml-events" 47 xmlns:xforms="http://www.w3.org/2002/xforms" 48 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 49 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 50 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 51 xmlns:rng="http://relaxng.org/ns/structure/1.0" 52 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 53 xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default"> 54 <xsl:output method="text" /> 55 <xsl:param name="prefix"/> 56 57 <xsl:include href="factorytools.xsl"/> 58 59 <xsl:template name="fasttokens"> 60 <xsl:for-each select="/model/fasttoken"> 61 <xsl:text> 62const sal_Int32 OOXML_</xsl:text> 63<xsl:value-of select="translate(., '-', '_')"/> 64<xsl:text> = </xsl:text> 65<xsl:value-of select="position() - 1"/> 66<xsl:text>;</xsl:text> 67 </xsl:for-each> 68 <xsl:text> 69const sal_Int32 OOXML_FAST_TOKENS_END = </xsl:text> 70<xsl:value-of select="count(/model/fasttoken)"/> 71<xsl:text>;
</xsl:text> 72 </xsl:template> 73 74 <xsl:template match="/"> 75 <out xml:space="preserve"> 76 <xsl:call-template name="licenseheader"/> 77 <xsl:text> 78#ifndef INCLUDED_OOXML_FAST_TOKENS_HXX 79#define INCLUDED_OOXML_FAST_TOKENS_HXX 80 81#include <map> 82#include <vector> 83#include <boost/shared_ptr.hpp> 84#include <string> 85 86#include <resourcemodel/WW8ResourceModel.hxx> 87 88namespace writerfilter { 89namespace ooxml { 90using namespace ::std; 91using namespace ::com::sun::star; 92</xsl:text> 93<xsl:call-template name="fasttokens"/> 94<xsl:text> 95string fastTokenToId(sal_uInt32 nToken); 96 97static const sal_uInt32 F_Attribute = 1U << 31; 98 99}} 100#endif //INCLUDED_OOXML_FAST_TOKENS_HXX
</xsl:text></out></xsl:template> 101 102 <xsl:template match="*"/> 103</xsl:stylesheet> 104