summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-07 23:40:08 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-09 13:34:34 -0400
commitcd80616ef96bce7b4180d31c9b37ea17fe7efae0 (patch)
treed4ddcbb645659ae4841dcad313adebaac38864eb /sc/qa/unit
parent667a112815225d65e126898add254a0903ecd34f (diff)
Test to ensure that removing a listening formula cell remove the broadcaster.
Change-Id: Iae816c68ffed30fda0115ac0f5ac2800ceed5e58
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/ucalc.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8aba718c6f4d..9941815d87cf 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1635,6 +1635,14 @@ void Test::testCellBroadcaster()
CPPUNIT_ASSERT_MESSAGE("Broadcaster relocation failed.",
broadcasterShifted(*m_pDoc, ScAddress(0,2,0), ScAddress(1,2,0)));
+ // Delete formula in C2, which should remove the broadcaster in B3.
+ pBC = m_pDoc->GetBroadcaster(ScAddress(1,2,0));
+ CPPUNIT_ASSERT_MESSAGE("Broadcaster in B3 should still exist.", pBC);
+ clearRange(m_pDoc, ScAddress(2,0,0));
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_NONE, m_pDoc->GetCellType(ScAddress(2,0,0))); // C2 should be empty.
+ pBC = m_pDoc->GetBroadcaster(ScAddress(1,2,0));
+ CPPUNIT_ASSERT_MESSAGE("Broadcaster in B3 should have been removed.", !pBC);
+
m_pDoc->DeleteTab(0);
}