diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-04-28 16:25:42 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-05-04 13:02:27 +0200 |
commit | e2bdd31c0231444f1ba1463bffb5656c230c3073 (patch) | |
tree | 335cdc78b2af1ed05e0558cee1844f1f52deb5f9 /sc/qa/unit/subsequent_export-test.cxx | |
parent | e23436d347bb44a720932a2e7badc56147f5b167 (diff) |
tdf#76258 Add ODF import/export
XML looks like:
<table:filter-condition table:field-number="0" loext:data-type="background-color" table:value="#ffd7d7" table:operator="="/>
<table:filter-condition table:field-number="1" loext:data-type="text-color" table:value="#3465a4" table:operator="="/>
Change-Id: Idcddf0ce436da69567e5a7e9dfd7d796dc872586
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114812
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index b25aae6c4ab4..01cf0a236a24 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -218,6 +218,7 @@ public: void testTdf95640_ods_to_xlsx_with_standard_list(); void testTdf95640_xlsx_to_xlsx(); void testDateAutofilterXLSX(); + void testAutofilterColorsODF(); void testRefStringXLSX(); void testRefStringConfigXLSX(); @@ -404,6 +405,7 @@ public: CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list); CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx); CPPUNIT_TEST(testDateAutofilterXLSX); + CPPUNIT_TEST(testAutofilterColorsODF); CPPUNIT_TEST(testRefStringXLSX); CPPUNIT_TEST(testRefStringConfigXLSX); @@ -4611,6 +4613,20 @@ void ScExportTest::testDateAutofilterXLSX() xDocSh->DoClose(); } +void ScExportTest::testAutofilterColorsODF() +{ + ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_ODS); + CPPUNIT_ASSERT(xDocSh.is()); + + xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "content.xml", FORMAT_ODS); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "//table:filter/table:filter-and/table:filter-condition[1]", "value", "#e8f2a1"); + assertXPath(pDoc, "//table:filter/table:filter-and/table:filter-condition[1][@loext:data-type='background-color']"); + assertXPath(pDoc, "//table:filter/table:filter-and/table:filter-condition[2]", "value", "#3465a4"); + assertXPath(pDoc, "//table:filter/table:filter-and/table:filter-condition[2][@loext:data-type='text-color']"); +} + void ScExportTest::testTdf88657ODS() { ScDocShellRef xDocSh = loadDoc(u"tdf88657.", FORMAT_ODS); |