[Libreoffice-commits] core.git: sc/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 8 13:52:02 UTC 2020


 sc/qa/unit/data/ods/tdf122331.ods     |binary
 sc/qa/unit/subsequent_export-test.cxx |   19 +++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 95dbfd517240666e5b9a9fd7ac1d47d799235a62
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Apr 8 12:55:23 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Apr 8 15:51:25 2020 +0200

    tdf#122331: Add unittest
    
    Change-Id: I5c104f225b0d3fd060c36db6b3cef34f46534c61
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91906
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf122331.ods b/sc/qa/unit/data/ods/tdf122331.ods
new file mode 100644
index 000000000000..f32b4124d0ae
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf122331.ods differ
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


More information about the Libreoffice-commits mailing list