diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-06 18:36:55 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-06 18:50:09 -0400 |
commit | 740dac4d58a95709eb11fc7434a7904ff8fafbd8 (patch) | |
tree | 554de505e4fc0e0b4c922bd93aed3458a4661d73 | |
parent | 1899bd0c3b8a16ede2de0125e762b23ba013d81f (diff) |
fdo#77990: Write test for this, using the 2nd test document submitted.
Change-Id: I70d71bb21ff43aeb49339ff1f1d9e73c923e0201
-rw-r--r-- | sc/qa/unit/data/ods/hybrid-shared-string.ods | bin | 0 -> 12479 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/hybrid-shared-string.ods b/sc/qa/unit/data/ods/hybrid-shared-string.ods Binary files differnew file mode 100644 index 000000000000..89f59d6424de --- /dev/null +++ b/sc/qa/unit/data/ods/hybrid-shared-string.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 8870b9bbece4..7983e4cec8e6 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -172,6 +172,7 @@ public: void testSharedFormulaWrappedRefsXLS(); void testExternalRefCacheXLSX(); void testExternalRefCacheODS(); + void testHybridSharedStringODS(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBasicCellContentODS); @@ -248,6 +249,7 @@ public: CPPUNIT_TEST(testSharedFormulaWrappedRefsXLS); CPPUNIT_TEST(testExternalRefCacheXLSX); CPPUNIT_TEST(testExternalRefCacheODS); + CPPUNIT_TEST(testHybridSharedStringODS); CPPUNIT_TEST_SUITE_END(); private: @@ -2541,6 +2543,19 @@ void ScFiltersTest::testExternalRefCacheODS() xDocSh->DoClose(); } +void ScFiltersTest::testHybridSharedStringODS() +{ + ScDocShellRef xDocSh = loadDoc("hybrid-shared-string.", ODS); + + CPPUNIT_ASSERT(xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + + // A2 contains formula with MATCH function. The result must be 2, not #N/A! + CPPUNIT_ASSERT_EQUAL(2.0, pDoc->GetValue(ScAddress(0,1,0))); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |