From 47a2d7642d249d70b5da0c330a73f3a0032e4bba Mon Sep 17 00:00:00 2001 From: Juan Picca Date: Fri, 19 Sep 2014 14:19:30 -0300 Subject: fdo#81356: convert Fraction to boost::rational - wip * Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon Tested-by: David Tardon --- svx/source/svdraw/svdouno.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx/source/svdraw/svdouno.cxx') diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 3c5f21ede3c0..eceb1f3f9844 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -320,7 +320,7 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj) return *this; } -void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) +void SdrUnoObj::NbcResize(const Point& rRef, const boost::rational& xFact, const boost::rational& yFact) { SdrRectObj::NbcResize(rRef,xFact,yFact); -- cgit