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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 8 12:39:38 UTC 2020


 sc/qa/unit/data/xlsx/tdf133595.xlsx   |binary
 sc/qa/unit/subsequent_export-test.cxx |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit 1a9cb68b30d337c177d55b2440b8c32dd923457e
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jun 8 13:03:18 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 8 14:38:57 2020 +0200

    tdf#133595: sc: Add unittest
    
    Change-Id: I887480d17d9863d4e0a9e4a200651a49bff484b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95796
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf133595.xlsx b/sc/qa/unit/data/xlsx/tdf133595.xlsx
new file mode 100644
index 000000000000..322e038d3922
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf133595.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 4719a97cf241..9e685e502093 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -222,6 +222,7 @@ public:
     void testOpenDocumentAsReadOnly();
     void testKeepSettingsOfBlankRows();
 
+    void testTdf133595();
     void testTdf105272();
     void testTdf118990();
     void testTdf121612();
@@ -368,6 +369,7 @@ public:
     CPPUNIT_TEST(testOpenDocumentAsReadOnly);
     CPPUNIT_TEST(testKeepSettingsOfBlankRows);
 
+    CPPUNIT_TEST(testTdf133595);
     CPPUNIT_TEST(testTdf105272);
     CPPUNIT_TEST(testTdf118990);
     CPPUNIT_TEST(testTdf121612);
@@ -4541,6 +4543,21 @@ void ScExportTest::testKeepSettingsOfBlankRows()
     xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf133595()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf133595.", FORMAT_XLSX);
+    CPPUNIT_ASSERT(xDocSh.is());
+
+    std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+    xmlDocUniquePtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+    CPPUNIT_ASSERT(pSheet);
+
+    // without the fix in place, mc:AlternateContent would have been added to sheet1
+    assertXPath(pSheet, "/x:worksheet/mc:AlternateContent", 0);
+
+    xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf105272()
 {
     ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX);


More information about the Libreoffice-commits mailing list