Kaydet (Commit) 3cf0847e authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#75304: Add test for external reference cache import from XLSX.

Change-Id: I93c4398b5673e1edaacfe4b68015000dfd224612
üst a5257205
...@@ -159,6 +159,7 @@ public: ...@@ -159,6 +159,7 @@ public:
void testColumnStyleXLSX(); void testColumnStyleXLSX();
void testSharedFormulaHorizontalXLS(); void testSharedFormulaHorizontalXLS();
void testExternalRefCacheXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBasicCellContentODS); CPPUNIT_TEST(testBasicCellContentODS);
...@@ -234,6 +235,7 @@ public: ...@@ -234,6 +235,7 @@ public:
CPPUNIT_TEST(testOutlineODS); CPPUNIT_TEST(testOutlineODS);
CPPUNIT_TEST(testColumnStyleXLSX); CPPUNIT_TEST(testColumnStyleXLSX);
CPPUNIT_TEST(testSharedFormulaHorizontalXLS); CPPUNIT_TEST(testSharedFormulaHorizontalXLS);
CPPUNIT_TEST(testExternalRefCacheXLSX);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -2471,6 +2473,21 @@ void ScFiltersTest::testSharedFormulaHorizontalXLS() ...@@ -2471,6 +2473,21 @@ void ScFiltersTest::testSharedFormulaHorizontalXLS()
xDocSh->DoClose(); xDocSh->DoClose();
} }
void ScFiltersTest::testExternalRefCacheXLSX()
{
ScDocShellRef xDocSh = loadDoc("external-refs.", XLSX);
CPPUNIT_ASSERT(xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
// These string values are cached external cell values.
CPPUNIT_ASSERT_EQUAL(OUString("Name"), pDoc->GetString(ScAddress(0,0,0)));
CPPUNIT_ASSERT_EQUAL(OUString("Andy"), pDoc->GetString(ScAddress(0,1,0)));
CPPUNIT_ASSERT_EQUAL(OUString("Bruce"), pDoc->GetString(ScAddress(0,2,0)));
CPPUNIT_ASSERT_EQUAL(OUString("Charlie"), pDoc->GetString(ScAddress(0,3,0)));
xDocSh->DoClose();
}
ScFiltersTest::ScFiltersTest() ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "/sc/qa/unit/data" ) : ScBootstrapFixture( "/sc/qa/unit/data" )
{ {
......
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