summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-19 08:17:34 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-19 08:17:34 +0200
commit23b49f2390b3d551a52caf06496d8aadf1920bf8 (patch)
treecd5872afe5c8f659c6b31df92d12d3b95a2288c0
parent8957c9419af8a1bc56b7e6cb248dc3fd57708589 (diff)
writerfilter: fail on mistyped namespace URL's
And also fix one typo detected by this new check. Change-Id: Iaa7a4bb0b6dc3f81e5dd0b352584029cfed4ffbb
-rw-r--r--oox/source/token/namespaces.txt2
-rw-r--r--writerfilter/source/ooxml/modelpreprocess.py5
2 files changed, 2 insertions, 5 deletions
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 0cbae456694d..98792d076342 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -74,7 +74,7 @@ wps http://schemas.microsoft.com/office/word/2010/wordproces
wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
w14 http://schemas.microsoft.com/office/word/2010/wordml
-a14 http://schemas.microsoft.com/office/drawingml/2010/main
+a14 http://schemas.microsoft.com/office/drawing/2010/main
# extlst namespaces
diff --git a/writerfilter/source/ooxml/modelpreprocess.py b/writerfilter/source/ooxml/modelpreprocess.py
index 9af2c3bcedbe..3c1419914392 100644
--- a/writerfilter/source/ooxml/modelpreprocess.py
+++ b/writerfilter/source/ooxml/modelpreprocess.py
@@ -70,10 +70,7 @@ def check(model):
def preprocess(model):
for i in model.getElementsByTagName("namespace-alias"):
name = i.getAttribute("name")
- if name in list(ooxUrlIds.keys()):
- i.setAttribute("id", ooxUrlIds[name])
- else:
- i.setAttribute("id", ooxAliasIds[i.getAttribute("alias")])
+ i.setAttribute("id", ooxUrlIds[name])
namespaceAliases[name] = i.getAttribute("alias")
for i in model.getElementsByTagName("namespace"):