diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index dab448b69b7d..870980fb0a25 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -34,6 +34,7 @@ #include #include #include + #include #include "global.hxx" // enum ScSubTotalFunc #include @@ -132,15 +133,15 @@ private: ScDPResultMember* pRowResRoot; com::sun::star::uno::Sequence* pColResults; com::sun::star::uno::Sequence* pRowResults; - List aColLevelList; - List aRowLevelList; + std::vector aColLevelList; + std::vector aRowLevelList; BOOL bResultOverflow; ::std::auto_ptr mpGrandTotalName; void CreateRes_Impl(); void FillMemberResults(); - void FillLevelList( USHORT nOrientation, List& rList ); + void FillLevelList( USHORT nOrientation, std::vector &rList ); void FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &bHasAutoShow); /** diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 23f4cb5873ec..93be2233c71f 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -561,8 +561,8 @@ void ScDPSource::disposeData() delete[] pRowResults; pColResults = NULL; pRowResults = NULL; - aColLevelList.Clear(); - aRowLevelList.Clear(); + aColLevelList.clear(); + aRowLevelList.clear(); } if ( pDimensions ) @@ -998,9 +998,9 @@ void ScDPSource::CreateRes_Impl() } -void ScDPSource::FillLevelList( USHORT nOrientation, List& rList ) +void ScDPSource::FillLevelList( USHORT nOrientation, std::vector &rList ) { - rList.Clear(); + rList.clear(); long nDimCount = 0; long* pDimIndex = NULL; @@ -1048,7 +1048,7 @@ void ScDPSource::FillLevelList( USHORT nOrientation, List& rList ) for (long nLev=0; nLevgetByIndex(nLev); - rList.Insert( pLevel, LIST_APPEND ); + rList.push_back(pLevel); } } } @@ -1067,7 +1067,7 @@ void ScDPSource::FillMemberResults() } FillLevelList( sheet::DataPilotFieldOrientation_COLUMN, aColLevelList ); - long nColLevelCount = aColLevelList.Count(); + long nColLevelCount = aColLevelList.size(); if (nColLevelCount) { long nColDimSize = pColResRoot->GetSize(pResData->GetColStartMeasure()); @@ -1081,7 +1081,7 @@ void ScDPSource::FillMemberResults() } FillLevelList( sheet::DataPilotFieldOrientation_ROW, aRowLevelList ); - long nRowLevelCount = aRowLevelList.Count(); + long nRowLevelCount = aRowLevelList.size(); if (nRowLevelCount) { long nRowDimSize = pRowResRoot->GetSize(pResData->GetRowStartMeasure()); @@ -1100,18 +1100,18 @@ const uno::Sequence* ScDPSource::GetMemberResults( ScDPLeve { FillMemberResults(); - long i; - long nColCount = aColLevelList.Count(); + long i = 0; + long nColCount = aColLevelList.size(); for (i=0; i