summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpcache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/dpcache.cxx')
-rw-r--r--sc/source/core/data/dpcache.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 1be6e523966c..60011acd6317 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1452,9 +1452,8 @@ void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ScDPItemData
void dumpSourceData(const ScDPCache& rCache, long nDim, const ScDPCache::ScDPItemDataVec& rItems, const ScDPCache::IndexArrayType& rArray)
{
- ScDPCache::IndexArrayType::const_iterator it = rArray.begin(), itEnd = rArray.end();
- for (; it != itEnd; ++it)
- cout << " '" << rCache.GetFormattedString(nDim, rItems[*it], false) << "'" << endl;
+ for (const auto& rIndex : rArray)
+ cout << " '" << rCache.GetFormattedString(nDim, rItems[rIndex], false) << "'" << endl;
}
const char* getGroupTypeName(sal_Int32 nType)
@@ -1489,10 +1488,10 @@ void ScDPCache::Dump() const
cout << "--- pivot cache dump" << endl;
{
- FieldsType::const_iterator it = maFields.begin(), itEnd = maFields.end();
- for (size_t i = 0; it != itEnd; ++it, ++i)
+ size_t i = 0;
+ for (const auto& rxField : maFields)
{
- const Field& fld = *(*it);
+ const Field& fld = *rxField;
cout << "* source dimension: " << GetDimensionName(i) << " (ID = " << i << ")" << endl;
cout << " item count: " << fld.maItems.size() << endl;
if (bDumpItems)
@@ -1510,19 +1509,22 @@ void ScDPCache::Dump() const
cout << " source data (re-constructed):" << endl;
dumpSourceData(*this, i, fld.maItems, fld.maData);
}
+
+ ++i;
}
}
{
- GroupFieldsType::const_iterator it = maGroupFields.begin(), itEnd = maGroupFields.end();
- for (size_t i = maFields.size(); it != itEnd; ++it, ++i)
+ size_t i = maFields.size();
+ for (const auto& rxGroupField : maGroupFields)
{
- const GroupItems& gi = *(*it);
+ const GroupItems& gi = *rxGroupField;
cout << "* group dimension: (unnamed) (ID = " << i << ")" << endl;
cout << " item count: " << gi.maItems.size() << endl;
cout << " group type: " << getGroupTypeName(gi.mnGroupType) << endl;
if (bDumpItems)
dumpItems(*this, i, gi.maItems, 0);
+ ++i;
}
}