sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |  146 ++++++--------------------
 1 file changed, 36 insertions(+), 110 deletions(-)

New commits:
commit 5c907e0718bda1cc8631eacabc1b41e4d9617332
Author:     Onur Yilmaz <onuryilmaz0...@gmail.com>
AuthorDate: Thu Dec 26 00:04:48 2019 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Dec 26 07:00:47 2019 +0100

    tdf#129423: Make export tests export-only where applicable
    
    Change-Id: I873b43450e82de3a908fa7726902abd09fee22a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85816
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index d20d8a90938f..9b08dae1b844 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -57,13 +57,11 @@ DECLARE_OOXMLEXPORT_TEST(testN789482, "n789482.docx")
     getRun(xParagraph, 5, " After.");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testBnc834035, "bnc834035.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBnc834035, "bnc834035.odt")
 {
     // Illustration index had wrong hyperlinks: anchor was using Writer's
     // <seqname>!<index>|sequence syntax, not a bookmark name.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
     // This was Figure!1|sequence.
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:hyperlink", "anchor", 
"_Toc363553908");
 }
@@ -75,41 +73,35 @@ DECLARE_OOXMLEXPORT_TEST(testCp1000015, "cp1000015.odt")
     getParagraph(2, "http://www.google.com/";);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testHyperlineIsEnd, "hyperlink.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlineIsEnd, "hyperlink.docx")
 {
     // Check  that the document.xml contents all the tag properly closed.
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     // If  document.xml miss any ending tag then parseExport() returns NULL 
which fail the test case.
     CPPUNIT_ASSERT(pXmlDoc) ;
     // Check hyperlink is properly open.
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:hyperlink",1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69649, "fdo69649.docx")
 {
     // The DOCX containing the Table of Contents was not exported with correct 
page nos
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[21]/w:hyperlink/w:r[5]/w:t", "15");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFieldFlagO,"TOC_field_f.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagO,"TOC_field_f.docx")
 {
     // This test case is to verify \o flag should come once.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
     // not to insert an empty paragraph before TOC.
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\f \\o \"1-3\" \\u \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTOCFlag_f, "toc_doc.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_f, "toc_doc.docx")
 {
     // Export logic for all TOC field flags was enclosed inside
     // if( SwTOXElement::Mark & pTOX->GetCreateType() ) in ww8atr.cxx which 
gets true for \f,
@@ -118,135 +110,109 @@ DECLARE_OOXMLEXPORT_TEST(testTOCFlag_f, "toc_doc.docx")
     // This test case is to verify even if there is no \f flag in original 
doc, \h flag is getting
     // preserved after RT.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
     // not to insert an empty paragraph before TOC.
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\o \"1-3\" \\u \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPreserveZfield,"preserve_Z_field_TOC.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveZfield,"preserve_Z_field_TOC.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\f \\o \"1-3\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPreserveWfieldTOC, "PreserveWfieldTOC.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveWfieldTOC, 
"PreserveWfieldTOC.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\w 
\\f \\o \"1-3\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFieldFlagB,"TOC_field_b.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagB,"TOC_field_b.docx")
 {
     // This test case is to verify \b flag.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
     // not to insert an empty paragraph before TOC.
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\b 
\"bookmark111\" \\o \"1-9\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveXfieldTOC, 
"PreserveXfieldTOC.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\x \\f 
\\o \"1-3\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO77715,"FDO77715.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77715,"FDO77715.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[2]/w:instrText[1]", " TOC \\c ");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
 {
     // DOCX containing TOC should preserve code field '\u'.
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
     // not to insert an empty paragraph before TOC.
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\o 
\"1-9\" \\u \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo73596_RunInStyle,"fdo73596_RunInStyle.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_RunInStyle,"fdo73596_RunInStyle.docx")
 {
     // INDEX should be preserved.
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:r[2]/w:instrText[1]", " INDEX \\e \"");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo73596_AlphaSeparator,"fdo73596_AlphaSeparator.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_AlphaSeparator,"fdo73596_AlphaSeparator.docx")
 {
     // INDEX flag \h "A" should be preserved.
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:r[2]/w:instrText[1]", " INDEX \\h \"A\" \\e \"");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testCaption1, "EquationAsScientificNumbering.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption1, 
"EquationAsScientificNumbering.docx")
 {
     // fdo#74431 : This test case is to verify the Captions are coming properly
     // earlier it was coming as "SEQ "scientific"\*ROMAN now it is SEQ 
scientific\* ROMAN"
 
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText", " 
SEQ scientific \\* ROMAN ");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testCaption2, "EquationWithAboveAndBelowCaption.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption2, 
"EquationWithAboveAndBelowCaption.docx")
 {
     // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag 
was not preserved during Roundtrip
     // This test case is to verify that PAGEREF tag is coming with proper 
values inside <hyperlink> tag.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[5]/w:r[3]/w:instrText", " SEQ Equation \\* ARABIC ");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testCaption3, "FigureAsLabelPicture.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption3, "FigureAsLabelPicture.docx")
 {
     // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag 
was not preserved during Roundtrip
     // This test case is to verify that PAGEREF tag is coming with proper 
values inside <hyperlink> tag.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:r[3]/w:instrText", " SEQ picture \\* ARABIC ");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testCaption4, "TableWithAboveCaptions.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption4, 
"TableWithAboveCaptions.docx")
 {
     // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag 
was not preserved during Roundtrip
     // This test case is to verify that PAGEREF tag is coming with proper 
values inside <hyperlink> tag.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:r[3]/w:instrText", " SEQ Table \\* ARABIC ");
 }
