Kaydet (Commit) 0c24686c authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

add test for fdo#80091

Change-Id: I8b62c0980275537adea7a4de44d4fe86995da92f
üst 16bfddca
......@@ -174,6 +174,7 @@ public:
void testSharedFormulaWrappedRefsXLS();
void testSharedFormulaBIFF5();
void testSharedFormulaXLSB();
void testSharedFormulaXLS();
void testExternalRefCacheXLSX();
void testExternalRefCacheODS();
void testHybridSharedStringODS();
......@@ -257,6 +258,7 @@ public:
CPPUNIT_TEST(testSharedFormulaWrappedRefsXLS);
CPPUNIT_TEST(testSharedFormulaBIFF5);
CPPUNIT_TEST(testSharedFormulaXLSB);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testExternalRefCacheXLSX);
CPPUNIT_TEST(testExternalRefCacheODS);
CPPUNIT_TEST(testHybridSharedStringODS);
......@@ -2579,6 +2581,27 @@ void ScFiltersTest::testSharedFormulaXLSB()
xDocSh->DoClose();
}
void ScFiltersTest::testSharedFormulaXLS()
{
ScDocShellRef xDocSh = loadDoc("shared-formula/relative-refs.", XLS);
CPPUNIT_ASSERT(xDocSh.Is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
// A1:A30 should be all formulas, and they should belong to the same group.
const ScFormulaCell* pFC = rDoc.GetFormulaCell(ScAddress(0,1,0));
CPPUNIT_ASSERT(pFC);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), pFC->GetSharedTopRow());
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(29), pFC->GetSharedLength());
for(SCROW nRow = 0; nRow < 30; ++nRow)
{
ASSERT_DOUBLES_EQUAL(double(nRow+1), rDoc.GetValue(0, nRow, 0));
}
xDocSh->DoClose();
}
void ScFiltersTest::testExternalRefCacheXLSX()
{
ScDocShellRef xDocSh = loadDoc("external-refs.", XLSX);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment