diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2018-02-19 18:18:20 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-02-28 09:08:23 +0100 |
commit | 61e3140a9ccf22fd19df0578d61833f8a1abbe08 (patch) | |
tree | ee718f563d6fa2d4492653aac9616027333415e1 /oox/source | |
parent | ca254244a22cdbb7d04dc15171624ea979ddfae1 (diff) |
tdf#115859 Export number format for chart series
Change-Id: I65d30c6b92a530eadbd6fabe87fa8bd3416fee20
Reviewed-on: https://gerrit.libreoffice.org/50395
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/chartexport.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 128a166c6c4a..4e789f9b3c97 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2930,6 +2930,24 @@ void ChartExport::exportDataLabels( FSHelperPtr pFS = GetFS(); pFS->startElement(FSNS(XML_c, XML_dLbls), FSEND); + bool bLinkedNumFmt = true; + if (GetProperty(xPropSet, "LinkNumberFormatToSource")) + mAny >>= bLinkedNumFmt; + + if (GetProperty(xPropSet, "NumberFormat")) + { + sal_Int32 nKey = 0; + mAny >>= nKey; + + OUString aNumberFormatString = getNumberFormatCode(nKey); + OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8); + + pFS->singleElement(FSNS(XML_c, XML_numFmt), + XML_formatCode, sNumberFormatString.getStr(), + XML_sourceLinked, bLinkedNumFmt ? "1" : "0", + FSEND); + } + uno::Sequence<sal_Int32> aAttrLabelIndices; xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices; |