summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index aeb2c8012674..7f0f948a4d85 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3264,7 +3264,12 @@ void ChartExport::exportDataLabels(
if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
mAny >>= bLinkedNumFmt;
- if (GetProperty(xPropSet, "NumberFormat") || GetProperty(xPropSet, "PercentageNumberFormat"))
+ chart2::DataPointLabel aLabel;
+ bool bLabelIsNumberFormat = true;
+ if( xPropSet->getPropertyValue("Label") >>= aLabel )
+ bLabelIsNumberFormat = aLabel.ShowNumber;
+
+ if (GetProperty(xPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
{
sal_Int32 nKey = 0;
mAny >>= nKey;
@@ -3337,7 +3342,12 @@ void ChartExport::exportDataLabels(
pFS->startElement(FSNS(XML_c, XML_dLbl));
pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, OString::number(nIdx));
- if (GetProperty(xLabelPropSet, "NumberFormat") || GetProperty(xLabelPropSet, "PercentageNumberFormat"))
+ if( xLabelPropSet->getPropertyValue("Label") >>= aLabel )
+ bLabelIsNumberFormat = aLabel.ShowNumber;
+ else
+ bLabelIsNumberFormat = true;
+
+ if (GetProperty(xLabelPropSet, bLabelIsNumberFormat ? OUString("NumberFormat") : OUString("PercentageNumberFormat")))
{
sal_Int32 nKey = 0;
mAny >>= nKey;