summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-12 21:19:05 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-12 21:57:04 -0500
commit2ab84dcaa32cb117b0ba30f3dcbdf6911dc4f0f4 (patch)
tree72cb8d4ae15404a56136705dfbf9f71cebdff9f0 /sc/inc
parent2232b0c303ca4776a9df762d802b8f74b9d78c93 (diff)
fdo#43077: Finally, remove data cache when nobody references it.
Also, removed unnecessary reloading of the whole table data when reference is updated.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/dpobject.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 5010e69c1b26..685f7d2947b7 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -253,6 +253,7 @@ public:
class ScDPCollection
{
+ friend class ScDPCache;
public:
/**
@@ -277,6 +278,7 @@ public:
private:
void updateCache(const ScRange& rRange, std::set<ScDPObject*>& rRefs);
void removeCache(const ScRange& rRange);
+ bool remove(const ScDPCache* p);
};
/**
@@ -295,6 +297,7 @@ public:
private:
void updateCache(const rtl::OUString& rName, const ScRange& rRange, std::set<ScDPObject*>& rRefs);
void removeCache(const ::rtl::OUString& rName);
+ bool remove(const ScDPCache* p);
};
/**
@@ -333,6 +336,7 @@ public:
void updateCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand,
std::set<ScDPObject*>& rRefs);
void removeCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand);
+ bool remove(const ScDPCache* p);
};
ScDPCollection(ScDocument* pDocument);
@@ -375,6 +379,10 @@ public:
DBCaches& GetDBCaches();
private:
+ /** Only to be called from ScDPCache::RemoveReference(). */
+ void RemoveCache(const ScDPCache* pCache);
+
+private:
typedef ::boost::ptr_vector<ScDPObject> TablesType;
ScDocument* pDoc;