diff options
-rw-r--r-- | chart2/qa/extras/PivotChartTest.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/PivotTableDataProvider.cxx | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx index 0d7056f974e4..dc97b629bbed 100644 --- a/chart2/qa/extras/PivotChartTest.cxx +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -705,9 +705,9 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields() aFieldEntries = xPivotTableDataProvider->getDataFields(); - //CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); - //CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name); - //CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name); + CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name); } diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index 23323663c45b..fe1e383de966 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -350,6 +350,10 @@ void PivotTableDataProvider::collectPivotTableData() OUString sName; for (sheet::MemberResult const & rMember : aSequence) { + if (rMember.Flags & sheet::MemberResultFlags::SUBTOTAL || + rMember.Flags & sheet::MemberResultFlags::GRANDTOTAL) + continue; + if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER || rMember.Flags & sheet::MemberResultFlags::CONTINUE) { @@ -390,6 +394,9 @@ void PivotTableDataProvider::collectPivotTableData() for (sheet::MemberResult const & rMember : aSequence) { bool bHasContinueFlag = rMember.Flags & sheet::MemberResultFlags::CONTINUE; + if (rMember.Flags & sheet::MemberResultFlags::SUBTOTAL || + rMember.Flags & sheet::MemberResultFlags::GRANDTOTAL) + continue; if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER || bHasContinueFlag) { |