diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-15 10:44:30 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-15 15:41:23 -0400 |
commit | e6c65b03976971fbc21e7a1dec75f6713be6c322 (patch) | |
tree | c444f7bd3e57067252365dfed77f7f4e21d4ab04 /sc | |
parent | 08ba87c55858335094c24ca4e610a13da133330c (diff) |
DataListType -> ItemsType.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dpcache.hxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 22 | ||||
-rw-r--r-- | sc/source/core/data/dpdimsave.cxx | 12 |
3 files changed, 21 insertions, 21 deletions
diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index ea0c0857e609..05574814b512 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -59,14 +59,14 @@ struct ScDPNumGroupInfo; class SC_DLLPUBLIC ScDPCache : boost::noncopyable { public: - typedef std::vector<ScDPItemData> DataListType; + typedef std::vector<ScDPItemData> ItemsType; typedef std::set<ScDPObject*> ObjectSetType; typedef std::vector<rtl::OUString> LabelsType; typedef std::vector<SCROW> IndexArrayType; struct GroupItems : boost::noncopyable { - DataListType maItems; + ItemsType maItems; ScDPNumGroupInfo maInfo; GroupItems(); @@ -80,7 +80,7 @@ public: */ boost::scoped_ptr<GroupItems> mpGroup; - DataListType maItems; /// Unique values in the field. + ItemsType maItems; /// Unique values in the field. /** * Original source data represented as indices to the unique value @@ -145,7 +145,7 @@ public: SCROW GetDimMemberCount( SCCOL nDim ) const; SCROW GetOrder( long nDim, SCROW nIndex ) const; - const DataListType& GetDimMemberValues( SCCOL nDim ) const; + const ItemsType& GetDimMemberValues( SCCOL nDim ) const; bool InitFromDoc(ScDocument* pDoc, const ScRange& rRange); bool InitFromDataBase(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xRowSet, const Date& rNullDate); diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index fe262ac2c8cc..dba8ef9b157a 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -75,7 +75,7 @@ namespace { * * @return true if the item is found, or false otherwise. */ -bool hasItemInDimension(const ScDPCache::DataListType& rArray, const ScDPCache::IndexArrayType& rOrder, const ScDPItemData& rItem, SCROW& rIndex) +bool hasItemInDimension(const ScDPCache::ItemsType& rArray, const ScDPCache::IndexArrayType& rOrder, const ScDPItemData& rItem, SCROW& rIndex) { rIndex = rArray.size(); bool bFound = false; @@ -705,7 +705,7 @@ void ScDPCache::PostInit() for (; it != itEnd; ++it) { // Trim excess capacity. - DataListType(it->maItems).swap(it->maItems); + ItemsType(it->maItems).swap(it->maItems); } } @@ -777,7 +777,7 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const return NULL; nItemId -= rField.maItems.size(); - const DataListType& rGI = rField.mpGroup->maItems; + const ItemsType& rGI = rField.mpGroup->maItems; if (nItemId >= rGI.size()) return NULL; @@ -789,7 +789,7 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const if (nDimPos >= maGroupFields.size()) return NULL; - const DataListType& rGI = maGroupFields[nDimPos].maItems; + const ItemsType& rGI = maGroupFields[nDimPos].maItems; if (nItemId >= rGI.size()) return NULL; @@ -804,7 +804,7 @@ SCROW ScDPCache::GetRowCount() const return maFields[0].maData.size(); } -const ScDPCache::DataListType& ScDPCache::GetDimMemberValues(SCCOL nDim) const +const ScDPCache::ItemsType& ScDPCache::GetDimMemberValues(SCCOL nDim) const { OSL_ENSURE( nDim>=0 && nDim < mnColumnCount ," nDim < mnColumnCount "); return maFields.at(nDim).maItems; @@ -878,7 +878,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const if (nDim < mnColumnCount) { // source field. - const DataListType& rItems = maFields[nDim].maItems; + const ItemsType& rItems = maFields[nDim].maItems; for (size_t i = 0, n = rItems.size(); i < n; ++i) { if (rItems[i] == rItem) @@ -889,7 +889,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const return -1; // grouped source field. - const DataListType& rGI = maFields[nDim].mpGroup->maItems; + const ItemsType& rGI = maFields[nDim].mpGroup->maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) { if (rGI[i] == rItem) @@ -902,7 +902,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rItem) const nDim -= mnColumnCount; if (static_cast<size_t>(nDim) < maGroupFields.size()) { - const DataListType& rGI = maGroupFields[nDim].maItems; + const ItemsType& rGI = maGroupFields[nDim].maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) { if (rGI[i] == rItem) @@ -1005,7 +1005,7 @@ SCROW ScDPCache::SetGroupItem(long nDim, const ScDPItemData& rData) nDim -= nSourceCount; if (nDim < static_cast<long>(maGroupFields.size())) { - DataListType& rItems = maGroupFields.at(nDim).maItems; + ItemsType& rItems = maGroupFields.at(nDim).maItems; rItems.push_back(rData); return rItems.size()-1; } @@ -1025,7 +1025,7 @@ void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const return; size_t nOffset = maFields[nDim].maItems.size(); - const DataListType& rGI = maFields[nDim].mpGroup->maItems; + const ItemsType& rGI = maFields[nDim].mpGroup->maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) rIds.push_back(static_cast<SCROW>(i + nOffset)); @@ -1035,7 +1035,7 @@ void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const nDim -= nSourceCount; if (nDim < static_cast<long>(maGroupFields.size())) { - const DataListType& rGI = maGroupFields.at(nDim).maItems; + const ItemsType& rGI = maGroupFields.at(nDim).maItems; for (size_t i = 0, n = rGI.size(); i < n; ++i) rIds.push_back(static_cast<SCROW>(i)); } diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 8cf8d39d94b2..f31399006d3f 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -304,8 +304,8 @@ void fillDateGroupDimension( double fSourceMax = 0.0; bool bFirst = true; - const ScDPCache::DataListType& rItems = rCache.GetDimMemberValues(nSourceDim); - ScDPCache::DataListType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nSourceDim); + ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; @@ -419,9 +419,9 @@ void ScDPSaveGroupDimension::AddToCache(ScDPCache& rCache) const } } - const ScDPCache::DataListType& rItems = rCache.GetDimMemberValues(nSourceDim); + const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nSourceDim); { - ScDPCache::DataListType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; @@ -494,8 +494,8 @@ void ScDPSaveNumGroupDimension::AddToCache(ScDPCache& rCache) const double fSourceMax = 0.0; bool bFirst = true; - const ScDPCache::DataListType& rItems = rCache.GetDimMemberValues(nDim); - ScDPCache::DataListType::const_iterator it = rItems.begin(), itEnd = rItems.end(); + const ScDPCache::ItemsType& rItems = rCache.GetDimMemberValues(nDim); + ScDPCache::ItemsType::const_iterator it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { const ScDPItemData& rItem = *it; |