diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 13:37:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 13:37:27 +0200 |
commit | bebe30e917ebd3bd0ce43efca737caa478fddaee (patch) | |
tree | 1e0f3f4573ccd4d65d0e0264e8675f1e51463d63 /include | |
parent | 407d23baceaf7014d24d631ad308c9defd4d44d0 (diff) |
Consistency around SfxUInt32Item in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I3193eab34a34c051002adeedd8b368e26f55f7a3
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/extrud3d.hxx | 2 | ||||
-rw-r--r-- | include/svx/lathe3d.hxx | 6 | ||||
-rw-r--r-- | include/svx/scene3d.hxx | 4 | ||||
-rw-r--r-- | include/svx/sphere3d.hxx | 4 | ||||
-rw-r--r-- | include/svx/svx3ditems.hxx | 40 |
5 files changed, 25 insertions, 31 deletions
diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx index 844d94ecd5ea..053f0e931e7a 100644 --- a/include/svx/extrud3d.hxx +++ b/include/svx/extrud3d.hxx @@ -59,7 +59,7 @@ public: // BackScale: 0..100, before 0.0..1.0 sal_uInt32 GetExtrudeDepth() const - { return ((const Svx3DDepthItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); } // #107245# GetSmoothNormals() for bExtrudeSmoothed bool GetSmoothNormals() const diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx index 6eb38545b4fa..c1bbf1b711b1 100644 --- a/include/svx/lathe3d.hxx +++ b/include/svx/lathe3d.hxx @@ -52,11 +52,11 @@ private: // HorizontalSegments: sal_uInt32 GetHorizontalSegments() const - { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } // VerticalSegments: sal_uInt32 GetVerticalSegments() const - { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } // PercentDiagonal: 0..100, before 0.0..0.5 sal_uInt16 GetPercentDiagonal() const @@ -68,7 +68,7 @@ private: // EndAngle: 0..10000 sal_uInt32 GetEndAngle() const - { return ((const Svx3DEndAngleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); } // #107245# GetSmoothNormals() for bLatheSmoothed bool GetSmoothNormals() const diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index eb19807f19fb..e7a7419efabb 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -108,11 +108,11 @@ public: // Distance: double GetDistance() const - { return (double)((const Svx3DDistanceItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); } + { return (double)((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); } // Focal length: before cm, now 1/10th mm (*100) double GetFocalLength() const - { return ((const Svx3DFocalLengthItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } // Two sided lighting: bool GetTwoSidedLighting() const diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx index 0023d6fd0192..348fbc56b2f7 100644 --- a/include/svx/sphere3d.hxx +++ b/include/svx/sphere3d.hxx @@ -49,11 +49,11 @@ public: // horizontal segments: sal_uInt32 GetHorizontalSegments() const - { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } // VerticalSegments: sal_uInt32 GetVerticalSegments() const - { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE; virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const SAL_OVERRIDE; diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx index 9e63e24cc1a7..8878bc140a1c 100644 --- a/include/svx/svx3ditems.hxx +++ b/include/svx/svx3ditems.hxx @@ -40,25 +40,21 @@ public: SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100); }; -class Svx3DDepthItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000); -}; +inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal); +} -class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item { -public: - Svx3DHorizontalSegmentsItem(sal_uInt32 nVal = 24); -}; +inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal); +} -class Svx3DVerticalSegmentsItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24); -}; +inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal); +} -class Svx3DEndAngleItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600); -}; +inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal); +} class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem { public: @@ -170,14 +166,12 @@ public: SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE; }; -class Svx3DDistanceItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100); -}; +inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal); +} -class Svx3DFocalLengthItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100); +inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal); }; class Svx3DTwoSidedLightingItem : public SfxBoolItem { |