sc/qa/unit/ucalc.hxx | 2 ++ sc/qa/unit/ucalc_formula.cxx | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)
New commits: commit 0effbd487da597f7a1d25a6a91af6a20090a4b3b Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Mar 4 00:20:18 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Mar 4 09:04:53 2021 +0100 tdf#93415: sc_ucalc: Add unittest Change-Id: Id06ceb081459831637ee78e0a049cf7099772372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111942 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 7c382017c6a5..19c16ee8d56b 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -567,6 +567,7 @@ public: void testTdf97369(); void testTdf97587(); void testTdf107459(); + void testTdf93415(); void testTdf133260(); void testTdf100818(); @@ -878,6 +879,7 @@ public: CPPUNIT_TEST(testTdf97369); CPPUNIT_TEST(testTdf97587); CPPUNIT_TEST(testTdf107459); + CPPUNIT_TEST(testTdf93415); CPPUNIT_TEST(testTdf133260); CPPUNIT_TEST(testTdf100818); CPPUNIT_TEST(testEmptyCalcDocDefaults); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 6d8d40283516..1882fbc168c5 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -8637,6 +8637,26 @@ void Test::testTdf107459() m_pDoc->DeleteTab(0); } +void Test::testTdf93415() +{ + CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Sheet1")); + + ScCalcConfig aConfig; + aConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_R1C1 ); + m_pDoc->SetCalcConfig(aConfig); + m_pDoc->CalcAll(); + + ScAddress aPos(0,0,0); + m_pDoc->SetString(aPos, "=ADDRESS(1,1,,,\"Sheet1\")"); + + // Without the fix in place, this would have failed with + // - Expected: Sheet1!$A$1 + // - Actual : Sheet1.$A$1 + CPPUNIT_ASSERT_EQUAL(OUString("Sheet1!$A$1"), m_pDoc->GetString(aPos)); + + m_pDoc->DeleteTab(0); +} + void Test::testTdf133260() { CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test")); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits