summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-07 00:48:10 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-07 00:51:32 -0500
commit17b00767948f7add229ec589c06cd8c898032ffa (patch)
tree6fb2bf664addb0d627d818d564dc594dc10cd1e3 /sc/qa/unit
parent8728f8e8705cfb6875a315aef85ec6004604e702 (diff)
fdo#72645: Case-insensitive string comparison in GETPIVOTDATA.
Change-Id: Ibdb2b7ab2bae03875a3462816e860f58d9076457
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/xls/pivot-getpivotdata.xlsbin0 -> 10752 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/pivot-getpivotdata.xls b/sc/qa/unit/data/xls/pivot-getpivotdata.xls
new file mode 100644
index 000000000000..f9ad24a9de84
--- /dev/null
+++ b/sc/qa/unit/data/xls/pivot-getpivotdata.xls
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 747fd6683520..2bb1dff9fac1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -140,6 +140,7 @@ public:
void testPivotTableBasicODS();
void testPivotTableSharedCacheGroupODS();
+ void testGetPivotDataXLS();
void testFormulaDependency();
@@ -202,6 +203,7 @@ public:
CPPUNIT_TEST(testPivotTableBasicODS);
CPPUNIT_TEST(testPivotTableSharedCacheGroupODS);
+ CPPUNIT_TEST(testGetPivotDataXLS);
CPPUNIT_TEST(testRowHeightODS);
CPPUNIT_TEST(testFormulaDependency);
CPPUNIT_TEST(testRichTextContentODS);
@@ -1719,6 +1721,22 @@ void ScFiltersTest::testPivotTableSharedCacheGroupODS()
xDocSh->DoClose();
}
+void ScFiltersTest::testGetPivotDataXLS()
+{
+ ScDocShellRef xDocSh = loadDoc("pivot-getpivotdata.", XLS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
+ ScDocument* pDoc = xDocSh->GetDocument();
+ pDoc->CalcAll();
+
+ // Check GETPIVOTDATA results in E3:E20. Expected results are given in
+ // F3:F20.
+
+ for (SCROW nRow = 2; nRow <= 19; ++nRow)
+ CPPUNIT_ASSERT_EQUAL(pDoc->GetValue(ScAddress(4,nRow,1)), pDoc->GetValue(ScAddress(5,nRow,1)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testRowHeightODS()
{
ScDocShellRef xDocSh = loadDoc("row-height-import.", ODS);