diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2017-02-15 23:27:34 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-02-20 18:35:18 +0000 |
commit | 5706b29974c1c3ab0ba5a23685accf2fbebc3e06 (patch) | |
tree | 9af9c43945ae83c417e59ff3eabff5d90ddaf974 /sc/source | |
parent | fc711de31b57e0f4d4c4615ef4fd201425cd9f47 (diff) |
tdf#105657 Treat "Precision as shown" for fractions
For Option "Precision as shown",
fraction must specificly be treated
ImpGetFractionElements retrieves values of each part
of fraction (integer, numerator, denominator)
independently from its exact representation
Update: avoid include of zformat.hxx in document4.cxx
Change-Id: Ia3ea2322f3d311c04ef71f3260730c7154c3dc15
Reviewed-on: https://gerrit.libreoffice.org/34331
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/documen4.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index c503b2fa6137..09b7c543e7e8 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -672,6 +672,10 @@ double ScDocument::RoundValueAsShown( double fVal, sal_uInt32 nFormat ) const nPrecision = sal::static_int_cast<short>( nPrecision - (short)floor( log10( -fVal ) ) ); break; } + case css::util::NumberFormat::FRACTION: // get value of fraction representation + { + return GetFormatTable()->GetRoundFractionValue( nFormat, fVal ); + } } } else |