diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-02-05 15:35:28 +0100 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-02-05 15:35:28 +0100 |
commit | 7b04aa28fd016f7fd3ce439abfad6801893a5e15 (patch) | |
tree | 3a0b435906735c64d5b82efe9249df23671ac5da /sc | |
parent | datapilotperf: merge with DEV300_m71 (diff) | |
download | core-7b04aa28fd016f7fd3ce439abfad6801893a5e15.tar.gz core-7b04aa28fd016f7fd3ce439abfad6801893a5e15.zip |
datapilotperf: adapted to m71
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dptablecache.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpglobal.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 27 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/dptablecache.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 1 |
6 files changed, 23 insertions, 23 deletions
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx index a9449c573f8c..7b637bf04d6f 100644 --- a/sc/inc/dptablecache.hxx +++ b/sc/inc/dptablecache.hxx @@ -36,7 +36,7 @@ #include "global.hxx" #endif //Added by PengYunQuan for SODC_16015 -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> //end #include <vector> #include "dpglobal.hxx" diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx index 12e57e8ca0f2..ae9a6c5c0534 100644 --- a/sc/source/core/data/dpglobal.cxx +++ b/sc/source/core/data/dpglobal.cxx @@ -109,7 +109,7 @@ ScDPItemDataPool::~ScDPItemDataPool(void) const ScDPItemData* ScDPItemDataPool::getData( sal_Int32 nId ) { - if ( nId >= maItems.size() ) + if ( nId >= static_cast<sal_Int32>(maItems.size()) ) return NULL; else return &(maItems[nId]); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 92676f51b75a..980e3325562a 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -427,10 +427,11 @@ ScDPTableData* ScDPObject::GetTableData() { if (!mpTableData) { + shared_ptr<ScDPTableData> pData; if ( pImpDesc ) { // database data - mpTableData.reset(new ScDatabaseDPData(pDoc, *pImpDesc, GetCacheId())); + pData.reset(new ScDatabaseDPData(pDoc, *pImpDesc, GetCacheId())); } else { @@ -442,17 +443,25 @@ ScDPTableData* ScDPObject::GetTableData() } // Wang Xu Ming -- 2009-8-17 // DataPilot Migration - Cache&&Performance - mpTableData.reset(new ScSheetDPData(pDoc, *pSheetDesc, GetCacheId())); + pData.reset(new ScSheetDPData(pDoc, *pSheetDesc, GetCacheId())); // End Comments } // grouping (for cell or database data) if ( pSaveData && pSaveData->GetExistingDimensionData() ) { - shared_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(mpTableData, pDoc)); + shared_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(pData, pDoc)); pSaveData->GetExistingDimensionData()->WriteToData(*pGroupData); - mpTableData = pGroupData; + pData = pGroupData; } + + // Wang Xu Ming -- 2009-8-17 + // DataPilot Migration - Cache&&Performance + if ( pData ) + SetCacheId( pData->GetCacheId()); // resets mpTableData + // End Comments + + mpTableData = pData; // after SetCacheId } return mpTableData.get(); @@ -482,11 +491,6 @@ void ScDPObject::CreateObjects() DBG_ASSERT( !pServDesc, "DPSource could not be created" ); ScDPTableData* pData = GetTableData(); - // Wang Xu Ming -- 2009-8-17 - // DataPilot Migration - Cache&&Performance - if ( pData ) - SetCacheId( pData->GetCacheId()); - ScDPSource* pSource = new ScDPSource( pData ); xSource = pSource; @@ -498,7 +502,6 @@ void ScDPObject::CreateObjects() } if (pSaveData ) pSaveData->WriteToSource( xSource ); - // End Comments } else if (bSettingsChanged) { @@ -2556,8 +2559,4 @@ bool ScDPCollection::HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const return pMergeAttr->HasDPTable(); } -ScDPCacheCell* ScDPCollection::getCacheCellFromPool(const ScDPCacheCell& rCell) -{ - return pDoc->GetDPObjectCache( GetCacheId() ); -} diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index a91df19cd967..7754d870e957 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -1254,16 +1254,16 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) continue; long nDimIndex = itr->second; - const TypedScStrCollection& rMembers = pData->GetColumnEntries(nDimIndex); - sal_uInt16 nMemberCount = rMembers.GetCount(); - for (sal_uInt16 j = 0; j < nMemberCount; ++j) + sal_Int32 mMemberCount = pData->GetMembersCount( nDimIndex ); + for (sal_Int32 j = 0; j < mMemberCount; ++j) { - const String& rMemName = rMembers[j]->GetString(); - if (pDim->GetExistingMemberByName(rMemName)) + const ScDPItemData* pMemberData = pData->GetMemberByIndex( nDimIndex, j ); + String aMemName = pMemberData->GetString(); + if (pDim->GetExistingMemberByName(aMemName)) // this member instance already exists. nothing to do. continue; - auto_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(rMemName)); + auto_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(aMemName)); pNewMember->SetIsVisible(true); pDim->AddMember(pNewMember.release()); } diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index 808e6afdd82a..843d5057a766 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -876,7 +876,7 @@ String ScDPTableDataCache::GetDimensionName( USHORT nColumn ) const { DBG_ASSERT( nColumn>=0 && nColumn < mrLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName"); DBG_ASSERT( mrLabelNames.size() == static_cast <USHORT> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName"); - if ( nColumn+1 < mrLabelNames.size() ) + if ( static_cast<size_t>(nColumn+1) < mrLabelNames.size() ) { return mrLabelNames[nColumn+1]->aString; } diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 770dae3e6e5a..1477fec48c8b 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -1400,6 +1400,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS } String aCaption = aName; + const ScDPMember* pMemberDesc = GetDPMember(); if (pMemberDesc) { const OUString* pLayoutName = pMemberDesc->GetLayoutName(); |