[Libreoffice-commits] core.git: sw/qa

Michael Stahl mstahl at redhat.com
Fri Jul 11 07:36:20 PDT 2014


 sw/qa/extras/ooxmlexport/data/fdo80410.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   13 +++++++++++++
 2 files changed, 13 insertions(+)

New commits:
commit 46d9724369ba4f248eab0133d396bd8f6a4453c6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 11 15:07:58 2014 +0200

    fdo#80410: let's add a unit test too...
    
    Change-Id: I2b9853dc5b85c034d767825ca2842738b61b54f5

diff --git a/sw/qa/extras/ooxmlexport/data/fdo80410.docx b/sw/qa/extras/ooxmlexport/data/fdo80410.docx
new file mode 100644
index 0000000..7660d84
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo80410.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 76c3fb9..3ad8b6d 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");


More information about the Libreoffice-commits mailing list