summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/dapiuno.cxx
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/source/ui/unoobj/dapiuno.cxx
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/source/ui/unoobj/dapiuno.cxx')
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c9ff82ac1be9..6da91c22b018 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1276,8 +1276,14 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
if (pDPObj)
{
ScDBDocFunc aFunc(*GetDocShell());
- GetDocShell()->GetDocument()->GetDPCollection()->ClearCache(pDPObj);
- aFunc.DataPilotUpdate( pDPObj, pDPObj, true, true );
+ std::set<ScDPObject*> aRefs;
+ GetDocShell()->GetDocument()->GetDPCollection()->ReloadCache(pDPObj, aRefs);
+ std::set<ScDPObject*>::iterator it = aRefs.begin(), itEnd = aRefs.end();
+ for (; it != itEnd; ++it)
+ {
+ ScDPObject* pObj = *it;
+ aFunc.DataPilotUpdate(pObj, pObj, true, true);
+ }
}
}