diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-06-08 14:26:33 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-10 11:38:32 +0200 |
commit | f66fbd4fb5fd557d6065aeea987b3dafdc30a430 (patch) | |
tree | b1b6bbeccc8773ad4e39c978909e6634c6513dc4 /oox | |
parent | 0c0f4b1531e2e985bd53e8c551328f46bde0c8c9 (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>
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; } |