From dddc5972da6c6d6c706e442845a47362d0f08dfa Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 1 Mar 2011 00:24:37 -0500 Subject: [PATCH] Renamed ScDPTableDataCache to simply ScDPCache. There were so many classes with 'DPTable' in them it was confusing. --- sc/inc/dpcachetable.hxx | 12 +++--- sc/inc/dpglobal.hxx | 2 +- sc/inc/dpgroup.hxx | 4 +- sc/inc/dpsdbtab.hxx | 2 +- sc/inc/dpshttab.hxx | 2 +- sc/inc/dptablecache.hxx | 12 ++++-- sc/inc/dptabsrc.hxx | 2 +- sc/source/core/data/dpcachetable.cxx | 8 ++-- sc/source/core/data/dpgroup.cxx | 20 ++++----- sc/source/core/data/dpsave.cxx | 2 +- sc/source/core/data/dpsdbtab.cxx | 4 +- sc/source/core/data/dpshttab.cxx | 4 +- sc/source/core/data/dptablecache.cxx | 64 ++++++++++++++-------------- sc/source/core/data/dptabsrc.cxx | 2 +- 14 files changed, 72 insertions(+), 68 deletions(-) diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx index d0b209a2bafc..89ffcfde3676 100644 --- a/sc/inc/dpcachetable.hxx +++ b/sc/inc/dpcachetable.hxx @@ -50,7 +50,7 @@ namespace com { namespace sun { namespace star { class Date; class ScDPItemData; -class ScDPTableDataCache; +class ScDPCache; class ScDocument; class ScRange; struct ScDPValueData; @@ -121,13 +121,13 @@ public: Criterion(); }; - ScDPCacheTable(ScDPTableDataCache* pCache); + ScDPCacheTable(ScDPCache* pCache); ~ScDPCacheTable(); sal_Int32 getRowSize() const; sal_Int32 getColSize() const; - const ScDPTableDataCache* getCache() const; + const ScDPCache* getCache() const; /** Fill the internal table from the cell range provided. This function assumes that the first row is the column header. */ @@ -169,13 +169,13 @@ public: SCROW getOrder(long nDim, SCROW nIndex) const; void clear(); bool empty() const; - void setCache(ScDPTableDataCache* p); + void setCache(ScDPCache* p); private: ScDPCacheTable(); ScDPCacheTable(const ScDPCacheTable&); - ScDPTableDataCache* getCache(); + ScDPCache* getCache(); /** * Check if a given row meets all specified criteria. @@ -193,7 +193,7 @@ private: has the index of 0. */ ::std::vector maRowsVisible; - ScDPTableDataCache* mpCache; + ScDPCache* mpCache; }; #endif diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx index 387bf7760aff..b76bf116f587 100644 --- a/sc/inc/dpglobal.hxx +++ b/sc/inc/dpglobal.hxx @@ -126,7 +126,7 @@ private: double fValue; BYTE mbFlag; - friend class ScDPTableDataCache; + friend class ScDPCache; public: ScDPItemData() : nNumFormat( 0 ), fValue(0.0), mbFlag( 0 ){} ScDPItemData( ULONG nNF, const String & rS, double fV, BYTE bF ):nNumFormat(nNF), aString(rS), fValue(fV), mbFlag( bF ){} diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 82e82af3dd12..6a88b6386843 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -75,7 +75,7 @@ public: const ScDPNumGroupInfo& GetNumInfo() const { return aNumInfo; } void FillColumnEntries( - SCCOL nSourceDim, const ScDPTableDataCache* pCahe , std::vector& rEntries, + SCCOL nSourceDim, const ScDPCache* pCahe , std::vector& rEntries, const std::vector& rOriginal) const; }; @@ -166,7 +166,7 @@ public: const ScDPDateGroupHelper* GetDateHelper() const { return pDateHelper; } const std::vector& GetNumEntries( - SCCOL nSourceDim, const ScDPTableDataCache* pCache, + SCCOL nSourceDim, const ScDPCache* pCache, const std::vector< SCROW >& rOriginal) const; void MakeDateHelper( const ScDPNumGroupInfo& rInfo, sal_Int32 nPart ); diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx index 9ab6693ae025..3029f2866ad0 100644 --- a/sc/inc/dpsdbtab.hxx +++ b/sc/inc/dpsdbtab.hxx @@ -61,7 +61,7 @@ struct ScImportSourceDesc bNative == rOther.bNative && mpDoc == rOther.mpDoc; } - ScDPTableDataCache* CreateCache() const; + ScDPCache* CreateCache() const; }; class ScDatabaseDPData : public ScDPTableData diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx index 51df5cee5100..dba8880ff7ce 100644 --- a/sc/inc/dpshttab.hxx +++ b/sc/inc/dpshttab.hxx @@ -78,7 +78,7 @@ public: const ScQueryParam& GetQueryParam() const; bool operator== ( const ScSheetSourceDesc& rOther ) const; - ScDPTableDataCache* CreateCache() const; + ScDPCache* CreateCache() const; /** * Check the sanity of the data source range. diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx index d618d6fbece0..f11e7870f088 100644 --- a/sc/inc/dptablecache.hxx +++ b/sc/inc/dptablecache.hxx @@ -42,7 +42,11 @@ struct ScQueryParam; -class SC_DLLPUBLIC ScDPTableDataCache +/** + * This class represents the cached data part of the datapilot cache table + * implementation. + */ +class SC_DLLPUBLIC ScDPCache { friend class ScDPCacheTable; public: @@ -96,10 +100,10 @@ public: const ScDPItemData* GetItemDataById( long nDim, SCROW nId ) const; - bool operator== ( const ScDPTableDataCache& r ) const; + bool operator== ( const ScDPCache& r ) const; - ScDPTableDataCache(ScDocument* pDoc); - virtual ~ScDPTableDataCache(); + ScDPCache(ScDocument* pDoc); + virtual ~ScDPCache(); private: SCROW GetOrder( long nDim, SCROW nIndex ) const; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 1c3fb4ad2229..b6f13e21173a 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -174,7 +174,7 @@ public: long GetDataDimensionCount(); ScDPDimension* GetDataDimension(long nIndex); String GetDataDimName(long nIndex); - const ScDPTableDataCache* GetCache(); + const ScDPCache* GetCache(); const ScDPItemData* GetItemDataById( long nDim, long nId ); long GetDataLayoutDim(){ return pData->GetColumnCount(); } SCROW GetMemberId( long nDim, const ScDPItemData& rData ); diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index 463bf7cc7b57..2e8dc2116fc6 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -158,7 +158,7 @@ ScDPCacheTable::Criterion::Criterion() : // ---------------------------------------------------------------------------- -ScDPCacheTable::ScDPCacheTable(ScDPTableDataCache* pCache) : +ScDPCacheTable::ScDPCacheTable(ScDPCache* pCache) : mpCache(pCache) { } @@ -411,7 +411,7 @@ bool ScDPCacheTable::empty() const return mpCache == NULL || maFieldEntries.empty(); } -void ScDPCacheTable::setCache(ScDPTableDataCache* p) +void ScDPCacheTable::setCache(ScDPCache* p) { delete mpCache; mpCache = p; @@ -438,12 +438,12 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector& rCr return true; } -const ScDPTableDataCache* ScDPCacheTable::getCache() const +const ScDPCache* ScDPCacheTable::getCache() const { return mpCache; } -ScDPTableDataCache* ScDPCacheTable::getCache() +ScDPCache* ScDPCacheTable::getCache() { return mpCache; } diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index 748cda3b5730..35feae7b454d 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -80,7 +80,7 @@ const sal_Int32 SC_DP_DATE_LAST = 10000; // ============================================================================ namespace { - BOOL lcl_Search( SCCOL nSourceDim, const ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex) + BOOL lcl_Search( SCCOL nSourceDim, const ScDPCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex) { rIndex = vIdx.size(); BOOL bFound = FALSE; @@ -112,7 +112,7 @@ namespace return bFound; } - void lcl_Insert( SCCOL nSourceDim, const ScDPTableDataCache* pCache , std::vector< SCROW >& vIdx, SCROW nNew ) + void lcl_Insert( SCCOL nSourceDim, const ScDPCache* pCache , std::vector< SCROW >& vIdx, SCROW nNew ) { SCROW nIndex = 0; if ( !lcl_Search( nSourceDim, pCache, vIdx, nNew ,nIndex ) ) @@ -120,10 +120,10 @@ namespace } template - SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector& vIdx, const ScDPItemData & rData); + SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPCache* pCache, std::vector& vIdx, const ScDPItemData & rData); template<> - SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector& vIdx, const ScDPItemData & rData) + SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPCache* pCache, std::vector& vIdx, const ScDPItemData & rData) { SCROW nNewID = pCache->GetAdditionalItemID(rData); lcl_Insert(nSourceDim, pCache, vIdx, nNewID); @@ -131,7 +131,7 @@ namespace } template<> - SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector& vIdx, const ScDPItemData & rData) + SCROW lcl_InsertValue(SCCOL nSourceDim, const ScDPCache* pCache, std::vector& vIdx, const ScDPItemData & rData) { SCROW nItemId = lcl_InsertValue( nSourceDim, pCache, vIdx, rData ); @@ -142,13 +142,13 @@ namespace } template - void lcl_InsertValue ( SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue ) + void lcl_InsertValue ( SCCOL nSourceDim, const ScDPCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue ) { lcl_InsertValue( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, TRUE ) ); } template - void lcl_InsertValue ( SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue, sal_Int32 nDatePart ) + void lcl_InsertValue ( SCCOL nSourceDim, const ScDPCache* pCache, std::vector< SCROW >& vIdx, const String& rString, const double& fValue, sal_Int32 nDatePart ) { lcl_InsertValue( nSourceDim, pCache, vIdx, ScDPItemData( nDatePart, rString, fValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL|ScDPItemData::MK_DATEPART ) ); } @@ -601,7 +601,7 @@ String lcl_GetSpecialDateName( double fValue, bool bFirst, SvNumberFormatter* pF } void ScDPDateGroupHelper::FillColumnEntries( - SCCOL nSourceDim, const ScDPTableDataCache* pCache, std::vector& rEntries, const std::vector& rOriginal) const + SCCOL nSourceDim, const ScDPCache* pCache, std::vector& rEntries, const std::vector& rOriginal) const { // auto min/max is only used for "Years" part, but the loop is always needed double fSourceMin = 0.0; @@ -902,7 +902,7 @@ void ScDPNumGroupDimension::MakeDateHelper( const ScDPNumGroupInfo& rInfo, sal_I } const std::vector& ScDPNumGroupDimension::GetNumEntries( - SCCOL nSourceDim, const ScDPTableDataCache* pCache, const std::vector& rOriginal) const + SCCOL nSourceDim, const ScDPCache* pCache, const std::vector& rOriginal) const { if ( maMemberEntries.empty() ) { @@ -1338,7 +1338,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt { long nGroupedColumns = aGroups.size(); - const ScDPTableDataCache* pCache = GetCacheTable().getCache(); + const ScDPCache* pCache = GetCacheTable().getCache(); for (long nDim=0; nDim( xSource.get() ); - const ScDPTableDataCache* pCache = pTabSource->GetCache(); + const ScDPCache* pCache = pTabSource->GetCache(); SCCOL nSrcDim = pCache->GetDimensionIndex( GetName() ); diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index 5abe399275f3..c9efb325b5a9 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -75,7 +75,7 @@ using ::com::sun::star::uno::UNO_QUERY; #define SC_DBPROP_COMMAND "Command" #define SC_DBPROP_COMMANDTYPE "CommandType" -ScDPTableDataCache* ScImportSourceDesc::CreateCache() const +ScDPCache* ScImportSourceDesc::CreateCache() const { if (!mpDoc) return NULL; @@ -91,7 +91,7 @@ ScDPTableDataCache* ScImportSourceDesc::CreateCache() const return NULL; } - ScDPTableDataCache* pCache = new ScDPTableDataCache(mpDoc); + ScDPCache* pCache = new ScDPCache(mpDoc); uno::Reference xRowSet ; try diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 9fd67bb27e50..84fce95f805b 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -306,7 +306,7 @@ bool ScSheetSourceDesc::operator== (const ScSheetSourceDesc& rOther) const maQueryParam == rOther.maQueryParam; } -ScDPTableDataCache* ScSheetSourceDesc::CreateCache() const +ScDPCache* ScSheetSourceDesc::CreateCache() const { if (!mpDoc) return NULL; @@ -318,7 +318,7 @@ ScDPTableDataCache* ScSheetSourceDesc::CreateCache() const return NULL; } - ScDPTableDataCache* pCache = new ScDPTableDataCache(mpDoc); + ScDPCache* pCache = new ScDPCache(mpDoc); pCache->InitFromDoc(mpDoc, GetSourceRange()); return pCache; } diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index ee789a9c29be..c05f3b3db8c6 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -65,7 +65,7 @@ bool lcl_isDate( ULONG nNumType ) return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0; } -bool lcl_Search( const ScDPTableDataCache::DataListType& list, const ::std::vector& rOrder, const ScDPItemData& item, SCROW& rIndex) +bool lcl_Search( const ScDPCache::DataListType& list, const ::std::vector& rOrder, const ScDPItemData& item, SCROW& rIndex) { rIndex = list.size(); bool bFound = false; @@ -360,7 +360,7 @@ void ScDPItemData::SetDate( bool b ) //class ScDPTableDataCache //To cache the pivot table data source -bool ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const +bool ScDPCache::operator== ( const ScDPCache& r ) const { if ( GetColumnCount() == r.GetColumnCount() ) { @@ -398,17 +398,17 @@ bool ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const return true; } -ScDPTableDataCache::ScDPTableDataCache(ScDocument* pDoc) : +ScDPCache::ScDPCache(ScDocument* pDoc) : mpDoc( pDoc ), mnColumnCount ( 0 ) { } -ScDPTableDataCache::~ScDPTableDataCache() +ScDPCache::~ScDPCache() { } -bool ScDPTableDataCache::IsValid() const +bool ScDPCache::IsValid() const { return !maTableDataValues.empty() && !maSourceData.empty() && mnColumnCount > 0; } @@ -437,7 +437,7 @@ private: } -bool ScDPTableDataCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) +bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) { // Make sure the formula cells within the data range are interpreted // during this call, for this method may be called from the interpretation @@ -486,7 +486,7 @@ bool ScDPTableDataCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) return true; } -bool ScDPTableDataCache::InitFromDataBase (const Reference& xRowSet, const Date& rNullDate) +bool ScDPCache::InitFromDataBase (const Reference& xRowSet, const Date& rNullDate) { if (!xRowSet.is()) // Dont' even waste time to go any further. @@ -555,7 +555,7 @@ bool ScDPTableDataCache::InitFromDataBase (const Reference& xRowS } } -ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const +ULONG ScDPCache::GetDimNumType( SCCOL nDim) const { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( nDim < mnColumnCount && nDim >=0, " dimention out of bound " ); @@ -565,7 +565,7 @@ ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const return GetNumType(maTableDataValues[nDim][0].nNumFormat); } -bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, bool *pSpecial) +bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, bool *pSpecial) { if (!rParam.GetEntry(0).bDoQuery) return true; @@ -777,17 +777,17 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, boo return bRet; } -bool ScDPTableDataCache::IsRowEmpty( SCROW nRow ) const +bool ScDPCache::IsRowEmpty( SCROW nRow ) const { return mbEmptyRow[ nRow ]; } -bool ScDPTableDataCache::IsEmptyMember( SCROW nRow, USHORT nColumn ) const +bool ScDPCache::IsEmptyMember( SCROW nRow, USHORT nColumn ) const { return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, false ) )->IsHasData(); } -bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) +bool ScDPCache::AddData(long nDim, ScDPItemData* pitemData) { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" ); @@ -823,7 +823,7 @@ bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData) } -String ScDPTableDataCache::GetDimensionName( USHORT nColumn ) const +String ScDPCache::GetDimensionName( USHORT nColumn ) const { DBG_ASSERT(nColumn < maLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName"); DBG_ASSERT(maLabelNames.size() == static_cast (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName"); @@ -836,7 +836,7 @@ String ScDPTableDataCache::GetDimensionName( USHORT nColumn ) const return String(); } -void ScDPTableDataCache::AddLabel(ScDPItemData *pData) +void ScDPCache::AddLabel(ScDPItemData *pData) { DBG_ASSERT( IsValid(), " IsValid() == false " ); @@ -867,7 +867,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData) maLabelNames.push_back( pData ); } -SCROW ScDPTableDataCache::GetItemDataId(USHORT nDim, SCROW nRow, bool bRepeatIfEmpty) const +SCROW ScDPCache::GetItemDataId(USHORT nDim, SCROW nRow, bool bRepeatIfEmpty) const { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( /* nDim >= 0 && */ nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId " ); @@ -881,7 +881,7 @@ SCROW ScDPTableDataCache::GetItemDataId(USHORT nDim, SCROW nRow, bool bRepeatIfE return maSourceData[nDim][nRow]; } -const ScDPItemData* ScDPTableDataCache::GetItemDataById(long nDim, SCROW nId) const +const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const { if ( nId >= GetRowCount() ) return maAdditionalData.getData( nId - GetRowCount() ); @@ -892,7 +892,7 @@ const ScDPItemData* ScDPTableDataCache::GetItemDataById(long nDim, SCROW nId) co return &maTableDataValues[nDim][nId]; } -SCROW ScDPTableDataCache::GetRowCount() const +SCROW ScDPCache::GetRowCount() const { if ( IsValid() ) return maSourceData[0].size(); @@ -900,13 +900,13 @@ SCROW ScDPTableDataCache::GetRowCount() const return 0; } -const ScDPTableDataCache::DataListType& ScDPTableDataCache::GetDimMemberValues(SCCOL nDim) const +const ScDPCache::DataListType& ScDPCache::GetDimMemberValues(SCCOL nDim) const { DBG_ASSERT( nDim>=0 && nDim < mnColumnCount ," nDim < mnColumnCount "); return maTableDataValues[nDim]; } -SCROW ScDPTableDataCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const +SCROW ScDPCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const { DBG_ASSERT ( IsValid(), "IsValid"); DBG_ASSERT( nDim>=0 && nDim < mnColumnCount, "nDim < mnColumnCount"); @@ -915,7 +915,7 @@ SCROW ScDPTableDataCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const return maGlobalOrder[nDim][nOrder]; } -ULONG ScDPTableDataCache::GetNumType(ULONG nFormat) const +ULONG ScDPCache::GetNumType(ULONG nFormat) const { SvNumberFormatter* pFormatter = mpDoc->GetFormatTable(); ULONG nType = NUMBERFORMAT_NUMBER; @@ -924,7 +924,7 @@ ULONG ScDPTableDataCache::GetNumType(ULONG nFormat) const return nType; } -ULONG ScDPTableDataCache::GetNumberFormat( long nDim ) const +ULONG ScDPCache::GetNumberFormat( long nDim ) const { if ( nDim >= mnColumnCount ) return 0; @@ -934,7 +934,7 @@ ULONG ScDPTableDataCache::GetNumberFormat( long nDim ) const return maTableDataValues[nDim][0].nNumFormat; } -bool ScDPTableDataCache::IsDateDimension( long nDim ) const +bool ScDPCache::IsDateDimension( long nDim ) const { if ( nDim >= mnColumnCount ) return false; @@ -945,19 +945,19 @@ bool ScDPTableDataCache::IsDateDimension( long nDim ) const } -SCROW ScDPTableDataCache::GetDimMemberCount( SCCOL nDim ) const +SCROW ScDPCache::GetDimMemberCount( SCCOL nDim ) const { DBG_ASSERT( nDim>=0 && nDim < mnColumnCount ," ScDPTableDataCache::GetDimMemberCount : out of bound "); return maTableDataValues[nDim].size(); } -const ScDPItemData* ScDPTableDataCache::GetSortedItemData(SCCOL nDim, SCROW nOrder) const +const ScDPItemData* ScDPCache::GetSortedItemData(SCCOL nDim, SCROW nOrder) const { SCROW n = GetSortedItemDataId( nDim, nOrder ); return GetItemDataById( nDim, n ); } -SCCOL ScDPTableDataCache::GetDimensionIndex(String sName) const +SCCOL ScDPCache::GetDimensionIndex(String sName) const { for (size_t i = 1; i < maLabelNames.size(); ++i) { @@ -967,7 +967,7 @@ SCCOL ScDPTableDataCache::GetDimensionIndex(String sName) const return -1; } -SCROW ScDPTableDataCache::GetIdByItemData(long nDim, String sItemData ) const +SCROW ScDPCache::GetIdByItemData(long nDim, String sItemData ) const { if ( nDim < mnColumnCount && nDim >=0 ) { @@ -982,7 +982,7 @@ SCROW ScDPTableDataCache::GetIdByItemData(long nDim, String sItemData ) const return GetRowCount() +maAdditionalData.getDataId(rData); } -SCROW ScDPTableDataCache::GetIdByItemData( long nDim, const ScDPItemData& rData ) const +SCROW ScDPCache::GetIdByItemData( long nDim, const ScDPItemData& rData ) const { if ( nDim < mnColumnCount && nDim >=0 ) { @@ -995,19 +995,19 @@ SCROW ScDPTableDataCache::GetIdByItemData( long nDim, const ScDPItemData& rData return GetRowCount() + maAdditionalData.getDataId(rData); } -SCROW ScDPTableDataCache::GetAdditionalItemID ( String sItemData ) const +SCROW ScDPCache::GetAdditionalItemID ( String sItemData ) const { ScDPItemData rData ( sItemData ); return GetAdditionalItemID( rData ); } -SCROW ScDPTableDataCache::GetAdditionalItemID( const ScDPItemData& rData ) const +SCROW ScDPCache::GetAdditionalItemID( const ScDPItemData& rData ) const { return GetRowCount() + maAdditionalData.insertData( rData ); } -SCROW ScDPTableDataCache::GetOrder(long nDim, SCROW nIndex) const +SCROW ScDPCache::GetOrder(long nDim, SCROW nIndex) const { DBG_ASSERT( IsValid(), " IsValid() == false " ); DBG_ASSERT( nDim >=0 && nDim < mnColumnCount, "ScDPTableDataCache::GetOrder : out of bound" ); @@ -1027,12 +1027,12 @@ SCROW ScDPTableDataCache::GetOrder(long nDim, SCROW nIndex) const return maIndexOrder[nDim][nIndex]; } -ScDocument* ScDPTableDataCache::GetDoc() const +ScDocument* ScDPCache::GetDoc() const { return mpDoc; }; -long ScDPTableDataCache::GetColumnCount() const +long ScDPCache::GetColumnCount() const { return mnColumnCount; } diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 2f2c523163db..d12fe718dfaf 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -2796,7 +2796,7 @@ uno::Any SAL_CALL ScDPMember::getPropertyValue( const rtl::OUString& aPropertyNa SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPMember ) -const ScDPTableDataCache* ScDPSource::GetCache() +const ScDPCache* ScDPSource::GetCache() { DBG_ASSERT( GetData() , "empty ScDPTableData pointer"); return ( GetData()!=NULL) ? GetData()->GetCacheTable().getCache() : NULL ;