diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-15 15:39:33 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-15 19:11:55 +0100 |
commit | d81787416087827200ee12a8fbd25747fbfc3959 (patch) | |
tree | 1520e12ba1f52ce2b1a9411edb813f925cccf968 | |
parent | 5b7db7ec86cc2aa8119fd29ec844d6b52f6c4fcf (diff) |
add test case for fdo#59293
Change-Id: I5972a2805d8bc03b84a42fbba4b67923b3b77249
-rw-r--r-- | sc/qa/unit/data/contentCSV/matrix3.csv | 6 | ||||
-rw-r--r-- | sc/qa/unit/data/ods/matrix.ods | bin | 15563 -> 12992 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 14 |
3 files changed, 17 insertions, 3 deletions
diff --git a/sc/qa/unit/data/contentCSV/matrix3.csv b/sc/qa/unit/data/contentCSV/matrix3.csv new file mode 100644 index 000000000000..4417d2117566 --- /dev/null +++ b/sc/qa/unit/data/contentCSV/matrix3.csv @@ -0,0 +1,6 @@ +1,,1,, +1, +#DIV/0! +1 +1 +#DIV/0! diff --git a/sc/qa/unit/data/ods/matrix.ods b/sc/qa/unit/data/ods/matrix.ods Binary files differindex 7d26c2f117f1..d3713cf82b2d 100644 --- a/sc/qa/unit/data/ods/matrix.ods +++ b/sc/qa/unit/data/ods/matrix.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 1720f3bb2e61..72dabde61d0a 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -475,11 +475,13 @@ void ScFiltersTest::testCachedMatrixFormulaResultsODS() //test matrix rtl::OUString aCSVFileName; - createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("matrix.")), aCSVFileName); + createCSVPath("matrix.", aCSVFileName); testFile(aCSVFileName, pDoc, 0); //test matrices with special cases - createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("matrix2.")), aCSVFileName); + createCSVPath("matrix2.", aCSVFileName); testFile(aCSVFileName, pDoc, 1); + createCSVPath("matrix3.", aCSVFileName); + testFile(aCSVFileName, pDoc, 2); //The above testFile() does not catch the below case. //If a matrix formula has a matrix reference cell that is intended to have //a blank text result, the matrix reference cell is actually saved(export) @@ -487,7 +489,13 @@ void ScFiltersTest::testCachedMatrixFormulaResultsODS() //Import works around this by setting these cells as text cells so that //the blank text is used for display instead of the number 0. //If this is working properly, the following cell should NOT have value data. - //CPPUNIT_ASSERT(!pDoc->GetCell(ScAddress(3,5,1))->HasValueData()); + // CPPUNIT_ASSERT(!pDoc->GetCell(ScAddress(3,0,2))->HasValueData()); + + // fdo#59293 with cached value import error formulas require special + // treatment + pDoc->SetString(2, 5, 2, "=ISERROR(A6)"); + double nVal = pDoc->GetValue(2,5,2); + CPPUNIT_ASSERT_EQUAL(1.0, nVal); xDocSh->DoClose(); } |