[Libreoffice-commits] core.git: sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Mon Apr 28 01:15:12 PDT 2014
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 57 ----------------------------
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 57 ++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 57 deletions(-)
New commits:
commit 236c05bb1cdd42d485fde0811cdcf0b843d3cde3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Apr 28 10:13:47 2014 +0200
CppunitTest_sw_ooxmlexport: move sdr-related tests to the dedicated suite
Given that CppunitTest_sw_ooxmlexport and
CppunitTest_sw_ooxmlsdrexport run in parallel, the
CppunitTest_sw_ooxmlsdrexport is way smaller, moving stuff from
CppunitTest_sw_ooxmlexport to CppunitTest_sw_ooxmlsdrexport speeds up a
toplevel 'make' a bit.
Change-Id: I97297404bc3a02b6ca65552670edf16137deb264
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 5dc3bcf..b1bc8c2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2991,15 +2991,6 @@ 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(testNestedAlternateContent, "nestedAlternateContent.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc)
- return;
- // We check alternateContent could not contains alternateContent (i.e. nested alternateContent)
- assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[2]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]",0);
-}
-
DECLARE_OOXMLEXPORT_TEST(testContentTypeXLSM, "fdo76098.docx")
{
xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");
@@ -3067,13 +3058,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76248, "FDO76248.docx")
assertXPath(pXmlDoc, "//a:graphicData[not(*)]", 0);
}
-DECLARE_OOXMLEXPORT_TEST(test76317, "test76317.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc) return;
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]", "prst", "hexagon");
-}
-
DECLARE_OOXMLEXPORT_TEST(testFdo76101, "fdo76101.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
@@ -3093,21 +3077,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76163 , "fdo76163.docx")
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink/w:r[11]/w:fldChar", "fldCharType", "end" );
}
-DECLARE_OOXMLEXPORT_TEST(fdo76591, "fdo76591.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc)
- return;
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "relativeHeight", "3");
-}
-
-DECLARE_OOXMLEXPORT_TEST(test76317_2K10, "test76317_2K10.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc) return;
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]", "name", "adj");
-}
-
DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx")
{
/* Numbered list was not preserve after RT.
@@ -3136,16 +3105,6 @@ DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, "author-property.docx")
// "xmlns:ns0='http://purl.org/dc/elements/1.1/' xmlns:ns1='http://schemas.openxmlformats.org/package/2006/metadata/core-properties'");
}
-DECLARE_OOXMLEXPORT_TEST(testFDO77122, "LinkedTextBoxes.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc)
- return;
- //ensure that the text box links are preserved.
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]", "id", "1");
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:linkedTxbx[1]", "id", "1");
-}
-
DECLARE_OOXMLEXPORT_TEST(testFDO76586, "fdo76586.docx")
{
/*
@@ -3172,22 +3131,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76587 , "fdo76587.docx")
assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "lineRule", "auto");
}
-DECLARE_OOXMLEXPORT_TEST(test76734_2K7, "test76734_2K7.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc)
- return;
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]", "Requires", "wps");
-}
-
-DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx")
-{
- xmlDocPtr pXmlDoc = parseExport("word/document.xml");
- if (!pXmlDoc)
- return;
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1");
-}
-
DECLARE_OOXMLEXPORT_TEST(testNumberedList,"NumberedList.docx")
{
//fdo74150:In document.xml, for pStyle = "NumberedList1", iLvl and numId was not preserved
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 06182df..50ce902 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1113,6 +1113,63 @@ DECLARE_OOXMLEXPORT_TEST(fdo77719, "fdo77719.docx")
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]", "prst", "rect");
}
+DECLARE_OOXMLEXPORT_TEST(testNestedAlternateContent, "nestedAlternateContent.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // We check alternateContent could not contains alternateContent (i.e. nested alternateContent)
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[2]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]",0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(test76317, "test76317.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc) return;
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]", "prst", "hexagon");
+}
+
+DECLARE_OOXMLEXPORT_TEST(fdo76591, "fdo76591.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "relativeHeight", "3");
+}
+
+DECLARE_OOXMLEXPORT_TEST(test76317_2K10, "test76317_2K10.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc) return;
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]", "name", "adj");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFDO77122, "LinkedTextBoxes.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ //ensure that the text box links are preserved.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]", "id", "1");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:linkedTxbx[1]", "id", "1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(test76734_2K7, "test76734_2K7.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]", "Requires", "wps");
+}
+
+DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list