diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-13 08:54:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-13 10:54:19 +0200 |
commit | a029ab3d480c97313dc88dc6e1fbc0f3a900fb09 (patch) | |
tree | 5f768558ef2ea780ec34086bc3e21d95c3c7ecec | |
parent | 2aacf6c2cd82322b953988ff30d3bc997ae76d7b (diff) |
sc:rename ItemsType to ScDPItemDataVec
Change-Id: Ib81da8bd2e934330deea6f862c6774db4df93603
-rw-r--r-- | sc/inc/dpcache.hxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/data/dpdimsave.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 4 |
4 files changed, 25 insertions, 25 deletions
diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index ebddcfe6e85f..bbaa220bdbf5 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -47,14 +47,14 @@ class SC_DLLPUBLIC ScDPCache : boost::noncopyable typedef std::unordered_set<OUString, OUStringHash> StringSetType; public: - typedef std::vector<ScDPItemData> ItemsType; + typedef std::vector<ScDPItemData> ScDPItemDataVec; typedef std::set<ScDPObject*> ObjectSetType; typedef std::vector<OUString> LabelsType; typedef std::vector<SCROW> IndexArrayType; struct GroupItems : boost::noncopyable { - ItemsType maItems; + ScDPItemDataVec maItems; ScDPNumGroupInfo maInfo; sal_Int32 mnGroupType; @@ -72,7 +72,7 @@ public: /** * Unique values in the field, stored in ascending order. */ - ItemsType maItems; + ScDPItemDataVec maItems; /** * Original source data represented as indices to the unique value @@ -157,7 +157,7 @@ public: static SCROW GetOrder( long nDim, SCROW nIndex ); const IndexArrayType* GetFieldIndexArray( size_t nDim ) const; - const ItemsType& GetDimMemberValues( SCCOL nDim ) const; + const ScDPItemDataVec& GetDimMemberValues( SCCOL nDim ) const; bool InitFromDoc(ScDocument* pDoc, const ScRange& rRange); bool InitFromDataBase(DBConnector& rDB); diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index f11d8807ecd6..3a2fbc53a5f5 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -208,9 +208,9 @@ struct EqualByOrderIndex : std::binary_function<Bucket, Bucket, bool> class PushBackValue : std::unary_function<Bucket, void> { - ScDPCache::ItemsType& mrItems; + ScDPCache::ScDPItemDataVec& mrItems; public: - PushBackValue(ScDPCache::ItemsType& _items) : mrItems(_items) {} + PushBackValue(ScDPCache::ScDPItemDataVec& _items) : mrItems(_items) {} void operator() (const Bucket& v) { mrItems.push_back(v.maValue); @@ -810,7 +810,7 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const return nullptr; nItemId -= rField.maItems.size(); - const ItemsType& rGI = rField.mpGroup->maItems; + const ScDPItemDataVec& rGI = rField.mpGroup->maItems; if (nItemId >= rGI.size()) return nullptr; @@ -822,7 +822,7 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const if (nDimPos >= maGroupFields.size()) return nullptr; - const ItemsType& rGI = maGroupFields[nDimPos].maItems; + const ScDPItemDataVec& rGI = maGroupFields[nDimPos].maItems; if (nItemId >= rGI.size()) return nullptr; @@ -858,7 +858,7 @@ const ScDPCache::IndexArrayType* ScDPCache::GetFieldIndexArray( size_t nDim ) co return &maFields[nDim].maData; } -const ScDPCache::ItemsType& ScDPCache::GetDimMemberValues(SCCOL nDim) const +const ScDPCache::ScDPItemDataVec& ScDPCache::GetDimMemberValues(SCCOL nDim) const { OSL_ENSURE( nDim>=0 && nDim < mnColumnCount ," nDim < mnColumnCount "); return maFields.at(nDim).maItems; @@ -943,7 +943,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const if (nDim < mnColumnCount) { // source field. - const ItemsType& rItems = maFields[nDim].maItems; + const ScDPItemDataVec& rItems = maFields[nDim].maItems; for (size_t i = 0, n = rItems.size(); i < n; ++i) { if (rItems[i] == rItem) @@ -954,7 +954,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const return -1; // grouped source field. - const ItemsType& rGI = maFields[nDim].mpGroup->maItems; + const ScDPItemDataVec& rGI = maFields[nDim].mpGroup->maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) { if (rGI[i] == rItem) @@ -967,7 +967,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const nDim -= mnColumnCount; if (static_cast<size_t>(nDim) < maGroupFields.size()) { - const ItemsType& rGI = maGroupFields[nDim].maItems; + const ScDPItemDataVec& rGI = maGroupFields[nDim].maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) { if (rGI[i] == rItem) @@ -1071,7 +1071,7 @@ SCROW ScDPCache::SetGroupItem(long nDim, const ScDPItemData& rData) nDim -= nSourceCount; if (nDim < static_cast<long>(maGroupFields.size())) { - ItemsType& rItems = maGroupFields.at(nDim).maItems; + ScDPItemDataVec& rItems = maGroupFields.at(nDim).maItems; rItems.push_back(rData); return rItems.size()-1; } @@ -1091,7 +1091,7 @@ void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const return; size_t nOffset = maFields[nDim].maItems.size(); - const ItemsType& rGI = maFields[nDim].mpGroup->maItems; + const ScDPItemDataVec& rGI = maFields[nDim].mpGroup->maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) rIds.push_back(static_cast<SCROW>(i + nOffset)); @@ -1101,7 +1101,7 @@ void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const nDim -= nSourceCount; if (nDim < static_cast<long>(maGroupFields.size())) { - const ItemsType& rGI = maGroupFields.at(nDim).maItems; + const ScDPItemDataVec& rGI = maGroupFields.at(nDim).maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) rIds.push_back(static_cast<SCROW>(i)); } @@ -1182,13 +1182,13 @@ std::ostream& operator<< (::std::ostream& os, const OUString& str) return os << OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr(); } -void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ItemsType& rItems, size_t nOffset) +void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ScDPItemDataVec& rItems, size_t nOffset) { for (size_t i = 0; i < rItems.size(); ++i) cout << " " << (i+nOffset) << ": " << rCache.GetFormattedString(nDim, rItems[i]) << endl; } -void dumpSourceData(const ScDPCache& rCache, long nDim, const ScDPCache::ItemsType& rItems, const ScDPCache::IndexArrayType& rArray) +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) diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 43cd1cdd32da..bdd048b14d94 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -289,8 +289,8 @@ void fillDateGroupDimension( double fSourceMax = 0.0; bool bFirst = true; - const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nSourceDim); - ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + const ScDPCache::ScDPItemDataVec& rItems = rCache.GetDimMemberValues(nSourceDim); + ScDPCache::ScDPItemDataVec::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; @@ -404,9 +404,9 @@ void ScDPSaveGroupDimension::AddToCache(ScDPCache& rCache) const } } - const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nSourceDim); + const ScDPCache::ScDPItemDataVec& rItems = rCache.GetDimMemberValues(nSourceDim); { - ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + ScDPCache::ScDPItemDataVec::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; @@ -477,8 +477,8 @@ void ScDPSaveNumGroupDimension::AddToCache(ScDPCache& rCache) const double fSourceMax = 0.0; bool bFirst = true; - const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nDim); - ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + const ScDPCache::ScDPItemDataVec& rItems = rCache.GetDimMemberValues(nDim); + ScDPCache::ScDPItemDataVec::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index b03e89150652..92d79bc53187 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -226,9 +226,9 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr XML_numFmtId, OString::number(0).getStr(), FSEND); - const ScDPCache::ItemsType& rFieldItems = rCache.GetDimMemberValues(i); + const ScDPCache::ScDPItemDataVec& rFieldItems = rCache.GetDimMemberValues(i); - ScDPCache::ItemsType::const_iterator it = rFieldItems.begin(), itEnd = rFieldItems.end(); + ScDPCache::ScDPItemDataVec::const_iterator it = rFieldItems.begin(), itEnd = rFieldItems.end(); std::set<ScDPItemData::Type> aDPTypes; for (; it != itEnd; ++it) |