[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Tue Jun 7 14:37:43 UTC 2016
sc/source/core/data/dpresfilter.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 81f2bbc2fc42688d5f884d3dde58abe4c265694a
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jun 7 16:30:45 2016 +0200
Resolves: tdf#89186 descend into dimension children to obtain leaf result
Change-Id: Iea6c292c6d7347c4abb221672e583118196e6c1f
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 033762a..d119f09 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -239,6 +239,24 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
pMember = itMem->second.get();
}
+ if (pMember->maValues.empty())
+ {
+ // Descend into dimension member children while there is no result and
+ // exactly one dimension field with exactly one member item, for which
+ // no further constraint (filter) has to match.
+ const MemberNode* pFieldMember = pMember;
+ while (pFieldMember->maChildDimensions.size() == 1)
+ {
+ DimensionsType::const_iterator itDim( pFieldMember->maChildDimensions.begin());
+ const DimensionNode* pDim = itDim->second;
+ if (pDim->maChildMembersValueNames.size() != 1)
+ break; // while
+ pFieldMember = pDim->maChildMembersValueNames.begin()->second.get();
+ if (!pFieldMember->maValues.empty())
+ return &pFieldMember->maValues;
+ }
+ }
+
return &pMember->maValues;
}
More information about the Libreoffice-commits
mailing list