diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 17:22:06 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 18:34:34 +0200 |
commit | 858c2a2977d5e4671959724ecd2a453837dadddf (patch) | |
tree | a61e303e6e27cef015c50b38b23fc574ce64fcef /tools/source | |
parent | ff502f409fd73249a6a94c579d19905144aa5ba8 (diff) |
Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.
Conflicts:
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/rational.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/source/generic/rational.cxx b/tools/source/generic/rational.cxx index f99bdfa94bb2..7edf4134952d 100644 --- a/tools/source/generic/rational.cxx +++ b/tools/source/generic/rational.cxx @@ -15,7 +15,7 @@ // If dVal > LONG_MAX or dVal < LONG_MIN, the rational throws a boost::bad_rational. // Otherwise, dVal and denominator are multiplied with 10, until one of them // is larger than (LONG_MAX / 10). -boost::rational<sal_Int64> rational_FromDouble(double dVal) +boost::rational<long> rational_FromDouble(double dVal) { long nDen = 1; long nMAX = LONG_MAX / 10; @@ -30,7 +30,7 @@ boost::rational<sal_Int64> rational_FromDouble(double dVal) dVal *= 10; nDen *= 10; } - return boost::rational<sal_Int64>((long) dVal, nDen); + return boost::rational<long>((long) dVal, nDen); } // Similar to clz_table that can be googled @@ -114,7 +114,7 @@ static int impl_NumberOfBits( unsigned long nNum ) A ReduceInaccurate(8) yields 1/1. */ -void rational_ReduceInaccurate(boost::rational<sal_Int64>& rRational, unsigned nSignificantBits) +void rational_ReduceInaccurate(boost::rational<long>& rRational, unsigned nSignificantBits) { if ( !rRational ) return; @@ -148,7 +148,7 @@ void rational_ReduceInaccurate(boost::rational<sal_Int64>& rRational, unsigned n rRational.assign( bNeg? -long( nMul ): long( nMul ), nDiv ); } -SvStream& ReadFraction(SvStream& rIStream, boost::rational<sal_Int64>& rRational) +SvStream& ReadFraction(SvStream& rIStream, boost::rational<long>& rRational) { sal_Int32 nTmpNumerator(0), nTmpDenominator(0); rIStream.ReadInt32( nTmpNumerator ); @@ -162,7 +162,7 @@ SvStream& ReadFraction(SvStream& rIStream, boost::rational<sal_Int64>& rRational return rIStream; } -SvStream& WriteFraction(SvStream& rOStream, const boost::rational<sal_Int64>& rRational) +SvStream& WriteFraction(SvStream& rOStream, const boost::rational<long>& rRational) { //fdo#39428 SvStream no longer supports operator<<(long) rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rRational.numerator()) ); |