@@ -264,7 +230,7 @@ 
DECLARE_OOXMLEXPORT_TEST(testFooterContainHyperlink,"footer-contain-hyperlink.do
     
assertXPath(pXmlRels,"/rels:Relationships/rels:Relationship","Target","http://www.google.com/";);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_MultipleColumns,"alphabeticalIndex_MultipleColumns.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlphabeticalIndex_MultipleColumns,"alphabeticalIndex_MultipleColumns.docx")
 {
     // Bug :: fdo#73596
     /*
@@ -275,8 +241,6 @@ 
DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_MultipleColumns,"alphabeticalInde
      * MS Office adds section breaks before and after the Index.
      */
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[2]/w:instrText", " INDEX \\c \"4\"\\e \"");
 
@@ -287,18 +251,16 @@ 
DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_MultipleColumns,"alphabeticalInde
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:cols/w:col[1]","space","720");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageref, "testPageref.docx")
 {
     // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag 
was not preserved during Roundtrip
     // This test case is to verify that PAGEREF tag is coming with proper 
values inside <hyperlink> tag.
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink/w:r[3]/w:instrText", 
"PAGEREF _Toc355095261 \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_AutoColumn.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_AutoColumn.docx")
 {
     // Bug :: fdo#73596
     /*
@@ -307,8 +269,6 @@ 
DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_Aut
      * before and after the Index Context
      */
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:r[2]/w:instrText", " INDEX \\e \"");
 
@@ -316,35 +276,29 @@ 
DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_Aut
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr", 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testIndexFieldFlagF,"IndexFieldFlagF.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testIndexFieldFlagF,"IndexFieldFlagF.docx")
 {
     // This test case is to verify the Index field flag '\f' with some
     // Specific Entry Type (ex. "Syn" in our case).
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     // We check the Index field flag '\f'.
     assertXPathContent(pXmlDoc, 
"/w:document[1]/w:body[1]/w:p[4]/w:r[2]/w:instrText[1]", " INDEX \\c \"2\"\\f 
\"Syn\" \" \\e \"");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testBibliography,"FDO75133.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBibliography,"FDO75133.docx")
 {
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
 
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " BIBLIOGRAPHY 
");
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartGallery", "val", 
"Bibliographies");
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartUnique", 1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testGenericTextField, "Unsupportedtextfields.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testGenericTextField, 
"Unsupportedtextfields.docx")
 {
     // fdo#75158 : This test case is to verify the unsupported textfields are 
exported properly.
 
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
     xmlXPathObjectPtr pXmlObj = 
getXPathNode(pXmlDoc,"/w:document/w:body/w:p[2]/w:r[2]/w:instrText");
     xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
     xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
@@ -362,62 +316,50 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(test_FieldType, 
"99_Fields.docx")
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[4]/w:sdt/w:sdtContent/w:r[2]/w:instrText");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testCitation,"FDO74775.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCitation,"FDO74775.docx")
 {
     xmlDocPtr pXmlDoc = parseExport();
-    if (!pXmlDoc)
-        return;
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[2]/w:instrText", " CITATION 
Kra06 \\l 1033 ");
     assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[4]/w:t", "(Kramer & Chen, 
2006)");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testHyperLinkTagEnded, "fdo76316.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperLinkTagEnded, "fdo76316.docx")
 {
     /* XML tag <w:hyperlink> was not getting closed when its inside another
      * <w:hyperlink> tag.
      */
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 
-    if (!pXmlDoc) return;
-
     CPPUNIT_ASSERT(pXmlDoc);
     assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[2]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[7]/w:tc[1]/w:tbl[1]/w:tr[2]/w:tc[6]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:hyperlink[1]",1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO76163 , "fdo76163.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76163 , "fdo76163.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     //docx file after RT is getting corrupted.
     assertXPath ( pXmlDoc, 
"/w:document/w:body/w:p[2]/w:hyperlink/w:r[10]/w:fldChar", "fldCharType", "end" 
);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO78659, "fdo78659.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78659, "fdo78659.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[3]/w:fldChar[1]",
 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO78654 , "fdo78654.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78654 , "fdo78654.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     // In case of two "Hyperlink" tags in one paragraph and one of them
     // contains "PAGEREF" field then field end tag was missing from hyperlink.
     assertXPath ( pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink[3]/w:r[5]/w:fldChar", 
"fldCharType", "end" );
 }
 
 
