diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-02-05 16:51:17 +0100 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-02-05 16:51:17 +0100 |
commit | e6e1c829d45335c00f7246e983e03011fafb75b0 (patch) | |
tree | b32c6acf2595de734e3f2eba59a71b8ac3f4f6ea /sc | |
parent | f5e98310947f50cc7593f9d2f92e5eaeddacb6ad (diff) |
datapilotperf: GetMemberById instead of GetMemberByIndex, so it works with groups
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 7754d870e957..34976a704fd1 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -1254,10 +1254,11 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) continue; long nDimIndex = itr->second; - sal_Int32 mMemberCount = pData->GetMembersCount( nDimIndex ); - for (sal_Int32 j = 0; j < mMemberCount; ++j) + const std::vector<SCROW>& rMembers = pData->GetColumnEntries(nDimIndex); + size_t mMemberCount = rMembers.size(); + for (size_t j = 0; j < mMemberCount; ++j) { - const ScDPItemData* pMemberData = pData->GetMemberByIndex( nDimIndex, j ); + const ScDPItemData* pMemberData = pData->GetMemberById( nDimIndex, rMembers[j] ); String aMemName = pMemberData->GetString(); if (pDim->GetExistingMemberByName(aMemName)) // this member instance already exists. nothing to do. |