sdclient.cxx (cdf0e10c) | sdclient.cxx (079eb148) |
---|---|
1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * --- 128 unchanged lines hidden (view full) --- 137 138void Client::ObjectAreaChanged() 139{ 140 ::sd::View* pView = mpViewShell->GetView(); 141 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 142 if (rMarkList.GetMarkCount() == 1) 143 { 144 SdrMark* pMark = rMarkList.GetMark(0); | 1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * --- 128 unchanged lines hidden (view full) --- 137 138void Client::ObjectAreaChanged() 139{ 140 ::sd::View* pView = mpViewShell->GetView(); 141 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 142 if (rMarkList.GetMarkCount() == 1) 143 { 144 SdrMark* pMark = rMarkList.GetMark(0); |
145 SdrObject* pObj = pMark->GetMarkedSdrObj(); | 145 SdrOle2Obj* pObj = dynamic_cast< SdrOle2Obj* >(pMark->GetMarkedSdrObj()); |
146 | 146 |
147 // no need to check for changes, this method is called only if the area really changed 148 pObj->SetLogicRect( GetScaledObjArea() ); | 147 if(pObj) 148 { 149 // no need to check for changes, this method is called only if the area really changed 150 Rectangle aNewRectangle(GetScaledObjArea()); 151 152 // #i118524# if sheared/rotated, center to non-rotated LogicRect 153 pObj->setSuppressSetVisAreaSize(true); 154 155 if(pObj->GetGeoStat().nDrehWink || pObj->GetGeoStat().nShearWink) 156 { 157 pObj->SetLogicRect( aNewRectangle ); 158 159 const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); 160 const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); 161 162 aNewRectangle.Move(aDelta.X(), aDelta.Y()); 163 } 164 165 pObj->SetLogicRect( aNewRectangle ); 166 pObj->setSuppressSetVisAreaSize(false); 167 } |
149 } 150} 151 152/************************************************************************* 153|* 154|* 155|* 156\************************************************************************/ --- 77 unchanged lines hidden --- | 168 } 169} 170 171/************************************************************************* 172|* 173|* 174|* 175\************************************************************************/ --- 77 unchanged lines hidden --- |