Remove cache ID storage from ScDPSaveData.

This commit is contained in:
Kohei Yoshida 2011-02-28 20:34:30 -05:00
parent c51037f84d
commit 3b7bd5c1dd
3 changed files with 4 additions and 22 deletions

View file

@ -247,7 +247,6 @@ private:
sal_uInt16 nRepeatEmptyMode;
bool bFilterButton; // not passed to DataPilotSource
bool bDrillDown; // not passed to DataPilotSource
long mnCacheId;
/** if true, all dimensions already have all of their member instances
* created. */
@ -327,11 +326,6 @@ public:
void WriteToSource( const com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>& xSource );
void Refresh( const com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>& xSource );
bool IsEmpty() const;
inline long GetCacheId() const
{ return mnCacheId; }
inline void SetCacheId( long nCacheId )
{ mnCacheId = nCacheId; }
const ScDPDimensionSaveData* GetExistingDimensionData() const
{ return pDimensionData; }

View file

@ -236,10 +236,6 @@ void ScDPObject::SetSaveData(const ScDPSaveData& rData)
{
delete pSaveData;
pSaveData = new ScDPSaveData( rData );
if ( rData.GetCacheId() >= 0 )
mnCacheId = rData.GetCacheId();
else if ( mnCacheId >= 0 )
pSaveData->SetCacheId( mnCacheId );
}
InvalidateData(); // re-init source from SaveData
@ -2570,11 +2566,9 @@ String ScDPCollection::CreateNewName( USHORT nMin ) const
long ScDPObject::GetCacheId() const
{
if ( GetSaveData() )
return GetSaveData()->GetCacheId();
else
return mnCacheId;
return mnCacheId;
}
ULONG ScDPObject::RefreshCache()
{
if ( pServDesc )
@ -2633,9 +2627,6 @@ void ScDPObject::SetCacheId( long nCacheId )
if ( GetCacheId() != nCacheId )
{
InvalidateSource();
if ( GetSaveData() )
GetSaveData()->SetCacheId( nCacheId );
mnCacheId = nCacheId;
}
}

View file

@ -737,7 +737,6 @@ ScDPSaveData::ScDPSaveData() :
nRepeatEmptyMode( SC_DPSAVEMODE_DONTKNOW ),
bFilterButton( true ),
bDrillDown( true ),
mnCacheId( -1),
mbDimensionMembersBuilt(false),
mpGrandTotalName(NULL)
{
@ -750,7 +749,6 @@ ScDPSaveData::ScDPSaveData(const ScDPSaveData& r) :
nRepeatEmptyMode( r.nRepeatEmptyMode ),
bFilterButton( r.bFilterButton ),
bDrillDown( r.bDrillDown ),
mnCacheId( r.mnCacheId ),
mbDimensionMembersBuilt(r.mbDimensionMembersBuilt),
mpGrandTotalName(NULL)
{
@ -782,7 +780,6 @@ bool ScDPSaveData::operator== ( const ScDPSaveData& r ) const
nIgnoreEmptyMode != r.nIgnoreEmptyMode ||
nRepeatEmptyMode != r.nRepeatEmptyMode ||
bFilterButton != r.bFilterButton ||
mnCacheId != r.mnCacheId ||
bDrillDown != r.bDrillDown ||
mbDimensionMembersBuilt != r.mbDimensionMembersBuilt)
return false;
@ -1299,8 +1296,8 @@ void ScDPSaveData::Refresh( const uno::Reference<sheet::XDimensionsSupplier>& xS
{
DBG_ERROR("error in ScDPSaveData::Refresh");
}
}
void ScDPSaveDimension::Refresh( const com::sun::star::uno::Reference<
com::sun::star::sheet::XDimensionsSupplier>& xSource ,
const std::list<rtl::OUString>& deletedDims)
@ -1308,7 +1305,7 @@ void ScDPSaveDimension::Refresh( const com::sun::star::uno::Reference<
if ( xSource.is() )
{
ScDPSource* pTabSource = static_cast<ScDPSource*>( xSource.get() );
ScDPTableDataCache* pCache = pTabSource->GetCache();
const ScDPTableDataCache* pCache = pTabSource->GetCache();
if ( pCache->GetId() == -1 )
return;