sc/source/core/data/drwlayer.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 166eaf213b3d43e54f2f5206d9680f75f720847f Author: David Tardon <dtar...@redhat.com> Date: Tue Oct 21 10:05:31 2014 +0200 conversion to double should not be necessary Change-Id: I12ad83453b68077fe672576680b0cd5fd9acf49f diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 672c860..c51b58f 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -822,9 +822,13 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati Size aSizeMove(aNew.Left()-aOld.Left(), aNew.Top()-aOld.Top()); pObj->NbcMove(aSizeMove); - double fXFrac = static_cast<double>(aNew.GetWidth()) / static_cast<double>(aOld.GetWidth()); - double fYFrac = static_cast<double>(aNew.GetHeight()) / static_cast<double>(aOld.GetHeight()); - pObj->NbcResize(aNew.TopLeft(), rational_FromDouble(fXFrac), rational_FromDouble(fYFrac)); + boost::rational<sal_Int64> aXFrac; + boost::rational<sal_Int64> aYFrac; + if (aOld.GetWidth() != 0) + aXFrac.assign(aNew.GetWidth(), aOld.GetWidth()); + if (aOld.GetHeight() != 0) + aYFrac.assign(aNew.GetHeight(), aOld.GetHeight()); + pObj->NbcResize(aNew.TopLeft(), aXFrac, aYFrac); } // order of these lines is important, modify rData.maLastRect carefully it is used as both // a value and a flag for initialisation _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits