sc/qa/unit/data/ods/tdf124454.ods |binary sc/qa/unit/subsequent_filters-test.cxx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit 96547693533aa0261ed46c19f922b3b8172591e3 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jul 9 13:56:46 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jul 9 20:34:07 2020 +0200 tdf#124454: sc: Add unittest Change-Id: Id7b606c0e7e3621ea855af325c755876e11ebc66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98429 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/data/ods/tdf124454.ods b/sc/qa/unit/data/ods/tdf124454.ods new file mode 100644 index 000000000000..c312ccb4f5db Binary files /dev/null and b/sc/qa/unit/data/ods/tdf124454.ods differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 8399cef636e8..52f304235473 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -195,6 +195,7 @@ public: void testCustomNumFormatHybridCellODS(); void testTdf121040(); void testTdf118624(); + void testTdf124454(); void testPrintRangeODS(); void testOutlineODS(); @@ -357,6 +358,7 @@ public: CPPUNIT_TEST(testCustomNumFormatHybridCellODS); CPPUNIT_TEST(testTdf121040); CPPUNIT_TEST(testTdf118624); + CPPUNIT_TEST(testTdf124454); CPPUNIT_TEST(testPrintRangeODS); CPPUNIT_TEST(testOutlineODS); CPPUNIT_TEST(testColumnStyleXLSX); @@ -2952,6 +2954,22 @@ void ScFiltersTest::testTdf118624() xDocSh->DoClose(); } +void ScFiltersTest::testTdf124454() +{ + ScDocShellRef xDocSh = loadDoc("tdf124454.", FORMAT_ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is()); + + ScDocument& rDoc = xDocSh->GetDocument(); + + CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(1,0,0))); + CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(2,0,0))); + // Without the fix in place, double negation with text in array + // would have returned -1 + CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(3,0,0))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testPrintRangeODS() { ScDocShellRef xDocSh = loadDoc("print-range.", FORMAT_ODS); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits