diff options
author | Armin Le Grand <alg@apache.org> | 2012-07-26 08:16:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-18 15:20:46 +0100 |
commit | 196ec14db1d4f39e25c83517cc7bad4d78ee6572 (patch) | |
tree | b2d42be99a6553a3a4d5d898e985ab95d57fbda4 /sd | |
parent | c0b455a664bae6047992a98e3c991b8b5dc84736 (diff) |
Resolves: #i118267# Add undo actions for adapted arrowhead sizes...
when linewidth is changed
(cherry picked from commit 8e63413dbf514303095790630a2d77d854c3da95)
Change-Id: I538805726ca29e3cdb05dc32577b91b7157d0e0f
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 30 |
1 files changed, 24 insertions, 6 deletions
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; i<nCount; i++) { @@ -295,9 +295,28 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } if(bSetItemSet) + { + if(bUndo) + { + if(!bMergeUndo) + { + pUndoManager->EnterListAction( 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; i<nCount; i++) @@ -319,10 +337,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { aAttr.Put(pObj->GetMergedItemSet()); - 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 ) { |