summaryrefslogtreecommitdiffstats
path: root/sc/inc/dpobject.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-04-29 12:26:16 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-04-29 12:28:08 -0400
commit08ad6f55a7bc29b865756fe8f328b61628355519 (patch)
tree63a3d3a0cb5c5757c281bffc877eb6b3681395c0 /sc/inc/dpobject.hxx
parentdlopen-global-symbols.diff: use global namespace for dlopened sym (diff)
downloadcore-08ad6f55a7bc29b865756fe8f328b61628355519.tar.gz
core-08ad6f55a7bc29b865756fe8f328b61628355519.zip
Manage data caches for named range data source separately.
Without this, updating the named range and refreshing would fail to remove the old cache, which is no longer referenced. Very bad for memory footprint.
Diffstat (limited to 'sc/inc/dpobject.hxx')
-rw-r--r--sc/inc/dpobject.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 9972e0c1198f..30ca8406d11e 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -274,6 +274,20 @@ public:
};
/**
+ * Data caches for range name based source data.
+ */
+ class NameCaches
+ {
+ typedef ::boost::ptr_map<rtl::OUString, ScDPCache> CachesType;
+ CachesType maCaches;
+ ScDocument* mpDoc;
+ public:
+ NameCaches(ScDocument* pDoc);
+ const ScDPCache* getCache(const ::rtl::OUString& rName, const ScRange& rRange);
+ void removeCache(const ::rtl::OUString& rName);
+ };
+
+ /**
* Defines connection type to external data source. Used as a key to look
* up database cache.
*/
@@ -333,6 +347,7 @@ public:
bool HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
SheetCaches& GetSheetCaches();
+ NameCaches& GetNameCaches();
DBCaches& GetDBCaches();
private:
@@ -341,6 +356,7 @@ private:
ScDocument* pDoc;
TablesType maTables;
SheetCaches maSheetCaches;
+ NameCaches maNameCaches;
DBCaches maDBCaches;
};