diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-25 09:34:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-25 09:34:43 +0200 |
commit | fe04ce92cd5f32be8a7c8bf237d2f5b53ce0a849 (patch) | |
tree | 0a651ecccbb96158261233809866518705e944ed /svx | |
parent | a00778f9d3c1ad3e09ee6519e4523c9ff96f9920 (diff) |
Consistency around SdrAngleItem in svx/inc/sxraitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: If88f88cfe0144b83b3228650a34d9bf2c468b936
Diffstat (limited to 'svx')
-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)); |