[Libreoffice-commits] core.git: sc/qa

Kohei Yoshida kohei.yoshida at collabora.com
Thu Dec 5 06:57:39 PST 2013


 sc/qa/unit/filters-test.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 45f4cafa6ae59d8db6ffcf99563d57320d58d99d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Dec 5 09:58:19 2013 -0500

    Test our re-grouping of formula cells on load.
    
    Change-Id: I038a3e5447244f8503502f344ade60dfb8e522f2

diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 910d476..e7dcae2 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -400,6 +400,18 @@ void ScFiltersTest::testSharedFormulaXLS()
     if (!checkFormula(*pDoc, ScAddress(1,7,0), "A8*20"))
         CPPUNIT_FAIL("Wrong formula.");
 
+    // We re-group formula cells on load. Let's check that as well.
+
+    ScFormulaCell* pFC = pDoc->GetFormulaCell(ScAddress(1,0,0));
+    CPPUNIT_ASSERT_MESSAGE("Failed to fetch formula cell.", pFC);
+    CPPUNIT_ASSERT_MESSAGE("This should be the top cell in formula group.", pFC->IsSharedTop());
+    CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(3), pFC->GetSharedLength());
+
+    pFC = pDoc->GetFormulaCell(ScAddress(1,4,0));
+    CPPUNIT_ASSERT_MESSAGE("Failed to fetch formula cell.", pFC);
+    CPPUNIT_ASSERT_MESSAGE("This should be the top cell in formula group.", pFC->IsSharedTop());
+    CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(4), pFC->GetSharedLength());
+
     xDocSh->DoClose();
 }
 


More information about the Libreoffice-commits mailing list