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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue May 19 13:14:18 UTC 2020


 sw/qa/extras/ooxmlexport/data/tdf100581.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx   |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 1a10f17768860b3871038b610caf00c8c9d0e967
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue May 19 13:37:11 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue May 19 15:13:34 2020 +0200

    tdf#100581: sw: Add unittest
    
    Change-Id: Ibeb7ce063cf009b54337a44061ae186172011c99
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94496
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf100581.odt b/sw/qa/extras/ooxmlexport/data/tdf100581.odt
new file mode 100644
index 000000000000..f098385e3c51
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf100581.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 5d6e3338b99d..3962b9ebeceb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1275,6 +1275,27 @@ DECLARE_OOXMLEXPORT_TEST(testSpacingGroupShapeText, "tdf131775_SpacingGroupShape
         "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:spacing", "val", "71");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf100581, "tdf100581.odt")
+{
+    xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+    if (!pXmlDocument)
+        return;
+
+    assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+        "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:pPr/w:pStyle", "val", "FrameContents");
+
+    // w:sectPr is not exported
+    assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+        "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:pPr/w:sectPr", 0);
+
+    assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"
+        "/v:textbox/w:txbxContent/w:p[1]/w:pPr/w:pStyle", "val", "FrameContents");
+
+    // w:sectPr is not exported
+    assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"
+        "/v:textbox/w:txbxContent/w:p[1]/w:pPr/w:sectPr", 0);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf112287, "tdf112287.docx")
 {
     // tdf#131775: Check if correct spacing.


More information about the Libreoffice-commits mailing list