a1bd173
From e3c741d7e59aada98ea6648b03f7a5a36cca4520 Mon Sep 17 00:00:00 2001
a1bd173
From: Michael Stahl <mstahl@redhat.com>
a1bd173
Date: Fri, 11 Dec 2015 16:55:55 +0100
a1bd173
Subject: [PATCH 6/6] sw: extend various OOXML export test to check embedded
a1bd173
 objects
a1bd173
a1bd173
(cherry picked from commit 1af4dbd827b615a10e4686486fa9034e7adf1289)
a1bd173
(cherry picked from commit e2bb242eb20f8bd24e3f1033c09dd1d379877084)
a1bd173
a1bd173
sw: extend some more OOXML export test to check embedded objects
a1bd173
a1bd173
(cherry picked from commit 988f1c71214870cb0a3df7d156eefd64e096bf0b)
a1bd173
(cherry picked from commit b676e97dd30272171dc07c8e5ddc3e562f5ebb1a)
a1bd173
a1bd173
Change-Id: Ie1047a2a213632f05b0ae091a3a7e4118a271082
a1bd173
Reviewed-on: https://gerrit.libreoffice.org/20760
a1bd173
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
a1bd173
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
a1bd173
---
a1bd173
 sw/qa/extras/inc/swmodeltestbase.hxx      |   1 +
a1bd173
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |  24 +++++++
a1bd173
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |  89 ++++++++++++++++++++++++-
a1bd173
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 104 ++++++++++++++++++++++++++++++
a1bd173
 4 files changed, 217 insertions(+), 1 deletion(-)
a1bd173
a1bd173
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
a1bd173
index 6b91c23..879c4f9 100644
a1bd173
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
a1bd173
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
a1bd173
@@ -697,6 +697,7 @@ protected:
a1bd173
         xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("lc"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"));
a1bd173
         xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("extended-properties"), BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"));
a1bd173
         xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a14"), BAD_CAST("http://schemas.microsoft.com/office/drawing/2010/main"));
a1bd173
+        xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("c"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/chart"));
a1bd173
         xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("o"), BAD_CAST("urn:schemas-microsoft-com:office:office"));
a1bd173
         // odt
a1bd173
         xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
a1bd173
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
a1bd173
index c870263..05a0dea 100644
a1bd173
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
a1bd173
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
a1bd173
@@ -305,6 +305,30 @@ DECLARE_OOXMLEXPORT_TEST(testChartDupe, "chart-dupe.docx")
a1bd173
     uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
a1bd173
     // This was 2, on second import we got a duplicated chart copy.
a1bd173
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xEmbeddedObjects->getCount());
a1bd173
+
a1bd173
+    xmlDocPtr pXmlDocCT = parseExport("[Content_Types].xml");
a1bd173
+
a1bd173
+    if (!pXmlDocCT)
a1bd173
+       return; // initial import
a1bd173
+
a1bd173
+    assertXPath(pXmlDocCT,
a1bd173
+        "/ContentType:Types/ContentType:Override[@PartName='/word/charts/chart1.xml']",
a1bd173
+        "ContentType",
a1bd173
+        "application/vnd.openxmlformats-officedocument.drawingml.chart+xml");
a1bd173
+    assertXPath(pXmlDocCT, "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/Microsoft_Excel_Worksheet1.xlsx']", "ContentType", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/charts/_rels/chart1.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='../embeddings/Microsoft_Excel_Worksheet1.xlsx']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocChart1 = parseExport("word/charts/chart1.xml");
a1bd173
+    assertXPath(pXmlDocChart1,
a1bd173
+        "/c:chartSpace/c:externalData",
a1bd173
+        "id",
a1bd173
+        "rId1");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testPositionAndRotation, "position-and-rotation.docx")
a1bd173
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
a1bd173
index b5c8836..1a16cba 100644
a1bd173
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
a1bd173
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
a1bd173
@@ -390,6 +390,27 @@ DECLARE_OOXMLEXPORT_TEST(testChartInFooter, "chart-in-footer.docx")
a1bd173
     // Check footer1.xml.rels contains in doc after roundtrip.
