diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-23 16:06:10 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-23 22:27:40 -0400 |
commit | ec1b8060e3baf59ae561b3c847a243084e4646b3 (patch) | |
tree | 401f92e897d6023d64930fb0181e9fffe820d8fe /sc | |
parent | 1097d2f3666a1841f87ac7c94b7011637599d5b3 (diff) |
Dump item values too.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 91a01a80101f..c72b9a7f33e6 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -1139,6 +1139,12 @@ std::ostream& operator<< (::std::ostream& os, const rtl::OUString& str) return os << ::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr(); } +void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ItemsType& rItems, size_t nOffset) +{ + for (size_t i = 0; i < rItems.size(); ++i) + cout << " " << (i+nOffset) << ": " << rCache.GetFormattedString(nDim, rItems[i]) << endl; +} + } void ScDPCache::Dump() const @@ -1149,22 +1155,25 @@ void ScDPCache::Dump() const for (size_t i = 0; it != itEnd; ++it, ++i) { const Field& fld = *it; - cout << "* source field: " << GetDimensionName(i) << endl; + cout << "* source dimension: " << GetDimensionName(i) << " (ID = " << i << ")" << endl; cout << " item count: " << fld.maItems.size() << endl; + dumpItems(*this, i, fld.maItems, 0); if (fld.mpGroup) { cout << " group item count: " << fld.mpGroup->maItems.size() << endl; + dumpItems(*this, i, fld.mpGroup->maItems, fld.maItems.size()); } } } { GroupFieldsType::const_iterator it = maGroupFields.begin(), itEnd = maGroupFields.end(); - for (; it != itEnd; ++it) + for (size_t i = maFields.size(); it != itEnd; ++it, ++i) { const GroupItems& gi = *it; - cout << "* group field: (unnamed)" << endl; + cout << "* group dimension: (unnamed) (ID = " << i << ")" << endl; cout << " item count: " << gi.maItems.size() << endl; + dumpItems(*this, i, gi.maItems, 0); } } |