diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-12 15:22:32 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-12 21:56:49 -0500 |
commit | 2232b0c303ca4776a9df762d802b8f74b9d78c93 (patch) | |
tree | 61a86f4355d796c3b4d3a7274c0400b0108d0dbd /sc/source/ui/unoobj/dapiuno.cxx | |
parent | 33024ee9d07f4448b2ecdd6f27e0344072b2c0ea (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.cxx | 10 |
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); + } } } |