a1bd173
     // Check Id = rId1 in footer1.xml.rels
a1bd173
     assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship","Id","rId1");
a1bd173
+    assertXPath(pXmlDoc,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Id='rId1']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
a1bd173
+
a1bd173
+    xmlDocPtr pXmlDocCT = parseExport("[Content_Types].xml");
a1bd173
+    assertXPath(pXmlDocCT,
a1bd173
+        "/ContentType:Types/ContentType:Override[@PartName='/word/charts/chart1.xml']",
a1bd173
+        "ContentType",
a1bd173
+        "application/vnd.openxmlformats-officedocument.drawingml.chart+xml");
a1bd173
+
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocFooter1 = parseExport("word/footer1.xml");
a1bd173
+    assertXPath(pXmlDocFooter1,
a1bd173
+        "/w:ftr/w:p[1]/w:r/w:drawing/wp:inline/a:graphic/a:graphicData",
a1bd173
+        "uri",
a1bd173
+        "http://schemas.openxmlformats.org/drawingml/2006/chart");
a1bd173
+    assertXPath(pXmlDocFooter1,
a1bd173
+        "/w:ftr/w:p[1]/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/c:chart",
a1bd173
+        "id",
a1bd173
+        "rId1");
a1bd173
 
a1bd173
     uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
a1bd173
     if (xDrawPageSupplier.is())
a1bd173
@@ -516,7 +537,26 @@ DECLARE_OOXMLEXPORT_TEST(testOleObject, "test_ole_object.docx")
a1bd173
     if (!pXmlDoc)
a1bd173
         return;
a1bd173
 
a1bd173
-     assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape/v:imagedata", "o:title", "");
a1bd173
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape/v:imagedata", "o:title", "");
a1bd173
+    assertXPath(pXmlDoc,
a1bd173
+        "/w:document/w:body/w:p[2]/w:r/w:object/o:OLEObject",
a1bd173
+        "DrawAspect",
a1bd173
+        "Content");
a1bd173
+    // TODO: ProgID="Package" - what is this? Zip with 10k extra header?
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.bin']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
a1bd173
+    // check the media type too
a1bd173
+    xmlDocPtr pXmlDocCT = parseExport("[Content_Types].xml");
a1bd173
+    assertXPath(pXmlDocCT,
a1bd173
+        "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.bin']",
a1bd173
+        "ContentType",
a1bd173
+        "application/vnd.openxmlformats-officedocument.oleObject");
a1bd173
+
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testFdo74792, "fdo74792.docx")
a1bd173
@@ -681,6 +721,26 @@ DECLARE_OOXMLEXPORT_TEST(testOLEObjectinHeader, "2129393649.docx")
a1bd173
         return;
a1bd173
 
a1bd173
     assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship[1]","Id","rId1");
a1bd173
+
a1bd173
+    xmlDocPtr pXmlDocCT = parseExport("[Content_Types].xml");
a1bd173
+
a1bd173
+    // check the media type too
a1bd173
+    assertXPath(pXmlDocCT,
a1bd173
+        "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.bin']",
a1bd173
+        "ContentType",
a1bd173
+        "application/vnd.openxmlformats-officedocument.oleObject");
a1bd173
+
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocHeader1 = parseExport("word/header1.xml");
a1bd173
+    assertXPath(pXmlDocHeader1,
a1bd173
+        "/w:hdr/w:tbl/w:tr[1]/w:tc[2]/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Word.Picture.8");
a1bd173
+    xmlDocPtr pXmlDocHeader2 = parseExport("word/header2.xml");
a1bd173
+    assertXPath(pXmlDocHeader2,
a1bd173
+        "/w:hdr/w:tbl/w:tr[1]/w:tc[2]/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Word.Picture.8");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(test_ClosingBrace, "2120112713.docx")
a1bd173
@@ -769,6 +829,19 @@ DECLARE_OOXMLEXPORT_TEST(testContentTypeXLSM, "fdo76098.docx")
a1bd173
        return;
a1bd173
 
