diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-24 13:53:12 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-24 16:05:02 -0500 |
commit | 3cf0847e7514a3f1217554c08cb109902cf2a637 (patch) | |
tree | d5c16e9501b823cf0cbd51529c7305c87634b980 | |
parent | a52572057cde479ce4fc7ccd8343fe57220a70cb (diff) |
fdo#75304: Add test for external reference cache import from XLSX.
Change-Id: I93c4398b5673e1edaacfe4b68015000dfd224612
-rw-r--r-- | sc/qa/unit/data/xlsx/external-refs.xlsx | bin | 0 -> 9172 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/external-refs.xlsx b/sc/qa/unit/data/xlsx/external-refs.xlsx Binary files differnew file mode 100644 index 000000000000..805e36c51a61 --- /dev/null +++ b/sc/qa/unit/data/xlsx/external-refs.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index f4acfa96e088..7c332c4b25cc 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -159,6 +159,7 @@ public: void testColumnStyleXLSX(); void testSharedFormulaHorizontalXLS(); + void testExternalRefCacheXLSX(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBasicCellContentODS); @@ -234,6 +235,7 @@ public: CPPUNIT_TEST(testOutlineODS); CPPUNIT_TEST(testColumnStyleXLSX); CPPUNIT_TEST(testSharedFormulaHorizontalXLS); + CPPUNIT_TEST(testExternalRefCacheXLSX); CPPUNIT_TEST_SUITE_END(); private: @@ -2471,6 +2473,21 @@ void ScFiltersTest::testSharedFormulaHorizontalXLS() 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() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |