summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/dbdocfun.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-13 14:33:21 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-14 00:35:29 -0400
commitb4af9a6a902bef4d4f6dc4e550097ef8b6254abd (patch)
tree588bbbb665dbf823bee9b11546e7c4bd8a605eb2 /sc/source/ui/docshell/dbdocfun.cxx
parent9be40516455eef80d7c121455c08da41b27373bf (diff)
Let's just do the whole thing in the new method.
Diffstat (limited to 'sc/source/ui/docshell/dbdocfun.cxx')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 3a5e0fdc4386..e560741a8785 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -61,6 +61,8 @@
#include "queryentry.hxx"
#include "markdata.hxx"
+#include <set>
+
using namespace ::com::sun::star;
// -----------------------------------------------------------------
@@ -1451,14 +1453,25 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
return bDone;
}
-void ScDBDocFunc::RefreshPivotTables(std::set<ScDPObject*>& rRefs, bool bRecord, bool bApi)
+sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bRecord, bool bApi)
{
- std::set<ScDPObject*>::iterator it = rRefs.begin(), itEnd = rRefs.end();
+ ScDPCollection* pDPs = rDocShell.GetDocument()->GetDPCollection();
+ if (!pDPs)
+ return 0;
+
+ std::set<ScDPObject*> aRefs;
+ sal_uLong nErrId = pDPs->ReloadCache(pDPObj, aRefs);
+ if (nErrId)
+ return nErrId;
+
+ std::set<ScDPObject*>::iterator it = aRefs.begin(), itEnd = aRefs.end();
for (; it != itEnd; ++it)
{
ScDPObject* pObj = *it;
DataPilotUpdate(pObj, pObj, bRecord, bApi);
}
+
+ return 0;
}
//==================================================================