diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-08 12:55:23 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-08 15:51:25 +0200 |
commit | 95dbfd517240666e5b9a9fd7ac1d47d799235a62 (patch) | |
tree | d6a96bd0bde7237626cc38e0c61ad407f6fdfbe2 | |
parent | ab751b456d334464b01ae6a6b25ebfd1f8e2fc91 (diff) |
tdf#122331: Add unittest
Change-Id: I5c104f225b0d3fd060c36db6b3cef34f46534c61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91906
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/unit/data/ods/tdf122331.ods | bin | 0 -> 17896 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf122331.ods b/sc/qa/unit/data/ods/tdf122331.ods Binary files differnew file mode 100644 index 000000000000..f32b4124d0ae --- /dev/null +++ b/sc/qa/unit/data/ods/tdf122331.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 7ab066dbeb11..28c7d4645ac4 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -234,6 +234,7 @@ public: void testTdf128976(); void testTdf120502(); void testTdf131372(); + void testTdf122331(); void testTdf83779(); CPPUNIT_TEST_SUITE(ScExportTest); @@ -369,6 +370,7 @@ public: CPPUNIT_TEST(testTdf128976); CPPUNIT_TEST(testTdf120502); CPPUNIT_TEST(testTdf131372); + CPPUNIT_TEST(testTdf122331); CPPUNIT_TEST(testTdf83779); CPPUNIT_TEST_SUITE_END(); @@ -4741,6 +4743,23 @@ void ScExportTest::testTdf131372() xShell->DoClose(); } +void ScExportTest::testTdf122331() +{ + ScDocShellRef xShell = loadDoc("tdf122331.", FORMAT_ODS); + CPPUNIT_ASSERT(xShell); + + auto pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + + xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml"); + CPPUNIT_ASSERT(pSheet); + + assertXPath(pSheet, "/x:worksheet/x:sheetPr", "filterMode", "true"); + assertXPath(pSheet, "/x:worksheet/x:autoFilter", "ref", "A1:B761"); + assertXPath(pSheet, "/x:worksheet/x:autoFilter/x:filterColumn", "colId", "1"); + + xShell->DoClose(); +} + void ScExportTest::testTdf83779() { // Roundtripping TRUE/FALSE constants (not functions) must convert them to functions |