Kaydet (Commit) 166eaf21 authored tarafından David Tardon's avatar David Tardon

conversion to double should not be necessary

Change-Id: I12ad83453b68077fe672576680b0cd5fd9acf49f
üst a29301cf
......@@ -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
......
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