diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-25 19:53:45 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-25 20:55:17 -0500 |
commit | 5bba4c56d2d0a57725b3bc97a3bb8b13a727fa9f (patch) | |
tree | d5307472ec164fd98d75c5f1bf68d25aac986305 | |
parent | 75a22a9fb88b128bb31eb51dc763e42cb76e26c2 (diff) |
fdo#72041: Add import test to catch an issue with external ref cache.
Change-Id: I648d2d04c86d61b1cbe291e7aa79bf9219833328
-rw-r--r-- | sc/qa/unit/data/ods/external-ref-cache.ods | bin | 0 -> 13425 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/ods/external-ref-cache.ods b/sc/qa/unit/data/ods/external-ref-cache.ods Binary files differnew file mode 100644 index 000000000000..b83ba072305b --- /dev/null +++ b/sc/qa/unit/data/ods/external-ref-cache.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 7c332c4b25cc..474700bd8e97 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -160,6 +160,7 @@ public: void testSharedFormulaHorizontalXLS(); void testExternalRefCacheXLSX(); + void testExternalRefCacheODS(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBasicCellContentODS); @@ -236,6 +237,7 @@ public: CPPUNIT_TEST(testColumnStyleXLSX); CPPUNIT_TEST(testSharedFormulaHorizontalXLS); CPPUNIT_TEST(testExternalRefCacheXLSX); + CPPUNIT_TEST(testExternalRefCacheODS); CPPUNIT_TEST_SUITE_END(); private: @@ -2488,6 +2490,21 @@ void ScFiltersTest::testExternalRefCacheXLSX() xDocSh->DoClose(); } +void ScFiltersTest::testExternalRefCacheODS() +{ + ScDocShellRef xDocSh = loadDoc("external-ref-cache.", ODS); + + CPPUNIT_ASSERT(xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + + // Cells B2:B4 have VLOOKUP with external references which should all show "text". + CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,1,0))); + CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,2,0))); + CPPUNIT_ASSERT_EQUAL(OUString("text"), pDoc->GetString(ScAddress(1,3,0))); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |