summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-19 19:12:57 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-19 19:13:48 -0400
commitf1a2c10b72a87a3826861562430fc80e3ffd6048 (patch)
tree2cfa33d1d1c2d6907d9935003103c5de4c88c0f6 /sc
parent95c65a363fa4cd0cbbfa93d53e10d86b3fb275f2 (diff)
Fix a crash on launching the pivot layout dialog with duplicated data fields.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpobject.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 6348b7f5f3fa..9da61d19e706 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2058,6 +2058,9 @@ bool ScDPObject::FillLabelDataForDimension(
rLabelData.mnOriginalDim = static_cast<long>(nOrigPos);
rLabelData.maLayoutName = aLayoutName;
rLabelData.maSubtotalName = aSubtotalName;
+ if (nOrigPos >= 0)
+ // This is a duplicated dimension. Use the original dimension index.
+ nDim = nOrigPos;
GetHierarchies(nDim, rLabelData.maHiers);
GetMembers(nDim, GetUsedHierarchy(nDim), rLabelData.maMembers);
lcl_FillLabelData(rLabelData, xDimProp);