diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-02-28 20:34:30 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-02-28 20:34:30 -0500 |
commit | 768ea092c286d52e4d05616a27f21396cf3420ca (patch) | |
tree | dff49c6feaf0b17c3d0c435d6d21cf673d95f84f /sc/source/core/data | |
parent | 405e39052cb25021818b53ada7b7c2b72bbfdb4a (diff) |
Remove cache ID storage from ScDPSaveData.
Diffstat (limited to 'sc/source/core/data')
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 13 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 7 |
2 files changed, 4 insertions, 16 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index f1129718c..56d66ac4d 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -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; } } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index cc7ab8612..22733b345 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -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; |