diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-29 11:20:55 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-29 11:43:15 -0400 |
commit | fd65b90934d0c521de1f3b04214e364fd540f080 (patch) | |
tree | 056ac07c2a1564779fe4702c756ac11b3c7f6394 | |
parent | 1a18c27bfbaec32520f2a03b40ae09c9e44c59b8 (diff) |
fdo#74322: Additional test for the followup issue.
Change-Id: I971e7ea2535138eb4ac901c227c72a50578746a8
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 937c96e71021..ae65185eee11 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -1932,6 +1932,28 @@ void Test::testFormulaRefUpdateNamedExpressionMove() CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(0,9,0))); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(0,10,0))); + // Clear and start over. + clearSheet(m_pDoc, 0); + m_pDoc->GetRangeName()->clear(); + + // Set value to B2. + m_pDoc->SetValue(ScAddress(1,1,0), 2.0); + + // Define B2 as 'MyCell'. + bInserted = m_pDoc->InsertNewRangeName("MyCell", ScAddress(0,0,0), "$Test.$B$2"); + CPPUNIT_ASSERT(bInserted); + + // Set formula to B3 that references B2 via MyCell. + m_pDoc->SetString(ScAddress(1,2,0), "=MyCell*2"); + CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(1,2,0))); + + // Move B2 to D2. + bMoved = rFunc.MoveBlock(ScRange(1,1,0,1,1,0), ScAddress(3,1,0), true, true, false, true); + CPPUNIT_ASSERT(bMoved); + + // Value in B3 should remain unchanged. + CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(1,2,0))); + m_pDoc->DeleteTab(0); } |