summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-11 15:24:52 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-11 15:29:20 -0500
commite33702442a22a72f96a093fbfdf8bfac217f416f (patch)
tree9277d890f38bcbe0d94b48dff1b08d4d1414891c /sc/inc
parent0482c914c7480dcc3bcf739e19d8372ea3fad35c (diff)
fdo#44661: Properly update range keys for pivot cache.
When the internal data source range gets modified, we should also update the affected range keys that are used to look up pivot caches. Otherwise we'll end up creating a brand new cache, without removing the old one that's no longer referenced.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/dpobject.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index cc73fcbee82a..db8ea9222f0f 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -259,12 +259,18 @@ public:
class SheetCaches
{
friend class ScDPCollection;
- typedef ::boost::ptr_map<ScRange, ScDPCache> CachesType;
+ typedef boost::ptr_map<size_t, ScDPCache> CachesType;
+ typedef std::vector<ScRange> RangeIndexType;
CachesType maCaches;
+ RangeIndexType maRanges;
ScDocument* mpDoc;
public:
SheetCaches(ScDocument* pDoc);
const ScDPCache* getCache(const ScRange& rRange);
+
+ void updateReference(
+ UpdateRefMode eMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
+
private:
void removeCache(const ScRange& rRange);
};