a1bd173
     assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/Microsoft_Excel_Macro-Enabled_Worksheet1.xlsm']", "ContentType", "application/vnd.ms-excel.sheet.macroEnabled.12");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/charts/_rels/chart1.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='../embeddings/Microsoft_Excel_Macro-Enabled_Worksheet1.xlsm']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocChart1 = parseExport("word/charts/chart1.xml");
a1bd173
+    assertXPath(pXmlDocChart1,
a1bd173
+        "/c:chartSpace/c:externalData",
a1bd173
+        "id",
a1bd173
+        "rId1");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(test76108, "test76108.docx")
a1bd173
@@ -825,6 +898,20 @@ DECLARE_OOXMLEXPORT_TEST(testEmbeddedExcelChart, "EmbeddedExcelChart.docx")
a1bd173
         "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.xls']",
a1bd173
         "ContentType",
a1bd173
         "application/vnd.ms-excel");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xls']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
a1bd173
+
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Excel.Chart.8");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testTdf83227, "tdf83227.docx")
a1bd173
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
a1bd173
index 50545cc..c709513 100644
a1bd173
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
a1bd173
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
a1bd173
@@ -342,6 +342,19 @@ DECLARE_OOXMLEXPORT_TEST(testContentTypeOLE, "fdo77759.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.xlsx");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsx']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Excel.Sheet.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo78420, "fdo78420.docx")
a1bd173
@@ -547,6 +560,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79968_sldx, "fdo79968.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.openxmlformats-officedocument.presentationml.slide']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.sldx");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.sldx']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "PowerPoint.Slide.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo79969_xlsb, "fdo79969_xlsb.docx")
a1bd173
@@ -561,6 +587,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79969_xlsb, "fdo79969_xlsb.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.ms-excel.sheet.binary.macroEnabled.12']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.xlsb");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsb']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Excel.SheetBinaryMacroEnabled.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo80097, "fdo80097.docx")
a1bd173
@@ -638,6 +677,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79969_xlsm, "fdo79969_xlsm.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.ms-excel.sheet.macroEnabled.12']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.xlsm");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsm']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Excel.SheetMacroEnabled.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo80522,"fdo80522.docx")
a1bd173
@@ -651,6 +703,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80522,"fdo80522.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.ms-word.document.macroEnabled.12']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.docm");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.docm']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Word.DocumentMacroEnabled.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo80523_pptm,"fdo80523_pptm.docx")
a1bd173
@@ -664,6 +729,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80523_pptm,"fdo80523_pptm.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.ms-powerpoint.presentation.macroEnabled.12']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.pptm");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.pptm']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "PowerPoint.ShowMacroEnabled.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo80523_sldm,"fdo80523_sldm.docx")
a1bd173
@@ -677,6 +755,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80523_sldm,"fdo80523_sldm.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.ms-powerpoint.slide.macroEnabled.12']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.sldm");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.sldm']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "PowerPoint.SlideMacroEnabled.12");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testfdo80898, "fdo80898.docx")
a1bd173
@@ -691,6 +782,19 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80898, "fdo80898.docx")
a1bd173
                 "/ContentType:Types/ContentType:Override[@ContentType='application/msword']",
a1bd173
                 "PartName",
a1bd173
                 "/word/embeddings/oleObject1.doc");
a1bd173
+
a1bd173
+    // check the rels too
a1bd173
+    xmlDocPtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
a1bd173
+    assertXPath(pXmlDocRels,
a1bd173
+        "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.doc']",
a1bd173
+        "Type",
a1bd173
+        "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
a1bd173
+    // check the content too
a1bd173
+    xmlDocPtr pXmlDocContent = parseExport("word/document.xml");
a1bd173
+    assertXPath(pXmlDocContent,
a1bd173
+        "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject",
a1bd173
+        "ProgID",
a1bd173
+        "Word.Document.8");
a1bd173
 }
a1bd173
 
a1bd173
 DECLARE_OOXMLEXPORT_TEST(testTableCellWithDirectFormatting, "fdo80800.docx")
a1bd173
-- 
a1bd173
2.5.0
a1bd173