diff options
author | Armin Weiss <aw@openoffice.org> | 2000-10-30 10:50:43 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2000-10-30 10:50:43 +0000 |
commit | 03f7b689c03137352d8caca59d7b7644516b4b9d (patch) | |
tree | 0213fcbeebe0452cd7b3309c45bbed67cecab0f3 /sd/source/ui/func | |
parent | fde9956bbd814be70ffda922424973c849639bf1 (diff) |
change SdrObjects to use SfxItemSet instead of SfxSetItems.
Removed TakeAttributes() and SetAttributes(), new ItemSet
modification methods (GetItem[Set], SetItem[Set], ClearItem,...)
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fucon3d.cxx | 33 | ||||
-rw-r--r-- | sd/source/ui/func/fuconarc.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuconstr.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/func/fuexpand.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fumorph.cxx | 17 | ||||
-rw-r--r-- | sd/source/ui/func/fupage.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/func/fusumry.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 28 |
12 files changed, 106 insertions, 53 deletions
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index db0835c0a7b9..5e66fa7fae67 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fucon3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:26:10 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,6 +100,10 @@ #include "fucon3d.hxx" #include "drawdoc.hxx" +#ifndef _SVX3DITEMS_HXX +#include <svx/svx3ditems.hxx> +#endif + class SfxRequest; class SdDrawDocument; @@ -179,7 +183,8 @@ BOOL FuConst3dObj::MouseButtonDown(const MouseEvent& rMEvt) // Dies ist ein offenes Objekt, muss daher defaultmaessig // doppelseitig behandelt werden - p3DObj->SetDoubleSided(TRUE); +//-/ p3DObj->SetDoubleSided(TRUE); + p3DObj->SetItem(Svx3DDoubleSidedItem(TRUE)); } break; @@ -278,7 +283,8 @@ BOOL FuConst3dObj::MouseButtonDown(const MouseEvent& rMEvt) p3DObj = new E3dLatheObj( pView->Get3DDefaultAttributes(), aXPoly); - ((E3dLatheObj*)p3DObj)->SetHSegments(4); +//-/ ((E3dLatheObj*)p3DObj)->SetHSegments(4); + p3DObj->SetItem(Svx3DHorizontalSegmentsItem(4)); } break; } @@ -297,11 +303,11 @@ BOOL FuConst3dObj::MouseButtonDown(const MouseEvent& rMEvt) Vector3D aMaxVec (aBoundVol.MaxVec ()); double fDeepth = fabs (aMaxVec.Z () - aMinVec.Z ()); - aCamera.SetPRP (Vector3D (0, 0, 1000)); - aCamera.SetPosition (Vector3D (pView->DefaultCamPos ().X (), pView->DefaultCamPos ().Y (), - pView->DefaultCamPos ().Z () + fDeepth / 2)); - aCamera.SetFocalLength(pView->DefaultCamFocal ()); - pScene->SetCamera (aCamera); + aCamera.SetPRP(Vector3D(0, 0, 1000)); + aCamera.SetPosition(Vector3D( + 0.0, 0.0, pView->GetDefaultCamPosZ() + fDeepth / 2)); + aCamera.SetFocalLength(pView->GetDefaultCamFocal()); + pScene->SetCamera(aCamera); switch (nSlotId) { @@ -369,7 +375,11 @@ BOOL FuConst3dObj::MouseButtonDown(const MouseEvent& rMEvt) pScene->FitSnapRectToBoundVol(); SfxItemSet aAttr (pViewShell->GetPool()); - pScene->SetAttributes (aAttr, FALSE); + +//-/ pScene->SetAttributes (aAttr, FALSE); +//-/ SdrBroadcastItemChange aItemChange(*pScene); + pScene->SetItemSetAndBroadcast(aAttr); +//-/ pScene->BroadcastItemChange(aItemChange); bReturn = pView->BegCreateObj(aPnt, (OutputDevice*) NULL, nDrgLog); @@ -383,7 +393,8 @@ BOOL FuConst3dObj::MouseButtonDown(const MouseEvent& rMEvt) // LineStyle rausnehmen aAttr.Put(XLineStyleItem (XLINE_NONE)); - pObj->NbcSetAttributes(aAttr, FALSE); +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } } diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index 114743d654e9..507cb52d850c 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuconarc.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:27:12 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -178,7 +178,9 @@ BOOL FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { SfxItemSet aAttr(pDoc->GetPool()); SetStyleSheet(aAttr, pObj); - pObj->NbcSetAttributes(aAttr, FALSE); + +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } bReturn = TRUE; diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index d4fb936b8439..e93a7ab88f20 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuconbez.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:28:08 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -178,7 +178,9 @@ BOOL FuConstBezPoly::MouseButtonDown(const MouseEvent& rMEvt) { SfxItemSet aAttr(pDoc->GetPool()); SetStyleSheet(aAttr, pObj); - pObj->NbcSetAttributes(aAttr, FALSE); + +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } } diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index 0bde6943bec1..d48ad733834b 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuconrec.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:30:53 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -285,7 +285,9 @@ BOOL FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) SetStyleSheet(aAttr, pObj); SetAttributes(aAttr, pObj); SetLineEnds(aAttr, pObj); - pObj->NbcSetAttributes(aAttr, FALSE); + +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } } diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index c472037fd5e6..a7b2e616a164 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuconstr.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:31:42 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -469,14 +469,18 @@ void FuConstruct::SetStyleSheet(SfxItemSet& rAttr, SdrObject* pObj) // Default-Attr. und Fuellung aus Vorlage zuweisen SfxItemSet aAttr(*pView->GetDefaultAttr().Clone()); aAttr.Put(pSheet->GetItemSet().Get(XATTR_FILLSTYLE)); - pObj->NbcSetAttributes(aAttr, FALSE); + +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } else { // Default-Attr. und "Leere-Fuellung" zuweisen SfxItemSet aAttr(*pView->GetDefaultAttr().Clone()); rAttr.Put(XFillStyleItem(XFILL_NONE)); - pObj->NbcSetAttributes(aAttr, FALSE); + +//-/ pObj->NbcSetAttributes(aAttr, FALSE); + pObj->SetItemSet(aAttr); } } } diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index e1be05b5ebdb..c02a069256ef 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fuexpand.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:48:35 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -234,7 +234,9 @@ FuExpandPage::FuExpandPage(SdViewShell* pViewSh, SdWindow* pWin, SdView* pView, SfxItemSet aAttr(pDoc->GetPool()); aAttr.Put(XLineStyleItem(XLINE_NONE)); aAttr.Put(XFillStyleItem(XFILL_NONE)); - pTextObj->NbcSetAttributes(aAttr, TRUE); + +//-/ pTextObj->NbcSetAttributes(aAttr, TRUE); + pTextObj->SetItemSet(aAttr); } } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 723f3b4023a6..8e2ddb0e87da 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fumorph.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:48:35 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -290,8 +290,11 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade, BOOL bIgnoreLine = FALSE; BOOL bIgnoreFill = FALSE; - pObj1->TakeAttributes( aSet1, TRUE, FALSE ); - pObj2->TakeAttributes( aSet2, TRUE, FALSE ); +//-/ pObj1->TakeAttributes( aSet1, TRUE, FALSE ); + aSet1.Put(pObj1->GetItemSet()); + +//-/ pObj2->TakeAttributes( aSet2, TRUE, FALSE ); + aSet2.Put(pObj2->GetItemSet()); const XLineStyle eLineStyle1 = ITEMVALUE( aSet1, XATTR_LINESTYLE, XLineStyleItem ); const XLineStyle eLineStyle2 = ITEMVALUE( aSet2, XATTR_LINESTYLE, XLineStyleItem ); @@ -361,7 +364,11 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade, if ( bLineWidth ) aSet.Put( XLineWidthItem( nStartLineWidth + (long) ( fFactor * fDelta + 0.5 ) ) ); - pNewObj->SetAttributes( aSet, FALSE ); +//-/ pNewObj->SetAttributes( aSet, FALSE ); +//-/ SdrBroadcastItemChange aItemChange(*pNewObj); + pNewObj->SetItemSetAndBroadcast(aSet); +//-/ pNewObj->BroadcastItemChange(aItemChange); + pObjList->InsertObject( pNewObj, LIST_APPEND ); } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 6fd8bb2a65a2..0514b05a99bc 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fupage.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:48:35 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -316,7 +316,8 @@ FuPage::FuPage( SdViewShell* pViewSh, SdWindow* pWin, SdView* pView, SdrObject* pObj = pPage->GetBackgroundObj(); if( pObj ) { - pObj->TakeAttributes( aMergedAttr, TRUE, TRUE ); +//-/ pObj->TakeAttributes( aMergedAttr, TRUE, TRUE ); + aMergedAttr.Put(pObj->GetItemSet()); } else { @@ -426,7 +427,8 @@ FuPage::FuPage( SdViewShell* pViewSh, SdWindow* pWin, SdView* pView, { // BackgroundObj: no hard attributes allowed SfxItemSet aSet( pDoc->GetPool() ); - pObj->NbcSetAttributes( aSet, TRUE ); +//-/ pObj->NbcSetAttributes( aSet, TRUE ); + pObj->SetItemSet(aSet); } aNewAttr.Put(aTempSet); @@ -553,7 +555,9 @@ FuPage::FuPage( SdViewShell* pViewSh, SdWindow* pWin, SdView* pView, aSize.Height() -= nUpper + nLower - 1; Rectangle aRect( aPos, aSize ); pObj->SetLogicRect( aRect ); - pObj->NbcSetAttributes( *pArgs, FALSE ); + +//-/ pObj->NbcSetAttributes( *pArgs, FALSE ); + pObj->SetItemSet(*pArgs); } /////////////////////////////////////////////////////////////////////////// diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index a61a5adffdce..29e32cdca8e8 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fusel.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:36:51 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1162,7 +1162,10 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) if (bClosed) { SfxItemSet aSet(pDoc->GetPool()); - pObj->TakeAttributes(aSet, TRUE, FALSE); + +//-/ pObj->TakeAttributes(aSet, TRUE, FALSE); + aSet.Put(pObj->GetItemSet()); + const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aSet.Get(XATTR_FILLSTYLE); bFilled = rFillStyle.GetValue() != XFILL_NONE; } diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index 93142a60b1ed..cf050b6d89ca 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fusumry.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:48:36 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -240,7 +240,9 @@ FuSummaryPage::FuSummaryPage(SdViewShell* pViewSh, SdWindow* pWin, SdView* pView SfxItemSet aAttr(pDoc->GetPool()); aAttr.Put(XLineStyleItem(XLINE_NONE)); aAttr.Put(XFillStyleItem(XFILL_NONE)); - pTextObj->NbcSetAttributes(aAttr, TRUE); + +//-/ pTextObj->NbcSetAttributes(aAttr, TRUE); + pTextObj->SetItemSet(aAttr); pView->EndUndo(); delete pOutl; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 88d627b52b9e..ec1734cb7583 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: futempl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:37:36 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -404,7 +404,7 @@ FuTemplate::FuTemplate( SdViewShell* pViewSh, SdWindow* pWin, SdView* pView, // BulletItems if (aTempSet.GetItemState(EE_PARA_BULLET) == SFX_ITEM_SET) { - SvxBulletItem aOldBulItem((SvxBulletItem&)pStyleSheet->GetItemSet().Get(EE_PARA_BULLET)); + SvxBulletItem aOldBulItem((SvxBulletItem&)pStyleSheet->GetItem(EE_PARA_BULLET)); SvxBulletItem& rNewBulItem = (SvxBulletItem&)aTempSet.Get(EE_PARA_BULLET); aOldBulItem.CopyValidProperties(rNewBulItem); aTempSet.Put(aOldBulItem); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 61ff5d9e1a9d..a8f5b8603d21 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: futext.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dl $ $Date: 2000-10-25 10:28:40 $ + * last change: $Author: aw $ $Date: 2000-10-30 11:46:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -624,11 +624,16 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt) aSet.Put(aMinHeight); SdrTextAutoGrowHeightItem aAutoGrowHeight(TRUE); aSet.Put(aAutoGrowHeight); - pTextObj->NbcSetAttributes(aSet, FALSE); + +//-/ pTextObj->NbcSetAttributes(aSet, FALSE); + pTextObj->SetItemSet(aSet); + pTextObj->AdjustTextFrameWidthAndHeight(); SdrTextMaxFrameHeightItem aMaxHeight(pTextObj->GetLogicRect().GetSize().Height()); aSet.Put(aMaxHeight); - pTextObj->NbcSetAttributes(aSet, FALSE); + +//-/ pTextObj->NbcSetAttributes(aSet, FALSE); + pTextObj->SetItemSet(aSet); } if (!pView->EndCreateObj(SDRCREATE_FORCEEND)) @@ -645,7 +650,10 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt) aSet.Put(SdrTextFitToSizeTypeItem(eFTS)); aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); aSet.Put(SdrTextAutoGrowWidthItem(FALSE)); - pTextObj->NbcSetAttributes(aSet, FALSE); + +//-/ pTextObj->NbcSetAttributes(aSet, FALSE); + pTextObj->SetItemSet(aSet); + pTextObj->AdjustTextFrameWidthAndHeight(); SetInEditMode(rMEvt, FALSE); } @@ -662,7 +670,10 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt) aSet.Put(aMaxHeight); SdrTextAutoGrowHeightItem aAutoGrowHeight(TRUE); aSet.Put(aAutoGrowHeight); - pTextObj->NbcSetAttributes(aSet, FALSE); + +//-/ pTextObj->NbcSetAttributes(aSet, FALSE); + pTextObj->SetItemSet(aSet); + pTextObj->AdjustTextFrameWidthAndHeight(); } @@ -744,7 +755,10 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt) aSet.Put(aAutoGrowWidth); SdrTextHorzAdjustItem aTextHorzAdjust(SDRTEXTHORZADJUST_LEFT); aSet.Put(aTextHorzAdjust); - pTextObj->NbcSetAttributes(aSet, FALSE); + +//-/ pTextObj->NbcSetAttributes(aSet, FALSE); + pTextObj->SetItemSet(aSet); + pTextObj->SetDisableAutoWidthOnDragging(TRUE); SetInEditMode(rMEvt, FALSE); } |