summaryrefslogtreecommitdiffstats
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-12 23:46:09 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-12 23:46:09 -0500
commit2bc1da2caa0caadf14921de58d0757ed82733bd0 (patch)
tree52aa3c377475efc6bd09af63c69881f563d81d33 /sc/inc
parentCleaned up inconsistent coding styles. (diff)
downloadcore-2bc1da2caa0caadf14921de58d0757ed82733bd0.tar.gz
core-2bc1da2caa0caadf14921de58d0757ed82733bd0.zip
Moved the dp cache handling code from ScDocument to ScDPCollection.
Let's not bloat ScDocument any more than it currently is. We need to be making ScDocument smaller by moving stuff out, not adding stuff in. Plus, dp caches are relevant only when the document has data pilot tables, so it makes more sense to move it to ScDPCollection.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/document.hxx7
-rw-r--r--sc/inc/dpobject.hxx8
2 files changed, 8 insertions, 7 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 11079b8313d4..2b893251e695 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -246,7 +246,6 @@ private:
ScRangeName* pRangeName;
ScDBCollection* pDBCollection;
ScDPCollection* pDPCollection;
- std::list<ScDPTableDataCache*> m_listDPObjectsCaches;
ScChartCollection* pChartCollection;
std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock;
ScPatternAttr* pSelectionAttr; // Attributes of a block
@@ -488,12 +487,6 @@ public:
SC_DLLPUBLIC ScDPCollection* GetDPCollection();
ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
- SC_DLLPUBLIC ScDPTableDataCache* GetDPObjectCache( long nID );
- SC_DLLPUBLIC ScDPTableDataCache* GetUsedDPObjectCache ( ScRange rRange );
- SC_DLLPUBLIC long AddDPObjectCache( ScDPTableDataCache* pData );
- SC_DLLPUBLIC void RemoveDPObjectCache( long nID );
- SC_DLLPUBLIC void RemoveUnusedDPObjectCaches();
- SC_DLLPUBLIC long GetNewDPObjectCacheId ();
SC_DLLPUBLIC ScChartCollection* GetChartCollection() const;
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 94fdae7535d0..208fce900df1 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -262,6 +262,7 @@ class ScDPCollection : public ScCollection
{
private:
ScDocument* pDoc;
+ std::list<ScDPTableDataCache*> m_listDPObjectsCaches;
public:
ScDPCollection(ScDocument* pDocument);
ScDPCollection(const ScDPCollection& r);
@@ -285,6 +286,13 @@ public:
SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj);
bool HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
+
+ ScDPTableDataCache* GetDPObjectCache( long nID );
+ ScDPTableDataCache* GetUsedDPObjectCache ( ScRange rRange );
+ long AddDPObjectCache( ScDPTableDataCache* pData );
+ void RemoveDPObjectCache( long nID );
+ void RemoveUnusedDPObjectCaches();
+ long GetNewDPObjectCacheId ();
};