[Libreoffice-commits] core.git: svx/inc svx/source
Stephan Bergmann
sbergman at redhat.com
Mon Aug 25 00:35:35 PDT 2014
svx/inc/sxraitm.hxx | 8 +++-----
svx/source/svdraw/svdattr.cxx | 2 +-
svx/source/svdraw/svdobj.cxx | 4 ++--
3 files changed, 6 insertions(+), 8 deletions(-)
New commits:
commit fe04ce92cd5f32be8a7c8bf237d2f5b53ce0a849
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Aug 25 09:34:43 2014 +0200
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
diff --git a/svx/inc/sxraitm.hxx b/svx/inc/sxraitm.hxx
index 8e913ff..e6b44c1 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 cb790e5..dc43119 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 dc2d8d8..acbd428 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));
More information about the Libreoffice-commits
mailing list