tdf#129423: Make export tests export-only where applicable
Change-Id: Iff36608e3f1d643175e47a96333df4cb80a88064
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87209
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index abadb97..05466e3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -768,15 +768,13 @@
CPPUNIT_ASSERT_EQUAL(OUString("https://bugs.documentfoundation.org/show_bug.cgi?id=104707"), aURL);
}
DECLARE_OOXMLEXPORT_TEST(testOLEObjectinHeader, "2129393649.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOLEObjectinHeader, "2129393649.docx")
{
// fdo#76015 : Document contains oleobject in header xml.
// Problem was relationship entry for oleobject from header was
// exported into document.xml.rels file because of this rels file
// for headers were missing from document/word/rels.
xmlDocPtr pXmlDoc = parseExport("word/_rels/header1.xml.rels");
if(!pXmlDoc)
return;
assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship[1]","Id","rId1");
@@ -910,12 +908,10 @@
assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]", 1);
}
DECLARE_OOXMLEXPORT_TEST(testFDO78292, "FDO78292.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78292, "FDO78292.docx")
{
//text node is a leaf node, it should not have any children
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if(!pXmlDoc)
return;
assertXPath(pXmlDoc,"/w:document/w:body/w:p[14]/w:sdt[3]/w:sdtPr[1]/w:text/w14:checked",0);
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 9cc5e69..b59a14a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -109,22 +109,18 @@
assertXPath (pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val", "");
}
DECLARE_OOXMLEXPORT_TEST(testNoDuplicateAttributeExport, "duplicate-east-asia.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testNoDuplicateAttributeExport, "duplicate-east-asia.odt")
{
// File asserting while saving in LO.
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79008, "fdo79008.docx")
{
/* File crashing while saving in LO.
* Check if document.xml file is created after fix
*/
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAuthorPropertySdt, "author-property.docx")
@@ -239,18 +235,14 @@
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:vMerge", "val", "continue");
}
DECLARE_OOXMLEXPORT_TEST(testOldComplexMergeTableInTable, "ooo96040-2.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeTableInTable, "ooo96040-2.odt")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_TEST(testHyperlinkContainingPlaceholderField, "hyperlink-field.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlinkContainingPlaceholderField, "hyperlink-field.odt")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTablePreferredWidth, "tablePreferredWidth.docx")
@@ -505,14 +497,12 @@
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:pgSz", "orient", "landscape" );
}
DECLARE_OOXMLEXPORT_TEST(testfdo79822, "fdo79822.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79822, "fdo79822.docx")
{
/* File getting crash while saving in LO.
* The Docx contain smartart and the file was created in ms word 2007
*/
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO79915, "fdo79915.docx")