sc/qa/unit/data/ods/tdf85553.ods       |binary
 sc/qa/unit/subsequent_export_test2.cxx |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 0225f1dd04e49191bbf1fa787bb15d1617ab996c
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Apr 4 16:50:43 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Apr 4 20:19:18 2022 +0200

    tdf#85553: subsequent_export_test2: Add unittest
    
    Change-Id: I70f436ec26ae5127869be971a09d8ca119906009
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132522
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf85553.ods b/sc/qa/unit/data/ods/tdf85553.ods
new file mode 100644
index 000000000000..37cebbd42fe0
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf85553.ods differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index ee3c14117307..b0ffb138c51f 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -139,6 +139,7 @@ public:
 
     void testXltxExport();
     void testRotatedImageODS();
+    void testTdf85553();
     void testTdf128976();
     void testTdf143979();
     void testTdf120502();
@@ -259,6 +260,7 @@ public:
 
     CPPUNIT_TEST(testXltxExport);
     CPPUNIT_TEST(testRotatedImageODS);
+    CPPUNIT_TEST(testTdf85553);
     CPPUNIT_TEST(testTdf128976);
     CPPUNIT_TEST(testTdf143979);
     CPPUNIT_TEST(testTdf120502);
@@ -1765,6 +1767,25 @@ void ScExportTest2::testRotatedImageODS()
     xDocSh->DoClose();
 }
 
+void ScExportTest2::testTdf85553()
+{
+    ScDocShellRef xShell = loadDoc(u"tdf85553.", FORMAT_ODS);
+    CPPUNIT_ASSERT(xShell.is());
+
+    ScDocShellRef xDocSh = saveAndReload(*xShell, FORMAT_XLS);
+    xShell->DoClose();
+    CPPUNIT_ASSERT(xDocSh.is());
+
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 4.5
+    // - Actual  : #N/A
+    CPPUNIT_ASSERT_EQUAL(OUString("4.5"), rDoc.GetString(ScAddress(2, 2, 0)));
+
+    xDocSh->DoClose();
+}
+
 void ScExportTest2::testTdf128976()
 {
     ScDocShellRef xShell = loadDoc(u"tdf128976.", FORMAT_XLS);

Reply via email to