summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/ooxml/factoryimpl.xsl3
-rw-r--r--writerfilter/source/ooxml/model.xml2
-rw-r--r--writerfilter/source/ooxml/namespaceids.xsl3
3 files changed, 6 insertions, 2 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"/>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 70289f529e85..12c47c4f922c 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -23,6 +23,7 @@
<namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" alias="theme" id="officeRelTheme"/>
<namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" alias="wordprocessingDrawing" id="dmlWordDr"/>
<namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/main" alias="drawingml" id="dml"/>
+ <namespace-alias name="http://purl.oclc.org/ooxml/drawingml/main" alias="drawingml" id="dml"/>
<namespace-alias name="urn:schemas-microsoft-com:vml" alias="vml" id="vml"/>
<namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/picture" alias="picture" id="dmlPicture"/>
<namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/diagram" alias="diagram" id="dmlDiagram"/>
@@ -32,6 +33,7 @@
<namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/chart" alias="chart" id="dmlChart"/>
<namespace-alias name="urn:schemas-microsoft-com:office:word" alias="vml_wordprocessingDrawing" id="vmlWord"/>
<namespace-alias name="http://schemas.openxmlformats.org/wordprocessingml/2006/main" alias="wordprocessingml" id="doc"/>
+ <namespace-alias name="http://purl.oclc.org/ooxml/wordprocessingml/main" alias="wordprocessingml" id="doc"/>
<namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/math" alias="math" id="officeMath"/>
<namespace-alias name="http://schemas.openxmlformats.org/schemaLibrary/2006/main" alias="schemaLibrary" id="schema"/>
<namespace-alias name="http://schemas.openxmlformats.org/markup-compatibility/2006" alias="mce" id="mce"/>
diff --git a/writerfilter/source/ooxml/namespaceids.xsl b/writerfilter/source/ooxml/namespaceids.xsl
index ea56acc694a0..d92593dbc374 100644
--- a/writerfilter/source/ooxml/namespaceids.xsl
+++ b/writerfilter/source/ooxml/namespaceids.xsl
@@ -51,8 +51,9 @@
<xsl:include href="factorytools.xsl"/>
+<xsl:key name="namespaces-by-id" match="namespace-alias" use="@id"/>
<xsl:template name="namespaceids">
- <xsl:for-each select="//namespace-alias">
+ <xsl:for-each select="//namespace-alias[generate-id() = generate-id(key('namespaces-by-id', @id)[1])]">
<xsl:text>
const sal_uInt32 </xsl:text>
<xsl:call-template name="namespaceid"/>