diff options
author | Dennis Francis <dennis.francis@collabora.co.uk> | 2017-07-05 11:44:58 +0530 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-07-06 23:16:05 +0200 |
commit | 2d66c7d4e710a4407b4d6685b3b41f3841d6da11 (patch) | |
tree | 823a4de408c783d18f6b4eb10ae3a0c6bdf35ec3 /sc/source/ui/unoobj/PivotTableDataProvider.cxx | |
parent | 893f77094139bfc2befaf4947126aae97fee137f (diff) |
tdf#108923 : Use display string for generating chart labels
Use display string for generating chart labels in
PivotTableDataProvider::collectPivotTableData as chart2
does not seem to use number format for labels although it
does for the data.
Added unit test PivotChartTest::testPivotChartWithDateRowField()
for this fix.
Change-Id: I668d4c9d7cf8bbb7e4213cce7a6e7cd4d7d07cbe
Reviewed-on: https://gerrit.libreoffice.org/39548
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 5eeed755a2eadbadd7a2e0c06216258af028a96e)
Reviewed-on: https://gerrit.libreoffice.org/39654
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc/source/ui/unoobj/PivotTableDataProvider.cxx')
-rw-r--r-- | sc/source/ui/unoobj/PivotTableDataProvider.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index d412265b033c..050f91122323 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -459,11 +459,8 @@ void PivotTableDataProvider::collectPivotTableData() { if (!bHasContinueFlag) { - double fValue = rMember.Value; - if (rtl::math::isNan(fValue)) - pItem.reset(new ValueAndFormat(rMember.Caption)); - else - pItem.reset(new ValueAndFormat(fValue, nNumberFormat)); + // Chart2 does not use number format for labels, so use the display string. + pItem.reset(new ValueAndFormat(rMember.Caption)); } if (bFound) |