summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-05 09:58:19 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-05 09:58:54 -0500
commit45f4cafa6ae59d8db6ffcf99563d57320d58d99d (patch)
tree2b022c85d687c0c89c35a54f9c85077c5f191c8e /sc
parent63153f10e0a7d16511878bbfcd97e2c8781a5564 (diff)
Test our re-grouping of formula cells on load.
Change-Id: I038a3e5447244f8503502f344ade60dfb8e522f2
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/filters-test.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 910d476e2489..e7dcae25945d 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();
}