diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-24 14:18:22 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-04-24 14:18:22 +0000 |
commit | 81e9ede3e748a40555e87efd1af19521dab5261d (patch) | |
tree | a1a381970fef97282390f55d30550206d175f565 /sd | |
parent | 8120312665d94223a1e506fb6f46d2e0e9bc30ad (diff) |
i122121 moded automatic StartEnd adaption to svx
Notes
Notes:
merged as: 2db68b8740422ddd19871a17b33fad31821ec2fd
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index cea20a02f767..5c8467e6b546 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -174,135 +174,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if( rReq.GetArgs() ) { - sal_Bool bMergeUndo = sal_False; - ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager(); - - // Anpassungen Start/EndWidth #63083# - if(nSId == SID_ATTR_LINE_WIDTH) - { - SdrObject* pObj = NULL; - const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); - sal_uLong nCount = rMarkList.GetMarkCount(); - 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++) - { - SfxItemSet aAttr(GetDoc()->GetPool()); - pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - aAttr.Put(pObj->GetMergedItemSet()); - - sal_Int32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue(); - - if(nActLineWidth != nNewLineWidth) - { - sal_Bool bSetItemSet(sal_False); - - // #86265# do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET - if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINESTARTWIDTH)) - { - sal_Int32 nValAct = ((const XLineStartWidthItem&)aAttr.Get(XATTR_LINESTARTWIDTH)).GetValue(); - sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); - if(nValNew < 0) - nValNew = 0; - bSetItemSet = sal_True; - aAttr.Put(XLineStartWidthItem(nValNew)); - } - - // #86265# do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET - if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINEENDWIDTH)) - { - sal_Int32 nValAct = ((const XLineEndWidthItem&)aAttr.Get(XATTR_LINEENDWIDTH)).GetValue(); - sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); - if(nValNew < 0) - nValNew = 0; - bSetItemSet = sal_True; - aAttr.Put(XLineEndWidthItem(nValNew)); - } - - 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) - { - // Ggf. werden transparente Objekte wei?gefuellt - 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++) - { - SfxItemSet aAttr(GetDoc()->GetPool()); - pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - - // #i25616# - if(!pObj->ISA(SdrGrafObj)) - { - aAttr.Put(pObj->GetMergedItemSet()); - - const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE); - const XLineStyleItem& rLineStyle = (const XLineStyleItem&) aAttr.Get(XATTR_LINESTYLE); - - if(XFILL_NONE == rFillStyle.GetValue() && XLINE_NONE == rLineStyle.GetValue()) - { - if( bUndo ) - { - // Vorlage hat keine Fuellung, - // daher hart attributieren: Fuellung setzen - if (!bMergeUndo) - { - bMergeUndo = sal_True; - pUndoManager->EnterListAction( String(), String() ); - mpDrawView->BegUndo(); - } - - mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj)); - } - - aAttr.Put(XFillStyleItem(XFILL_SOLID)); - aAttr.Put(XFillColorItem(String(), COL_WHITE)); - - pObj->SetMergedItemSet(aAttr); - } - } - } - - if (bMergeUndo) - { - mpDrawView->EndUndo(); - } - } - mpDrawView->SetAttributes(*rReq.GetArgs()); - - if (bMergeUndo) - { - pUndoManager->LeaveListAction(); - } - rReq.Done(); } else |