diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-07 23:58:49 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-09 13:34:34 -0400 |
commit | c929a78a453e3b06fd99b213fee8587dfdd68e3e (patch) | |
tree | dc0570686d51badfe8eb628f7fd8d9789ce05b52 /sc/qa | |
parent | cd80616ef96bce7b4180d31c9b37ea17fe7efae0 (diff) |
Fix another broadcaster bug and a test code to catch it.
Broadcasters are now independent of cell storage. We need to move them
even when the cell array is empty.
Change-Id: Ib26e544ad6e3842fa722d989c994c19d7c1b3005
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 9941815d87cf..ffb2c4725f46 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1643,6 +1643,19 @@ void Test::testCellBroadcaster() pBC = m_pDoc->GetBroadcaster(ScAddress(1,2,0)); CPPUNIT_ASSERT_MESSAGE("Broadcaster in B3 should have been removed.", !pBC); + // Clear everything and start over. + clearRange(m_pDoc, ScRange(0,0,0,10,100,0)); + + m_pDoc->SetString(ScAddress(1,0,0), "=A1"); // B1 depends on A1. + pBC = m_pDoc->GetBroadcaster(ScAddress(0,0,0)); + CPPUNIT_ASSERT_MESSAGE("Broadcaster should exist in A1.", pBC); + + // While column A is still empty, move column A down 2 cells. This should + // move the broadcaster from A1 to A3. + m_pDoc->InsertRow(0, 0, 0, 0, 0, 2); + pBC = m_pDoc->GetBroadcaster(ScAddress(0,2,0)); + CPPUNIT_ASSERT_MESSAGE("Broadcaster should exist in A3.", pBC); + m_pDoc->DeleteTab(0); } |