diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-12-22 16:44:08 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-12-24 01:51:15 +0100 |
commit | 69bdf09dea60fe590032ed18d59b7dab806a6b0c (patch) | |
tree | 901e19fca236b64f8805512571f7689d7ce2b12e /sc/qa/unit/subsequent_export-test.cxx | |
parent | tdf#135061: sw_uiwriter3: Add unittest (diff) | |
download | core-69bdf09dea60fe590032ed18d59b7dab806a6b0c.tar.gz core-69bdf09dea60fe590032ed18d59b7dab806a6b0c.zip |
tdf#145057 Fix saving color filter when multiple data ranges in sheet
When mutliple data ranges existed in one sheet, only the first one was
considered when exporting color filters.
Consider all of them, as any could hold a color filter.
Change-Id: I13ae2018057eef7ef24fc8298c814a93df24f74b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127337
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 382e2b9d02dc..f54cb966bacc 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -144,6 +144,7 @@ public: void testFormulaReferenceXLS(); void testSheetProtectionXLSX(); + void testTdf145057(); void testSheetProtectionXLSB(); void testCellBordersXLS(); @@ -296,6 +297,7 @@ public: CPPUNIT_TEST(testFormulaReferenceXLS); CPPUNIT_TEST(testSheetProtectionXLSX); + CPPUNIT_TEST(testTdf145057); CPPUNIT_TEST(testSheetProtectionXLSB); CPPUNIT_TEST(testCellBordersXLS); CPPUNIT_TEST(testCellBordersXLSX); @@ -2261,6 +2263,17 @@ void ScExportTest::testSheetProtectionXLSX() xDocSh->DoClose(); } +void ScExportTest::testTdf145057() +{ + ScDocShellRef xDocSh = loadDoc(u"tdf145057.", FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX); + xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, + "xl/tables/table1.xml", FORMAT_XLSX); + CPPUNIT_ASSERT(pDoc); + assertXPath(pDoc, "//x:colorFilter", "dxfId", "1"); +} + void ScExportTest::testSheetProtectionXLSB() { ScDocShellRef xShell = loadDoc("tdf108017_calcProtection.", FORMAT_XLSB); |