summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/Makefile4
-rw-r--r--writerfilter/source/ooxml/gperffasttokenhandler.xsl13
2 files changed, 8 insertions, 9 deletions
diff --git a/writerfilter/source/Makefile b/writerfilter/source/Makefile
index 240893c5aeb4..2b10ae972629 100644
--- a/writerfilter/source/Makefile
+++ b/writerfilter/source/Makefile
@@ -140,9 +140,9 @@ $(wf_GEN_ooxml_NamespaceIds_hxx) : $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_oox
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
-$(wf_GEN_ooxml_GperfFastToken_hxx) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)
+$(wf_GEN_ooxml_GperfFastToken_hxx) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_token_xml)
$(call gb_Output_announce,$@,build,GPF,1)
- $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)) \
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_token_xml)) \
| tr -d '\r' | $(GPERF) -I -t -E -S1 -c -G -LC++ > $@
$(wf_GEN_ooxml_Model_analyzed): $(wf_SRC_ooxml_Analyze_model_xsl) $(wf_SRC_ooxml_Model)
diff --git a/writerfilter/source/ooxml/gperffasttokenhandler.xsl b/writerfilter/source/ooxml/gperffasttokenhandler.xsl
index d14db0486b5d..648342d57a33 100644
--- a/writerfilter/source/ooxml/gperffasttokenhandler.xsl
+++ b/writerfilter/source/ooxml/gperffasttokenhandler.xsl
@@ -77,15 +77,14 @@ namespace writerfilter { namespace ooxml { namespace tokenmap {
%}
struct token { const char * name; Token_t nToken; };
%%</xsl:text>
- <xsl:for-each select=".//rng:element|.//rng:attribute">
- <xsl:if test="generate-id(.) = generate-id(key('same-token-name', @localname)[1])">
- <xsl:text>&#xa;</xsl:text>
- <xsl:value-of select="@localname"/>
- <xsl:text>, </xsl:text>
- <xsl:call-template name="fastlocalname"/>
- </xsl:if>
+ <xsl:for-each select="/model/fasttoken">
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:value-of select="translate(., '-', '_')"/>
+ <xsl:text>, OOXML_</xsl:text>
+ <xsl:value-of select="translate(., '-', '_')"/>
</xsl:for-each>
<xsl:text>
+FAST_TOKENS_END, OOXML_FAST_TOKENS_END
%%&#xa;</xsl:text>
}}}&#xa;</xsl:template>