From 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 16 Oct 2014 15:30:32 +0200 Subject: fdo#84854 it seems long is not enough on 32 bit Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5 --- sw/source/filter/writer/wrtswtbl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/filter/writer') diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 3285e1379636..9de933c11aa6 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -344,7 +344,7 @@ sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con { long nWidth = GetRawWidth( nCol, nColSpan ); - return (sal_uInt16) boost::rational_cast(boost::rational(nWidth * 256 + GetBaseWidth() / 2, GetBaseWidth())); + return (sal_uInt16) boost::rational_cast(boost::rational(nWidth * 256 + GetBaseWidth() / 2, GetBaseWidth())); } sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const @@ -353,7 +353,7 @@ sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con // Looks funny, but is nothing more than // [(100 * nWidth) + .5] without rounding errors - return (sal_uInt16) boost::rational_cast(boost::rational(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth())); + return (sal_uInt16) boost::rational_cast(boost::rational(nWidth * 100 + GetBaseWidth() / 2, GetBaseWidth())); } long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow, -- cgit v1.2.3