diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-02 13:23:58 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-02 13:42:12 -0400 |
commit | 6bac39f309e11a515a2b2ecdf43a4b49ccd53502 (patch) | |
tree | 06d4305a4e79add59d7fcb81ea320932950abc4b /sc | |
parent | 0633cd04b8739436fe1a10a67a4804ecdb724198 (diff) |
More test cases for cell notes that currently fail.
Change-Id: I23a5a39ab13106a27a02adbec0ff1ab64a43abef
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 62e98c6b2ace..ce8ea865c239 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4258,7 +4258,7 @@ void Test::testPostIts() rAddr.IncRow(); // cell C4 CPPUNIT_ASSERT_MESSAGE("note not there", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); - // Insert column at column 1. + // Insert column at column A. bool bInsertCol = m_pDoc->InsertCol(0, 0, MAXROW, 0, 1, 1); CPPUNIT_ASSERT_MESSAGE("failed to insert column", bInsertCol ); @@ -4285,6 +4285,16 @@ void Test::testPostIts() m_pDoc->DeleteRow(2, 0, 2, 0, 3, 1); CPPUNIT_ASSERT_MESSAGE("Note shouldn't have moved but it has.", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); + // Now, with the note at D4, delete cell D3. This should shift the note one cell up. + m_pDoc->DeleteRow(3, 0, 3, 0, 2, 1); + rAddr.IncRow(-1); // cell D3 + CPPUNIT_ASSERT_MESSAGE("Note at D4 should have shifted up to D3.", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); + + // Delete column C. This should shift the note one cell left. + m_pDoc->DeleteCol(0, 0, MAXROW, 0, 2, 1); + rAddr.IncCol(-1); // cell C3 + CPPUNIT_ASSERT_MESSAGE("Note at D3 should have shifted left to C3.", m_pDoc->GetNotes(rAddr.Tab())->findByAddress(rAddr) == pNote); + m_pDoc->DeleteTab(0); } |