diff options
author | Dennis Francis <dennis.francis@collabora.co.uk> | 2017-07-05 11:44:58 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-07-06 10:58:06 +0200 |
commit | 5eeed755a2eadbadd7a2e0c06216258af028a96e (patch) | |
tree | 1131f65626efa35158b632a7982b2f8c74647c02 /sc | |
parent | 3a60c959663cdd054675310e3c6f163791304754 (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>
Diffstat (limited to 'sc')
-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 7e13f3429eb7..7247e49495d4 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -460,11 +460,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) |