summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2017-02-15 23:27:34 +0100
committerEike Rathke <erack@redhat.com>2017-04-10 15:46:30 +0200
commit9f70f8761a8cc180171022ffcffc0094c4957057 (patch)
tree8248d77488f3a95fdf45935ebbe7f030c7c3d44d /sc
parent32f2370ac805513c4a968bd461d08f66958651d7 (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> (cherry picked from commit 5706b29974c1c3ab0ba5a23685accf2fbebc3e06) Reviewed-on: https://gerrit.libreoffice.org/36365 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen4.cxx4
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