summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/factoryimpl.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/ooxml/factoryimpl.xsl')
-rw-r--r--writerfilter/source/ooxml/factoryimpl.xsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl
index 0ac9e56f8b1a..2fb51396fe24 100644
--- a/writerfilter/source/ooxml/factoryimpl.xsl
+++ b/writerfilter/source/ooxml/factoryimpl.xsl
@@ -196,6 +196,7 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh
</xsl:text>
</xsl:template>
+<xsl:key name="namespaces-by-id" match="namespace-alias" use="@id"/>
<xsl:template name="fasttokentoid">
<xsl:text>
namespace tokenmap {
@@ -217,7 +218,7 @@ string fastTokenToId(sal_uInt32 nToken)
switch (nToken &amp; 0xffff0000)
{</xsl:text>
- <xsl:for-each select="//namespace-alias">
+ <xsl:for-each select="//namespace-alias[generate-id() = generate-id(key('namespaces-by-id', @id)[1])]">
<xsl:text>
case NS_</xsl:text>
<xsl:value-of select="@alias"/>