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 ...@@ -822,9 +822,13 @@ 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);
double fXFrac = static_cast<double>(aNew.GetWidth()) / static_cast<double>(aOld.GetWidth()); boost::rational<sal_Int64> aXFrac;
double fYFrac = static_cast<double>(aNew.GetHeight()) / static_cast<double>(aOld.GetHeight()); boost::rational<sal_Int64> aYFrac;
pObj->NbcResize(aNew.TopLeft(), rational_FromDouble(fXFrac), rational_FromDouble(fYFrac)); 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 // 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