Kaydet (Commit) 14e21865 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#78471: Write test for import of shared formulas from BIFF5.

Change-Id: I77fee109adf1c0decc6eb96cf2292f89fde1aceb
üst 05473825
...@@ -170,6 +170,7 @@ public: ...@@ -170,6 +170,7 @@ public:
void testSharedFormulaHorizontalXLS(); void testSharedFormulaHorizontalXLS();
void testSharedFormulaWrappedRefsXLS(); void testSharedFormulaWrappedRefsXLS();
void testSharedFormulaBIFF5();
void testExternalRefCacheXLSX(); void testExternalRefCacheXLSX();
void testExternalRefCacheODS(); void testExternalRefCacheODS();
void testHybridSharedStringODS(); void testHybridSharedStringODS();
...@@ -247,6 +248,7 @@ public: ...@@ -247,6 +248,7 @@ public:
CPPUNIT_TEST(testColumnStyleXLSX); CPPUNIT_TEST(testColumnStyleXLSX);
CPPUNIT_TEST(testSharedFormulaHorizontalXLS); CPPUNIT_TEST(testSharedFormulaHorizontalXLS);
CPPUNIT_TEST(testSharedFormulaWrappedRefsXLS); CPPUNIT_TEST(testSharedFormulaWrappedRefsXLS);
CPPUNIT_TEST(testSharedFormulaBIFF5);
CPPUNIT_TEST(testExternalRefCacheXLSX); CPPUNIT_TEST(testExternalRefCacheXLSX);
CPPUNIT_TEST(testExternalRefCacheODS); CPPUNIT_TEST(testExternalRefCacheODS);
CPPUNIT_TEST(testHybridSharedStringODS); CPPUNIT_TEST(testHybridSharedStringODS);
...@@ -2522,6 +2524,22 @@ void ScFiltersTest::testSharedFormulaWrappedRefsXLS() ...@@ -2522,6 +2524,22 @@ void ScFiltersTest::testSharedFormulaWrappedRefsXLS()
xDocSh->DoClose(); xDocSh->DoClose();
} }
void ScFiltersTest::testSharedFormulaBIFF5()
{
ScDocShellRef xDocSh = loadDoc("shared-formula/biff5.", XLS);
CPPUNIT_ASSERT(xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
pDoc->CalcAll();
// E6:E376 should be all formulas, and they should belong to the same group.
const ScFormulaCell* pFC = pDoc->GetFormulaCell(ScAddress(4,5,0));
CPPUNIT_ASSERT(pFC);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(5), pFC->GetSharedTopRow());
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(371), pFC->GetSharedLength());
xDocSh->DoClose();
}
void ScFiltersTest::testExternalRefCacheXLSX() void ScFiltersTest::testExternalRefCacheXLSX()
{ {
ScDocShellRef xDocSh = loadDoc("external-refs.", XLSX); 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