summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-10 23:48:17 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-10 23:52:02 -0500
commit3db92283955741b490dc2d4f9e1782b179fee894 (patch)
tree657a1fd95d1c8d3d0380744d3b67a77bba6cb032 /sc/source/ui/docshell
parent6fae3211507884e23b305c1f55e7b1be7951f7a9 (diff)
fdo#59084: Sync dimension members after reloading the group data.
Else the syncing would end up syncing to the older version of the group data before the reload, which (as you can see in the bug report) may lead to a crash. Change-Id: Ibd674a97a59205e5e28efd007f8857731e8df4d3
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 4d0d2ec61b64..94d4f1f7a024 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1319,6 +1319,8 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pDestObj )
{
pDestObj->ReloadGroupTableData();
+ if (!pDestObj->SyncAllDimensionMembers())
+ return false;
pDestObj->InvalidateData(); // before getting the new output area
// make sure the table has a name (not set by dialog)
@@ -1461,11 +1463,10 @@ sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi)
for (; it != itEnd; ++it)
{
ScDPObject* pObj = *it;
- if (!pObj->SyncAllDimensionMembers())
- continue;
// This action is intentionally not undoable since it modifies cache.
- DataPilotUpdate(pObj, pObj, false, bApi);
+ if (!DataPilotUpdate(pObj, pObj, false, bApi))
+ continue;
}
return 0;