diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-04 16:50:43 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-04 20:19:18 +0200 |
commit | 0225f1dd04e49191bbf1fa787bb15d1617ab996c (patch) | |
tree | f1bafbe9ac06440585a4c8eda0ea3fefbb444f95 | |
parent | 81bcee9866661ee0558474467d83c0fa929e932c (diff) |
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 <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/unit/data/ods/tdf85553.ods | bin | 0 -> 12754 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export_test2.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf85553.ods b/sc/qa/unit/data/ods/tdf85553.ods Binary files differnew file mode 100644 index 000000000000..37cebbd42fe0 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf85553.ods 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); |