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

Kohei Yoshida kohei.yoshida at gmail.com
Mon Jul 8 08:48:45 PDT 2013


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

New commits:
commit 1eec8baaf13128739ee206b97013d29bd7d69c19
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Jul 8 11:48:00 2013 -0400

    Add test for re-grouping of formulas in DeleteRow().
    
    Change-Id: Iea7fafedc2a5f1549a701d1fa768c127e3236246

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index baf957f..d854c59 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6508,6 +6508,15 @@ void Test::testSharedFormulas()
     CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(8), pFC->GetSharedTopRow());
     CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), pFC->GetSharedLength());
 
+    // Delete rows 4:8 and shift row 9 and below up to row 4.  This should
+    // re-merge the two into a group of B2:B5.
+    m_pDoc->DeleteRow(ScRange(0,3,0,MAXCOL,7,0));
+    aPos.SetRow(1);
+    pFC = m_pDoc->GetFormulaCell(aPos);
+    CPPUNIT_ASSERT_MESSAGE("B2 should be a formula cell.", pFC);
+    CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), pFC->GetSharedTopRow());
+    CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(4), pFC->GetSharedLength());
+
     m_pDoc->DeleteTab(0);
 
 }


More information about the Libreoffice-commits mailing list