diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-07-31 19:19:41 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-07-31 21:26:47 -0400 |
commit | 10dfaebc6cc2191745d4d7323596bb8e22c9d029 (patch) | |
tree | df4e46286d3a6f75fd6b761dc514f0cdf556120d /sc | |
parent | 02fb63f8f29085213659b730456dbf0438c2f7cc (diff) |
Add test on updating references in named range.
This currently fails.
Change-Id: Ibb2b9e4430c97479d068d94d233f04f60b255966
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index f731f2ae4e3b..e85c01c55045 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -1064,6 +1064,24 @@ void Test::testFormulaRefUpdateNamedExpression() CPPUNIT_ASSERT_EQUAL(34.0, m_pDoc->GetValue(ScAddress(2,7,0))); #endif + // Clear all and start over. + clearRange(m_pDoc, ScRange(0,0,0,100,100,0)); + pGlobalNames->clear(); + + pName = new ScRangeData( + m_pDoc, "MyRange", "$B$1:$C$6", ScAddress(0,0,0), RT_NAME, formula::FormulaGrammar::GRAM_NATIVE); + bInserted = pGlobalNames->insert(pName); + CPPUNIT_ASSERT_MESSAGE("Failed to insert a new name.", bInserted); + pName->GetSymbol(aExpr); + CPPUNIT_ASSERT_EQUAL(OUString("$B$1:$C$6"), aExpr); + + // Insert range of cells to shift right. The range partially overlaps the named range. + m_pDoc->InsertCol(ScRange(2,4,0,3,8,0)); + + // This should not alter the range. + pName->GetSymbol(aExpr); + CPPUNIT_ASSERT_EQUAL(OUString("$B$1:$C$6"), aExpr); + m_pDoc->DeleteTab(0); } |