Kaydet (Commit) efdb67ca authored tarafından Kohei Yoshida's avatar Kohei Yoshida

We don't ever compare equality of two caches.

That'd be super-expensive anyway.
üst 8ada1cd2
......@@ -152,8 +152,6 @@ public:
const ScDPItemData* GetItemDataById( long nDim, SCROW nId ) const;
bool operator== ( const ScDPCache& r ) const;
ScDPCache(ScDocument* pDoc);
~ScDPCache();
......
......@@ -67,44 +67,6 @@ ScDPCache::GroupItems::GroupItems() {}
ScDPCache::GroupItems::GroupItems(const ScDPNumGroupInfo& rInfo) :
maInfo(rInfo) {}
bool ScDPCache::operator== ( const ScDPCache& r ) const
{
if ( GetColumnCount() == r.GetColumnCount() )
{
for ( SCCOL i = 0 ; i < GetColumnCount(); i++ )
{ //check dim names
if ( GetDimensionName( i ) != r.GetDimensionName( i ) )
return false;
//check rows count
if ( GetRowCount() != r.GetRowCount() )
return false;
//check dim member values
size_t nMembersCount = GetDimMemberValues( i ).size();
if ( GetDimMemberValues( i ).size() == r. GetDimMemberValues( i ).size() )
{
for ( size_t j = 0; j < nMembersCount; j++ )
{
if (GetDimMemberValues(i)[j] == r.GetDimMemberValues(i)[j])
continue;
else
return false;
}
}
else
return false;
//check source table index
for ( SCROW k=0 ; k < GetRowCount(); k ++ )
{
if ( GetItemDataId( i, k, false ) == r.GetItemDataId( i,k,false) )
continue;
else
return false;
}
}
}
return true;
}
ScDPCache::Field::Field() : mnNumFormat(0) {}
ScDPCache::ScDPCache(ScDocument* pDoc) :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment