summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-11 15:07:58 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-11 16:31:37 +0200
commit46d9724369ba4f248eab0133d396bd8f6a4453c6 (patch)
tree9b5a749b41cd9c588241ecc7f0a9e8d69f99459e
parent3f9d00a5a9a2f6213889e8701c8a2104fe2b5d7f (diff)
fdo#80410: let's add a unit test too...
Change-Id: I2b9853dc5b85c034d767825ca2842738b61b54f5
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80410.docxbin0 -> 24733 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80410.docx b/sw/qa/extras/ooxmlexport/data/fdo80410.docx
new file mode 100644
index 000000000000..7660d84447d5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80410.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 76c3fb982ce1..3ad8b6d53d47 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3027,6 +3027,19 @@ DECLARE_OOXMLEXPORT_TEST(testFileWithInvalidImageLink, "FileWithInvalidImageLink
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]", "embed", "");
}
+DECLARE_OOXMLEXPORT_TEST(testContentTypeDOCX, "fdo80410.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ if (!pXmlDoc) // only test the export, not initial import
+ return;
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.docx']",
+ "ContentType",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
+}
+
DECLARE_OOXMLEXPORT_TEST(testContentTypeXLSM, "fdo76098.docx")
{
xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");