diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-07-29 18:52:14 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-07-30 14:06:21 +0200 |
commit | 896390d79133199910f857cf85004466171ca405 (patch) | |
tree | 1d8a08db6f1c617ef0e53530ef0c607688d5a49e /sc/qa | |
parent | 56bd29136ceb32250c0acdce798be47c8f7e7b12 (diff) |
add test case for fdo#81803
Change-Id: I00c52bd1a8d949e3fd874c2dedbd9e2345aca74e
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 02950cfdd588..ee5a0d856f0d 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4576,6 +4576,21 @@ void Test::testAutoFill() CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(0,4,0))); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(0,5,0))); + // test that filling formulas vertically up does the right thing + for(SCROW nRow = 0; nRow < 10; ++nRow) + m_pDoc->SetValue(100, 100 + nRow, 0, 1); + + m_pDoc->SetString(100, 110, 0, "=A111"); + + m_pDoc->Fill(100, 110, 100, 110, NULL, aMarkData, 10, FILL_TO_TOP, FILL_AUTO); + for(SCROW nRow = 110; nRow >= 100; --nRow) + { + OUString aExpected = OUString("=A") + OUString::number(nRow +1); + OUString aFormula; + m_pDoc->GetFormula(100, nRow, 0, aFormula); + CPPUNIT_ASSERT_EQUAL(aExpected, aFormula); + } + m_pDoc->DeleteTab(0); } |