-DECLARE_OOXMLEXPORT_TEST(testfdo78599,"fdo78599.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78599,"fdo78599.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     //docx file after RT is getting corrupted.
     assertXPath ( pXmlDoc, 
"/w:document/w:body/w:p[1]/w:hyperlink/w:r[6]/w:fldChar", "fldCharType", "end" 
);
 
@@ -427,34 +369,26 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78599,"fdo78599.docx")
         assertXPath(pSettingsXml, "/w:settings/w:autoHyphenation");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo78886, "fdo78886.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78886, "fdo78886.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:tbl[2]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[2]/w:fldChar[1]",
 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo78910, "fdo78910.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo78910, "fdo78910.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 
-    if (!pXmlDoc)
-        return;
-
     // This is to ensure that the fld starts and ends inside a hyperlink...
     assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[1]/w:fldChar", "fldCharType", 
"begin" );
     assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[5]/w:fldChar", "fldCharType", 
"end" );
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO78590, "FDO78590.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78590, "FDO78590.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 
-    if (!pXmlDoc)
-        return;
-
     // This is to ensure that the fld starts and ends inside a hyperlink...
     assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "w", 
"9851" );
     assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "h", 
"1669" );
@@ -555,20 +489,16 @@ DECLARE_OOXMLEXPORT_TEST(testEditTime, "fdo81341.docx")
     }
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo81945, "fdo81945.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo81945, "fdo81945.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
 
     assertXPath(pXmlDoc, "//w:sdt//w:sdt", 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo82123, "fdo82123.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82123, "fdo82123.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-       return;
 
     // make sure there is only one run inside first SDT after RT as in the 
Original file.
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:p/w:sdt[1]/w:sdtContent/w:r",1);
@@ -583,20 +513,16 @@ DECLARE_OOXMLEXPORT_TEST(testSdtBeforeField, 
"sdt-before-field.docx")
     }
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo81946, "fdo81946.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo81946, "fdo81946.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
-    if (!pXmlDoc)
-       return;
     // make sure AlternateContent should not present in sdt
     assertXPath(pXmlDoc, 
"/w:hdr[1]/w:p[1]/w:sdt[1]/w:sdtContent[1]/w:r[2]/mc:AlternateContent[1]",0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo82492, "fdo82492.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82492, "fdo82492.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-       return;
 
     // make sure there is only one run inside first SDT after RT as in the 
Original file.
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent/w:r",1);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to