summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNikhil Walvekar <nikhil.walvekar@synerzip.com>2013-11-19 14:18:26 +0530
committerCaolán McNamara <caolanm@redhat.com>2013-11-20 05:28:01 -0600
commitc3702eb165ce0f0841ef1a166ae361e9616c77fb (patch)
treedd33d4a71e941a17236359a865ea3aa531a7fa05 /sw
parentae2a19fa846f533e6ec7d1bb9839a6a709862872 (diff)
DOCX: Enhacing unit test para auto spacing
Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I589b76d0229a3dc4b5822e14399f7dbd9e7a31f8 Reviewed-on: https://gerrit.libreoffice.org/6718 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-auto-spacing.docxbin28793 -> 30380 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx9
2 files changed, 7 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx
index c7604bf7672a..3cc8bd6fbd0a 100644
--- a/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx
+++ b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 019aeb1b00d7..5390ed5987ec 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1909,8 +1909,13 @@ DECLARE_OOXMLEXPORT_TEST(testParaAutoSpacing, "para-auto-spacing.docx")
xmlDocPtr pXmlDoc = parseExport();
if (!pXmlDoc)
return;
- CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:spacing", "beforeAutospacing").match("1"));
- CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:spacing", "afterAutospacing").match("1"));
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing", "beforeAutospacing","1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing", "afterAutospacing","1");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing", "beforeAutospacing","");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing", "afterAutospacing","");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing", "before","400");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing", "after","400");
}
DECLARE_OOXMLEXPORT_TEST(testGIFImageCrop, "test_GIF_ImageCrop.docx")