summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-03-24 14:13:48 +0100
committerLászló Németh <nemeth@numbertext.org>2020-04-01 11:19:59 +0200
commit61aa663d9b1d75d1bb0cfc7c4c9e4cb17d8dd00a (patch)
tree249d530f38f637c08d3623a9cdbd77974707dbf0 /chart2/source/tools
parentf370aa88faf3c0ef7138b87d2bcf89f5eb8541c1 (diff)
tdf#130969 Chart view: fix incorrect precision of axis labels
Use UNLIMITED_PRECISION in case of GENERAL number format of labels in embedded charts, just like we do in Calc. Regression from commit: 7f373a4c88961348f35e4f990182628488878efe (tdf#48041 Chart: do not duplicate major value) Change-Id: I298353d748f34e23bc642b3b0c365df6e73c23aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90984 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/NumberFormatterWrapper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx
index a585c04b7dc3..50f6dc7fb132 100644
--- a/chart2/source/tools/NumberFormatterWrapper.cxx
+++ b/chart2/source/tools/NumberFormatterWrapper.cxx
@@ -105,6 +105,9 @@ OUString NumberFormatterWrapper::getFormattedString( sal_Int32 nNumberFormatKey,
m_aNullDate >>= aNewNullDate;
m_pNumberFormatter->ChangeNullDate(aNewNullDate.Day,aNewNullDate.Month,aNewNullDate.Year);
}
+ // tdf#130969: use UNLIMITED_PRECISION in case of GENERAL Number Format
+ if( m_pNumberFormatter->GetStandardPrec() != SvNumberFormatter::UNLIMITED_PRECISION )
+ m_pNumberFormatter->ChangeStandardPrec(SvNumberFormatter::UNLIMITED_PRECISION);
m_pNumberFormatter->GetOutputString(fValue, nNumberFormatKey, aText, &pTextColor);
if ( m_aNullDate.hasValue() )
{