diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/drawvie4.cxx | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 4dd80df9a85a..515118d84c23 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1038,7 +1038,10 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati // order of these lines is important, modify rData.maLastRect carefully it is used as both // a value and a flag for initialisation rData.setShapeRect(GetDocument(), lcl_makeSafeRectangle(rData.getShapeRect()), pObj->IsVisible()); - pObj->SetSnapRect(rData.getShapeRect()); + if (pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE) + pObj->AdjustToMaxRect(rData.getShapeRect()); + else + pObj->SetSnapRect(rData.getShapeRect()); // update 'unrotated anchor' it's the anchor we persist, it must be kept in sync // with the normal Anchor ResizeLastRectFromAnchor( pObj, rNoRotatedAnchor, true, bNegativePage, bCanResize ); diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index e1f0d04da7a4..25c64c2e5ef3 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -569,8 +569,10 @@ void ScDrawView::FitToCellSize() } pUndoGroup->AddAction( std::make_unique<SdrUndoGeoObj>( *pObj ) ); - - pObj->SetSnapRect(aCellRect); + if (pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE) + pObj->AdjustToMaxRect(aCellRect); + else + pObj->SetSnapRect(aCellRect); pUndoGroup->SetComment(ScResId( STR_UNDO_FITCELLSIZE )); ScDocShell* pDocSh = pViewData->GetDocShell(); |