summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-18 11:26:41 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-18 11:52:28 +0100
commit8c52b5dd1c6457131b2c2c6b85222400fce3f246 (patch)
treef0d79df3bcaf2d533fca43912f2388839423e486 /oox
parentd145f49ba8cdf4a9c2e6b28f0f4468a95fc3575b (diff)
oox: fix DOCX strict import of SmartArt
Change-Id: Ied8283e17ec4379f218dc60912e1c41ca28a8ac9
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 5b054f830c55..130ae9e0888a 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -90,8 +90,11 @@ struct NamespaceIds: public rtl::StaticWithInit<
"http://www.w3.org/XML/1998/namespace",
"http://schemas.openxmlformats.org/package/2006/relationships",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ "http://purl.oclc.org/ooxml/officeDocument/relationships",
"http://schemas.openxmlformats.org/drawingml/2006/main",
+ "http://purl.oclc.org/ooxml/drawingml/main",
"http://schemas.openxmlformats.org/drawingml/2006/diagram",
+ "http://purl.oclc.org/ooxml/drawingml/diagram",
"http://schemas.openxmlformats.org/drawingml/2006/chart",
"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing",
"urn:schemas-microsoft-com:vml",
@@ -114,8 +117,11 @@ struct NamespaceIds: public rtl::StaticWithInit<
NMSP_xml,
NMSP_packageRel,
NMSP_officeRel,
+ NMSP_officeRel,
+ NMSP_dml,
NMSP_dml,
NMSP_dmlDiagram,
+ NMSP_dmlDiagram,
NMSP_dmlChart,
NMSP_dmlChartDr,
NMSP_vml,
@@ -146,8 +152,15 @@ struct NamespaceIds: public rtl::StaticWithInit<
void registerNamespaces( FastParser& rParser )
{
const Sequence< beans::Pair<OUString, sal_Int32> > ids = NamespaceIds::get();
+
+ // Filter out duplicates: a namespace can have multiple URL's, think of
+ // strict vs trasitional.
+ std::set<sal_Int32> aSet;
for (sal_Int32 i = 0; i < ids.getLength(); ++i)
- rParser.registerNamespace(ids[i].Second);
+ aSet.insert(ids[i].Second);
+
+ for (std::set<sal_Int32>::iterator it = aSet.begin(); it != aSet.end(); ++it)
+ rParser.registerNamespace(*it);
}
} // namespace