diff options
author | Jürgen Schmidt <jsc@apache.org> | 2011-10-19 09:35:16 +0000 |
---|---|---|
committer | Jürgen Schmidt <jsc@apache.org> | 2011-10-19 09:35:16 +0000 |
commit | c13162c59402230bdd8f46300bbfa8142c4e01b7 (patch) | |
tree | b4056f4c6997a83842f319eeb3801b9309cad0b1 /sd | |
parent | 6bf17dc7ffa79f52458df707c9da798951e19b2e (diff) |
#118524: apply patch, followup fixes to 118485, thanks to Armin Le Grand (alg)
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/docshell/sdclient.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx index bb1cd14f87f5..bfc4acd95a25 100644 --- a/sd/source/ui/docshell/sdclient.cxx +++ b/sd/source/ui/docshell/sdclient.cxx @@ -142,10 +142,29 @@ void Client::ObjectAreaChanged() if (rMarkList.GetMarkCount() == 1) { SdrMark* pMark = rMarkList.GetMark(0); - SdrObject* pObj = pMark->GetMarkedSdrObj(); + SdrOle2Obj* pObj = dynamic_cast< SdrOle2Obj* >(pMark->GetMarkedSdrObj()); - // no need to check for changes, this method is called only if the area really changed - pObj->SetLogicRect( GetScaledObjArea() ); + if(pObj) + { + // no need to check for changes, this method is called only if the area really changed + Rectangle aNewRectangle(GetScaledObjArea()); + + // #i118524# if sheared/rotated, center to non-rotated LogicRect + pObj->setSuppressSetVisAreaSize(true); + + if(pObj->GetGeoStat().nDrehWink || pObj->GetGeoStat().nShearWink) + { + pObj->SetLogicRect( aNewRectangle ); + + const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); + + aNewRectangle.Move(aDelta.X(), aDelta.Y()); + } + + pObj->SetLogicRect( aNewRectangle ); + pObj->setSuppressSetVisAreaSize(false); + } } } |