From 196ec14db1d4f39e25c83517cc7bad4d78ee6572 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 26 Jul 2012 08:16:50 +0000 Subject: Resolves: #i118267# Add undo actions for adapted arrowhead sizes... when linewidth is changed (cherry picked from commit 8e63413dbf514303095790630a2d77d854c3da95) Change-Id: I538805726ca29e3cdb05dc32577b91b7157d0e0f --- sd/source/ui/view/drviews2.cxx | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index d474872c60ae..de3c663c994f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -257,8 +257,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SdrObject* pObj = NULL; const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); sal_uLong nCount = rMarkList.GetMarkCount(); - - sal_Int32 nNewLineWidth = ((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue(); + const sal_Int32 nNewLineWidth(((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue()); + const bool bUndo(mpDrawView->IsUndoEnabled()); for (sal_uLong i=0; iEnterListAction( String(), String() ); + mpDrawView->BegUndo(); + bMergeUndo = sal_True; + } + + mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj)); + } + pObj->SetMergedItemSet(aAttr); + } } } + + if(bMergeUndo) + { + mpDrawView->EndUndo(); + } } if (nSId == SID_ATTR_FILL_SHADOW) @@ -306,7 +325,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SdrObject* pObj = NULL; const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); sal_uLong nCount = rMarkList.GetMarkCount(); - const bool bUndo = mpDrawView->IsUndoEnabled(); for (sal_uLong i=0; iGetMergedItemSet()); - const XFillStyleItem& rFillStyle = - (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE); + const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE); + const XLineStyleItem& rLineStyle = (const XLineStyleItem&) aAttr.Get(XATTR_LINESTYLE); - if (rFillStyle.GetValue() == XFILL_NONE) + if(XFILL_NONE == rFillStyle.GetValue() && XLINE_NONE == rLineStyle.GetValue()) { if( bUndo ) { -- cgit