Bump version to 4.1-6
[LibreOffice.git] / writerfilter / source / ooxml / fasttokens.xsl
blobc87fc923164aac178aa7f37a47c92c3f56399087
1 <!--
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 -->
18 <xsl:stylesheet
19 version="1.0"
20 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
21 xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
22 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
23 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
24 xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
25 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
26 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
27 xmlns:xlink="http://www.w3.org/1999/xlink"
28 xmlns:dc="http://purl.org/dc/elements/1.1/"
29 xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
30 xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
31 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
32 xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
33 xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
34 xmlns:math="http://www.w3.org/1998/Math/MathML"
35 xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
36 xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
37 xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
38 xmlns:ooo="http://openoffice.org/2004/office"
39 xmlns:ooow="http://openoffice.org/2004/writer"
40 xmlns:oooc="http://openoffice.org/2004/calc"
41 xmlns:dom="http://www.w3.org/2001/xml-events"
42 xmlns:xforms="http://www.w3.org/2002/xforms"
43 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
44 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
46 xmlns:rng="http://relaxng.org/ns/structure/1.0"
47 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
48 xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
49 <xsl:output method="text" />
50 <xsl:param name="prefix"/>
52 <xsl:include href="factorytools.xsl"/>
54 <xsl:template name="fasttokens">
55 <xsl:text>
56 typedef sal_Int32 Token_t;
57 </xsl:text>
58 <xsl:for-each select="/model/fasttoken">
59 <xsl:text>
60 const Token_t OOXML_</xsl:text>
61 <xsl:value-of select="translate(., '-', '_')"/>
62 <xsl:text> = </xsl:text>
63 <xsl:value-of select="position() - 1"/>
64 <xsl:text>;</xsl:text>
65 </xsl:for-each>
66 <xsl:text>
67 const Token_t OOXML_FAST_TOKENS_END =</xsl:text>
68 <xsl:value-of select="count(/model/fasttoken)"/>
69 <xsl:text>;&#xa;</xsl:text>
70 </xsl:template>
72 <xsl:template match="/">
73 <out xml:space="preserve">
74 <xsl:call-template name="licenseheader"/>
75 <xsl:text>
76 #ifndef INCLUDED_OOXML_FAST_TOKENS_HXX
77 #define INCLUDED_OOXML_FAST_TOKENS_HXX
79 #include &lt;map&gt;
80 #include &lt;vector&gt;
81 #include &lt;boost/shared_ptr.hpp&gt;
82 #include &lt;string&gt;
84 #include &lt;resourcemodel/WW8ResourceModel.hxx&gt;
86 namespace writerfilter {
87 namespace ooxml {
88 using namespace ::std;
89 using namespace ::com::sun::star;
90 </xsl:text>
91 <xsl:call-template name="fasttokens"/>
92 <xsl:text>
93 string fastTokenToId(sal_uInt32 nToken);
95 static const sal_uInt32 F_Attribute = 1U &lt;&lt; 31;
98 #endif //INCLUDED_OOXML_FAST_TOKENS_HXX&#xa;</xsl:text></out></xsl:template>
100 <xsl:template match="*"/>
101 </xsl:stylesheet>