summaryrefslogtreecommitdiff
path: root/sc/inc/dpobject.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-12 15:22:32 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-12 21:56:49 -0500
commit2232b0c303ca4776a9df762d802b8f74b9d78c93 (patch)
tree61a86f4355d796c3b4d3a7274c0400b0108d0dbd /sc/inc/dpobject.hxx
parent33024ee9d07f4448b2ecdd6f27e0344072b2c0ea (diff)
fdo#43077: Now, refreshing a table should refresh all linked tables.
For efficiency reasons. Otherwise, refreshing n tables individually would require reloading the same data cache n times.
Diffstat (limited to 'sc/inc/dpobject.hxx')
-rw-r--r--sc/inc/dpobject.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 769e0ac234e4..5010e69c1b26 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -37,6 +37,8 @@
#include "pivot.hxx"
#include <com/sun/star/sheet/XDimensionsSupplier.hpp>
+#include <set>
+
#include <boost/ptr_container/ptr_list.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_map.hpp>
@@ -273,6 +275,7 @@ public:
UpdateRefMode eMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
private:
+ void updateCache(const ScRange& rRange, std::set<ScDPObject*>& rRefs);
void removeCache(const ScRange& rRange);
};
@@ -290,6 +293,7 @@ public:
bool hasCache(const rtl::OUString& rName) const;
const ScDPCache* getCache(const ::rtl::OUString& rName, const ScRange& rRange);
private:
+ void updateCache(const rtl::OUString& rName, const ScRange& rRange, std::set<ScDPObject*>& rRefs);
void removeCache(const ::rtl::OUString& rName);
};
@@ -323,6 +327,11 @@ public:
DBCaches(ScDocument* pDoc);
const ScDPCache* getCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand);
private:
+ com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet> createRowSet(
+ sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand);
+
+ 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);
};
@@ -330,7 +339,7 @@ public:
ScDPCollection(const ScDPCollection& r);
~ScDPCollection();
- sal_uLong ClearCache(ScDPObject* pDPObj);
+ sal_uLong ReloadCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs);
SC_DLLPUBLIC size_t GetCount() const;
SC_DLLPUBLIC ScDPObject* operator[](size_t nIndex);