diff options
-rw-r--r-- | svx/inc/sxraitm.hxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/svx/inc/sxraitm.hxx b/svx/inc/sxraitm.hxx index 8e913ffeb8e9..e6b44c1d0d86 100644 --- a/svx/inc/sxraitm.hxx +++ b/svx/inc/sxraitm.hxx @@ -22,11 +22,9 @@ #include <svx/svddef.hxx> #include <svx/sdangitm.hxx> -class SdrRotateAngleItem: public SdrAngleItem { -public: - SdrRotateAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_ROTATEANGLE,nAngle) {} - SdrRotateAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_ROTATEANGLE,rIn) {} -}; +inline SdrAngleItem makeSdrRotateAngleItem(long nAngle) { + return SdrAngleItem(SDRATTR_ROTATEANGLE, nAngle); +} #endif diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index cb790e5e2b00..dc431195a03c 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -218,7 +218,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem; mppLocalPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem; mppLocalPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem; - mppLocalPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrRotateAngleItem; + mppLocalPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_ROTATEANGLE, 0); mppLocalPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem; mppLocalPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem; mppLocalPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index dc2d8d8da08a..acbd4285ab27 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2179,7 +2179,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) } } if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SFX_ITEM_SET) { - long n=((const SdrRotateAngleItem*)pPoolItem)->GetValue(); + long n=((const SdrAngleItem*)pPoolItem)->GetValue(); n-=GetRotateAngle(); if (n!=0) { double nSin=sin(n*nPi180); @@ -2289,7 +2289,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, bool bMerge) const lcl_SetItem(rAttr,bMerge,makeSdrObjSizeProtectItem(IsResizeProtect())); lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable())); lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible())); - lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle())); + lcl_SetItem(rAttr,bMerge,makeSdrRotateAngleItem(GetRotateAngle())); lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle())); lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1)); lcl_SetItem(rAttr,bMerge,SdrOneSizeHeightItem(rSnap.GetHeight()-1)); |