diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-06-08 14:26:33 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-16 13:08:09 +0200 |
commit | 8cde18843c155531c3a735e1e825f54aa671a47e (patch) | |
tree | 1ff22161d23c48edf810cdd2aac70757cd5e6ce3 /oox | |
parent | eb6290410e699841b805ef75df393d72bf50baaa (diff) |
tdf#91250 Chart DOCX Import: Fix decimal place formatting issue
Use UNLIMITED_PRECISION in case of GENERAL number format of CATEGORY
axis labels in embedded charts, just like Calc does.
Change-Id: I30cb50955c67824bd1aa88fb139618ce0f0974fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95802
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit f2a7f1bb080d882fd23b63a4f7a4833d6691b6e7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95985
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/datasourcecontext.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx index 7ad910af65d4..16cd509e4a63 100644 --- a/oox/source/drawingml/chart/datasourcecontext.cxx +++ b/oox/source/drawingml/chart/datasourcecontext.cxx @@ -127,6 +127,9 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars ) double fValue = rChars.toDouble(); ::Color* pColor = nullptr; OUString aFormattedValue; + // tdf#91250: use UNLIMITED_PRECISION in case of GENERAL Number Format of category axis labels + if( pNumFrmt->GetStandardPrec() != SvNumberFormatter::UNLIMITED_PRECISION ) + pNumFrmt->ChangeStandardPrec(SvNumberFormatter::UNLIMITED_PRECISION); pNumFrmt->GetOutputString( fValue, nKey, aFormattedValue, &pColor ); mrModel.maData[ mnPtIndex ] <<= aFormattedValue; } |