tdf#129423 sw: export-only tests, part 7
Convert some unit tests from "export" tests to "export only".
Remove nullptr checks on parseExport's return value to make
the tests fail if parsing fails for any reason.
Change-Id: I11307932b216d0bfe60a3ef126bbea13046fa0a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101718
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 2596c8d..76ccf31 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -489,14 +489,12 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
CPPUNIT_ASSERT_EQUAL(OUString("RenderedShapes"), nValue); // Rendered bitmap has the proper name
}
DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
{
// Check no empty font name is exported
// This test does not fail, if the document contains a font with empty name.
xmlDocUniquePtr pXmlFontTable = parseExport("word/fontTable.xml");
if (!pXmlFontTable)
return;
xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlFontTable, "/w:fonts/w:font");
xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
sal_Int32 length = xmlXPathNodeSetGetLength(pXmlNodes);
@@ -1109,14 +1107,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testArrowMarker, "tdf123346_ArrowMarker.docx
"/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:tailEnd", "type", "arrow");
}
DECLARE_OOXMLEXPORT_TEST(testShapeLineWidth, "tdf92526_ShapeLineWidth.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeLineWidth, "tdf92526_ShapeLineWidth.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#92526: Make sure that line with stays 0.
xmlDocUniquePtr pXml = parseExport("word/document.xml");
if (!pXml)
return;
// "w" attribute was not exported.
assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing"