diff options
Diffstat (limited to 'sc/source/core/data/drwlayer.cxx')
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index bb309b72bea6..e664e8fbb1a5 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -822,13 +822,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati Size aSizeMove(aNew.Left()-aOld.Left(), aNew.Top()-aOld.Top()); pObj->NbcMove(aSizeMove); - 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); + 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)); } // order of these lines is important, modify rData.maLastRect carefully it is used as both // a value and a flag for initialisation |