Kaydet (Commit) d4867dda authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Fraction: Revert "conversion to double should not be necessary"

This reverts commit 166eaf21.
üst 0bab8aee
...@@ -822,13 +822,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati ...@@ -822,13 +822,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
Size aSizeMove(aNew.Left()-aOld.Left(), aNew.Top()-aOld.Top()); Size aSizeMove(aNew.Left()-aOld.Left(), aNew.Top()-aOld.Top());
pObj->NbcMove(aSizeMove); pObj->NbcMove(aSizeMove);
boost::rational<sal_Int64> aXFrac; double fXFrac = static_cast<double>(aNew.GetWidth()) / static_cast<double>(aOld.GetWidth());
boost::rational<sal_Int64> aYFrac; double fYFrac = static_cast<double>(aNew.GetHeight()) / static_cast<double>(aOld.GetHeight());
if (aOld.GetWidth() != 0) pObj->NbcResize(aNew.TopLeft(), rational_FromDouble(fXFrac), rational_FromDouble(fYFrac));
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 // order of these lines is important, modify rData.maLastRect carefully it is used as both
// a value and a flag for initialisation // a value and a flag for initialisation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment