svx/source/svdraw/svdedtv1.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aaff8a5cde6b3df9efdf4cf18157c9318c463e1a
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Dec 22 11:52:32 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Dec 22 16:46:11 2021 +0100

    tdf#146363: fix crash when changing width/height of text box
    
    Regression from e6c7a018a0cfee395ce2886d41c908a2447ef5cc
    tdf#126180: EndTextEdit on all views before delete/cut slide
    
    Just declare and initialize nMarkCount later since calls
    to methods like ResizeMultMarkedObj or RotateMarkedObj may change the result
    
    Change-Id: Ic2a07a6f41b8052dcc3c2736205e1b9c6d538233
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127308
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 0cc7cc0019a8..3af57b7da229 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1539,7 +1539,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr, bool addPageMargin
     Degree100 nOldRotateAngle=GetMarkedObjRotate();
     Degree100 nOldShearAngle=GetMarkedObjShear();
     const SdrMarkList& rMarkList=GetMarkedObjectList();
-    const size_t nMarkCount=rMarkList.GetMarkCount();
     SdrObject* pObj=nullptr;
 
     RectPoint eSizePoint=RectPoint::MM;
@@ -1751,6 +1750,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr, bool addPageMargin
         MoveMarkedObj(Size(nPosDX,nPosDY));
     }
 
+    const size_t nMarkCount=rMarkList.GetMarkCount();
     // protect position
     if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, 
true, &pPoolItem))
     {

Reply via email to