diff options
author | Daniel Bankston <daniel.e.bankston@gmail.com> | 2012-07-19 17:23:06 -0500 |
---|---|---|
committer | Daniel Bankston <daniel.e.bankston@gmail.com> | 2012-07-19 19:40:04 -0500 |
commit | abdffd2e442356782ee6bd947936afc7fb9e4287 (patch) | |
tree | aa52b99349f3cd0dad2bc8ce1f77b19826454714 /sc | |
parent | 218ec3b0cadc5fa505cd8a39a53f2c5729d92265 (diff) |
Add test case for matrix reference cells with blank text result
Change-Id: If00d424ebe0d82284c3281c3362f2a9e52ee384e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/contentCSV/matrix2.csv | 1 | ||||
-rw-r--r-- | sc/qa/unit/data/ods/matrix.ods | bin | 14825 -> 15563 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 11 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sc/qa/unit/data/contentCSV/matrix2.csv b/sc/qa/unit/data/contentCSV/matrix2.csv index 955d345f0ded..2effd613c639 100644 --- a/sc/qa/unit/data/contentCSV/matrix2.csv +++ b/sc/qa/unit/data/contentCSV/matrix2.csv @@ -3,3 +3,4 @@ Err:502,Err:502,Err:502,,error result #N/A,#N/A,#N/A,,n/a TRUE,TRUE,TRUE,,Display TRUE instead of 1 FALSE,FALSE,FALSE,,Display FALSE instead of 0 +42,,42,,Display blank cell instead of 0 diff --git a/sc/qa/unit/data/ods/matrix.ods b/sc/qa/unit/data/ods/matrix.ods Binary files differindex 2a8c4ab4a322..7d26c2f117f1 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 9a3c5dd56406..6688e0f2431b 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -44,6 +44,7 @@ #include <editeng/borderline.hxx> #include <dbdata.hxx> #include "validat.hxx" +#include "cell.hxx" #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/drawing/XControlShape.hpp> @@ -423,9 +424,17 @@ void ScFiltersTest::testCachedMatrixFormulaResultsODS() rtl::OUString aCSVFileName; createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("matrix.")), aCSVFileName); testFile(aCSVFileName, pDoc, 0); - //test matrix with errors + //test matrices with special cases createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("matrix2.")), aCSVFileName); testFile(aCSVFileName, pDoc, 1); + //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) + //as a float cell with 0 as the value and an empty <text:p/>. + //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()); xDocSh->DoClose(); } |