sc/source/core/data/drwlayer.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit eee86d79d7b8ac44be44807e4d5974f4a2592e32 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Sun Jan 8 16:41:57 2012 -0500 Handle resizing of cell-anchored polyline objects as well. This should take care of correctly resizing cell-anchored polyline objects when resizing row height / column width. diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index cdbb95d..74c9d35 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -794,6 +794,17 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati if (bRecording) AddCalcUndo( new SdrUndoGeoObj( *pObj ) ); rData.maLastRect = lcl_makeSafeRectangle(aNew); + if (pObj->IsPolyObj()) + { + // Polyline objects need special treatment. + 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(), Fraction(fXFrac), Fraction(fYFrac)); + } + pObj->SetLogicRect(rData.maLastRect); } } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits