sc/qa/unit/data/xls/tdf120177.xls |binary sc/qa/unit/subsequent_export_test4.cxx | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+)
New commits: commit 332ac45c73952af7e2c2a868fc03e17d96a7de2c Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 9 10:31:28 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 9 11:55:17 2023 +0200 tdf#120177: sc_subsequent_export_test4: Add unittest Change-Id: I71846e6e80674dc61126069d13ddd431560b071b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151563 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/data/xls/tdf120177.xls b/sc/qa/unit/data/xls/tdf120177.xls new file mode 100644 index 000000000000..b843060f6f71 Binary files /dev/null and b/sc/qa/unit/data/xls/tdf120177.xls differ diff --git a/sc/qa/unit/subsequent_export_test4.cxx b/sc/qa/unit/subsequent_export_test4.cxx index 233195b2ebde..46ea2547eadc 100644 --- a/sc/qa/unit/subsequent_export_test4.cxx +++ b/sc/qa/unit/subsequent_export_test4.cxx @@ -132,6 +132,38 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testRotatedImageODS) CPPUNIT_ASSERT(sY.endsWith("mm")); } +CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf120177) +{ + createScDoc("xls/tdf120177.xls"); + + // Error: unexpected attribute "form:input-required" + skipValidation(); + + save("calc8"); + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + CPPUNIT_ASSERT(pXmlDoc); + + // Without the fix in place, this test would have failed with + // no attribute 'value' exist + assertXPath(pXmlDoc, + "/office:document-content/office:body/office:spreadsheet/table:table/office:forms/" + "form:form/form:radio[1]", + "value", "1"); + assertXPath(pXmlDoc, + "/office:document-content/office:body/office:spreadsheet/table:table/office:forms/" + "form:form/form:radio[2]", + "value", "2"); + const OUString sGroupName1 = getXPath(pXmlDoc, + "/office:document-content/office:body/office:spreadsheet/" + "table:table/office:forms/form:form/form:radio[1]", + "group-name"); + const OUString sGroupName2 = getXPath(pXmlDoc, + "/office:document-content/office:body/office:spreadsheet/" + "table:table/office:forms/form:form/form:radio[2]", + "group-name"); + CPPUNIT_ASSERT_EQUAL(sGroupName1, sGroupName2); +} + CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf85553) { createScDoc("ods/tdf85553.ods");