diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-09-28 07:38:22 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-09-28 07:38:22 +0200 |
commit | 049d2ffd329f88934a92b72e4ec650ea46bf8c61 (patch) | |
tree | 463702da87e21377fb1ffe44c4a0c973f7b8c97d /sc/qa | |
parent | b466bd9292de9755270b19153c41aed12e204761 (diff) |
Test the case for pivot tables sharing a group
Fixed with 3b64a198568d5b2bb14066581aca112cc6182fd7
Change-Id: Ideea06ea95f6c565e1487f2b27ef249c38c5d4dd
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx | bin | 0 -> 20180 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx b/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx Binary files differnew file mode 100644 index 000000000000..2bc5cddfc870 --- /dev/null +++ b/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 4b53e2d4a3ff..3195fa850297 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -200,6 +200,7 @@ public: void testPivotTableNamedRangeSourceODS(); void testPivotTableSharedCacheGroupODS(); void testGetPivotDataXLS(); + void testPivotTableSharedGroupXLSX(); void testFormulaDependency(); @@ -305,6 +306,7 @@ public: CPPUNIT_TEST(testPivotTableNamedRangeSourceODS); CPPUNIT_TEST(testPivotTableSharedCacheGroupODS); CPPUNIT_TEST(testGetPivotDataXLS); + CPPUNIT_TEST(testPivotTableSharedGroupXLSX); CPPUNIT_TEST(testRowHeightODS); CPPUNIT_TEST(testFormulaDependency); CPPUNIT_TEST(testRichTextContentODS); @@ -2063,6 +2065,33 @@ void ScFiltersTest::testGetPivotDataXLS() xDocSh->DoClose(); } +void ScFiltersTest::testPivotTableSharedGroupXLSX() +{ + ScDocShellRef xDocSh = loadDoc("pivot-table/shared_group.", FORMAT_XLSX); + CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is()); + ScDocument& rDoc = xDocSh->GetDocument(); + rDoc.CalcAll(); + + // Check whether right group names are imported for both tables + // First table + CPPUNIT_ASSERT_EQUAL(OUString("Csoport1"), rDoc.GetString(ScAddress(0,2,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Csoport2"), rDoc.GetString(ScAddress(0,3,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Csoport3"), rDoc.GetString(ScAddress(0,4,0))); + CPPUNIT_ASSERT_EQUAL(OUString("16"), rDoc.GetString(ScAddress(0,5,0))); + CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,6,0))); + CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,7,0))); + + // Second table + CPPUNIT_ASSERT_EQUAL(OUString("Csoport1"), rDoc.GetString(ScAddress(0,12,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Csoport2"), rDoc.GetString(ScAddress(0,13,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Csoport3"), rDoc.GetString(ScAddress(0,14,0))); + CPPUNIT_ASSERT_EQUAL(OUString("16"), rDoc.GetString(ScAddress(0,15,0))); + CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,16,0))); + CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,17,0))); + + xDocSh->DoClose(); +} + void ScFiltersTest::testRowHeightODS() { ScDocShellRef xDocSh = loadDoc("row-height-import.", FORMAT_ODS); |