[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/qa

Kohei Yoshida kohei.yoshida at gmail.com
Tue May 7 20:38:00 PDT 2013


 sc/qa/unit/ucalc.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 88e3401952e2599fe85df52a095eb0ed528dae4a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue May 7 23:40:08 2013 -0400

    Test to ensure that removing a listening formula cell remove the broadcaster.
    
    Change-Id: Iae816c68ffed30fda0115ac0f5ac2800ceed5e58

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8aba718..9941815 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);
 }
 


More information about the Libreoffice-commits mailing list