sd/source/core/drawdoc4.cxx | 3 + sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 13 +----- sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 14 ++---- sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 62 ++++++++--------------------- 4 files changed, 31 insertions(+), 61 deletions(-)
New commits: commit c59c1a9170e9510a18a084cd90289b6a7d8b87e4 Author: Kemal Ayhan <kemalayhan...@gmail.com> AuthorDate: Fri Jan 10 21:56:17 2020 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Jan 18 17:21:04 2020 +0100 tdf#129423: Make export tests export-only where applicable Change-Id: I90e9c8e199ae0e7d6e8f63b3f425847b3f5779d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86574 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index a7803e1aad75..52484bffa02f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -215,11 +215,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120412_400PercentSubscript, "tdf120412_400Percen CPPUNIT_ASSERT_DOUBLES_EQUAL( -400.f, getProperty<float>(getRun(xPara, 2, "Subscript"), "CharEscapement"), 0); } -DECLARE_OOXMLEXPORT_TEST(testFontEsc, "test_tdf120412.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFontEsc, "test_tdf120412.docx") { xmlDocPtr pXmlDoc =parseExport("word/document.xml"); - if (!pXmlDoc) - return; // don't lose the run with superscript formatting assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2); // Superscript should be raised by 100% (11pt). Was 110% (12pt) @@ -372,13 +370,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx") CPPUNIT_ASSERT(aTocString.startsWithIgnoreAsciiCase( "15" ) ); } -DECLARE_OOXMLEXPORT_TEST(testFdo73389,"fdo73389.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73389,"fdo73389.docx") { // The width of the inner table was too large. The first fix still converted // the "auto" table width to a fixed one. The recent fix uses variable width. xmlDocPtr pXmlDoc = parseExport(); - if (!pXmlDoc) - return; + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","type","pct"); assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","w","5000"); } @@ -595,12 +592,10 @@ DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx") CPPUNIT_ASSERT( leftA3.toInt32() > leftB2.toInt32()); } -DECLARE_OOXMLEXPORT_TEST(testTdf116194, "tdf116194.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf116194, "tdf116194.docx") { // The problem was that the importer lost consecutive tables with w:gridBefore xmlDocPtr pXmlDoc = parseExport(); - if (!pXmlDoc) - return; assertXPath(pXmlDoc, "/w:document/w:body/w:tbl", 2); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 908faf14e22a..a317e9e977c5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -855,11 +855,9 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx") CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4); } -DECLARE_OOXMLEXPORT_TEST(testTdf73547, "tdf73547-dash.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf73547, "tdf73547-dash.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; double nD = getXPath(pXmlDoc, "//a:custDash/a:ds[1]", "d").toDouble(); CPPUNIT_ASSERT_DOUBLES_EQUAL(105000.0, nD, 5000.0); // was 100000 double nSp = getXPath(pXmlDoc, "//a:custDash/a:ds[1]", "sp").toDouble(); @@ -911,11 +909,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx") CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue()); } -DECLARE_OOXMLEXPORT_TEST(testTdf99631, "tdf99631.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99631, "tdf99631.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + assertXPath(pXmlDoc, "//w:object", 2); assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 2); // first XSLX OLE object (1:1 scale) @@ -926,11 +923,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99631, "tdf99631.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]", "dyaOrig", "768"); } -DECLARE_OOXMLEXPORT_TEST(testTdf122563, "tdf122563.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf122563, "tdf122563.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 1); // Size of the embedded OLE spreadsheet was the bad "width:28.35pt;height:28.35pt" assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object/v:shape", "style", diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 81687683ec63..c9b1f4f3e991 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -452,12 +452,11 @@ DECLARE_OOXMLEXPORT_TEST(testParaAdjustDistribute, "para-adjust-distribute.docx" getProperty<sal_Int16>(getParagraph(2), "ParaLastLineAdjust"))); } -DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testInputListExport, "tdf122186_input_list.odt") { // We need to make sure we don't export the text itself next to the input list field xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 5); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:t", 0); } @@ -472,12 +471,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116371, "tdf116371.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(24188), frameRect.Width); } -DECLARE_OOXMLEXPORT_TEST(testFrameSizeExport, "floating-tables-anchor.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFrameSizeExport, "floating-tables-anchor.docx") { // Make sure the table width is 4000 xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW", "w", "4000"); } @@ -505,11 +502,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx") "Er horte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer wurde ihm "); } -DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTextInput, "textinput.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + // test the exported DOCX @@ -597,11 +593,9 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx") } //tdf#125298: fix charlimit restrictions in bookmarknames and field references if they contain non-ascii characters -DECLARE_OOXMLEXPORT_TEST(testTdf125298, "tdf125298_crossreflink_nonascii_charlimit.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125298, "tdf125298_crossreflink_nonascii_charlimit.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; // check whether test file keeps non-ascii values or not OUString bookmarkName1 = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart[1]", "name"); CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\u00e1rv\u00edzt\u0171r\u0151_t\u00fck\u00f6rf\u00far\u00f3g\u00e9p"), bookmarkName1); @@ -709,11 +703,10 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBtlrFrame, "btlr-frame.odt") aGeometry["TextPreRotateAngle"].get<sal_Int32>()); } -DECLARE_OOXMLEXPORT_TEST(testTdf125518, "tdf125518.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125518, "tdf125518.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + // First diagram is anchored OUString anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:drawing/wp:anchor/wp:docPr", "name"); @@ -860,11 +853,10 @@ DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx") CPPUNIT_ASSERT_EQUAL(OUString(u"őőőőőőőőőőőűűűű"), getProperty<OUString>(xPropertySet, "Label")); } -DECLARE_OOXMLEXPORT_TEST(testTdf127116, "tdf127116.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127116, "tdf127116.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink", "anchor"); @@ -880,11 +872,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127339, "tdf127339.docx") assertXPathNoAttribute(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='#bookmark']", "TargetMode"); } -DECLARE_OOXMLEXPORT_TEST(testTdf127362, "tdf127362.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127362, "tdf127362.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; xmlDocPtr pXmlRels = parseExport("word/_rels/document.xml.rels"); if (!pXmlRels) @@ -895,66 +885,55 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127362, "tdf127362.odt") CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf127605, "tdf127605.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127605, "tdf127605.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf127732, "internal_hyperlink_frame.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127732, "internal_hyperlink_frame.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf127733, "internal_hyperlink_ole.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127733, "internal_hyperlink_ole.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; + OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf127734, "internal_hyperlink_region.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127734, "internal_hyperlink_region.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf127735, "internal_hyperlink_table.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127735, "internal_hyperlink_table.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:bookmarkStart", "name"); OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink", "anchor"); CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName); } -DECLARE_OOXMLEXPORT_TEST(testTdf123628, "tdf123628.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123628, "tdf123628.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; xmlDocPtr pXmlStyles = parseExport("word/styles.xml"); if (!pXmlStyles) @@ -983,12 +962,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127925, "tdf127925.odt") assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='VisitedInternetLink']/w:name", "val", "FollowedHyperlink"); } -DECLARE_OOXMLEXPORT_TEST(testTdf127579, "tdf127579.odt") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127579, "tdf127579.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); - if (!pXmlDoc) - return; - assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", "InternetLink"); } commit 4efe996eb593387e0a5e7a58f4e29b32bdf92098 Author: Shivam Kumar Singh <shivamhere...@gmail.com> AuthorDate: Fri Jan 17 00:49:30 2020 +0530 Commit: Regina Henschel <rb.hensc...@t-online.de> CommitDate: Sat Jan 18 17:20:54 2020 +0100 tdf#123841 unfilled rectangles would make filled rectangles The error was basically in drawdoc4.cxx where the "Object without Filling" was left empty. I added the command to Fill the object with FillStyle_NONE Change-Id: I68e9dbc7223533319c1279be68bfaab9eb2dd143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86944 Reviewed-by: Regina Henschel <rb.hensc...@t-online.de> Tested-by: Regina Henschel <rb.hensc...@t-online.de> diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 26f0142b6292..59687f189450 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -255,6 +255,9 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL ); + pISet = &pSheet->GetItemSet(); + + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); } // Default > Object no fill no line { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits