summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpobject.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r--sc/source/core/data/dpobject.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index bab39888eae1..4dca25862ab8 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1840,10 +1840,16 @@ bool ScDPObject::FillLabelDataForDimension(
xDimProp, OUString(SC_UNO_DP_FIELD_SUBTOTALNAME), OUString());
bool bIsValue = true; //! check
+
+ // Name from the UNO dimension object may have trailing '*'s in which
+ // case it's a duplicate dimension. Convert that to a duplicate index.
+
+ sal_uInt8 nDupCount = ScDPUtil::getDuplicateIndex(aFieldName);
aFieldName = ScDPUtil::getSourceDimensionName(aFieldName);
rLabelData.maName = aFieldName;
rLabelData.mnCol = static_cast<SCCOL>(nDim);
+ rLabelData.mnDupCount = nDupCount;
rLabelData.mbDataLayout = bData;
rLabelData.mbIsValue = bIsValue;