diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 15:18:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 15:18:17 +0200 |
commit | edf7c73d457f01831ba1ad2fb4aca1a35d7c2549 (patch) | |
tree | 4e4ac70dd161a786bd2d8ebe9eba2bcf64fa7f02 /include | |
parent | 9f6018bb64ae1da3a476f6bfca02e06b093f9e16 (diff) |
Consistency around SfxUInt16Item in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I2e467df03a34d694214e0560476cb7fd76ef0735
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/extrud3d.hxx | 4 | ||||
-rw-r--r-- | include/svx/lathe3d.hxx | 4 | ||||
-rw-r--r-- | include/svx/obj3d.hxx | 2 | ||||
-rw-r--r-- | include/svx/scene3d.hxx | 2 | ||||
-rw-r--r-- | include/svx/svx3ditems.hxx | 28 |
5 files changed, 18 insertions, 22 deletions
diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx index 053f0e931e7a..ae3276c4ff82 100644 --- a/include/svx/extrud3d.hxx +++ b/include/svx/extrud3d.hxx @@ -51,11 +51,11 @@ public: // PercentDiagonal: 0..100, before 0.0..0.5 sal_uInt16 GetPercentDiagonal() const - { return ((const Svx3DPercentDiagonalItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } // BackScale: 0..100, before 0.0..1.0 sal_uInt16 GetPercentBackScale() const - { return ((const Svx3DBackscaleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } // BackScale: 0..100, before 0.0..1.0 sal_uInt32 GetExtrudeDepth() const diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx index c1bbf1b711b1..46d0167b2c77 100644 --- a/include/svx/lathe3d.hxx +++ b/include/svx/lathe3d.hxx @@ -60,11 +60,11 @@ private: // PercentDiagonal: 0..100, before 0.0..0.5 sal_uInt16 GetPercentDiagonal() const - { return ((const Svx3DPercentDiagonalItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } // BackScale: 0..100, before 0.0..1.0 sal_uInt16 GetBackScale() const - { return ((const Svx3DBackscaleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } // EndAngle: 0..10000 sal_uInt32 GetEndAngle() const diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 87b926f61cea..eac17e1c60fc 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -287,7 +287,7 @@ public : // MaterialSpecularIntensity: sal_uInt16 GetMaterialSpecularIntensity() const - { return ((const Svx3DMaterialSpecularIntensityItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); } // TextureFilter: sal_True/FALSE bool GetTextureFilter() const diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index 12887747b6a3..058ad2744ec7 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -178,7 +178,7 @@ public: // ShadowSlant: sal_uInt16 GetShadowSlant() const - { return ((const Svx3DShadowSlantItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); } + { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); } // ShadeMode: 0 == FLAT, 1 == PHONG, 2 == SMOOTH, 3 == ForceDraft sal_uInt16 GetShadeMode() const diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx index fe8d1c9a18ab..eb34a5ec8c09 100644 --- a/include/svx/svx3ditems.hxx +++ b/include/svx/svx3ditems.hxx @@ -30,15 +30,13 @@ #include <svx/svxdllapi.h> // Svx3D _3DOBJ_ Items -class SVX_DLLPUBLIC Svx3DPercentDiagonalItem : public SfxUInt16Item { -public: - Svx3DPercentDiagonalItem(sal_uInt16 nVal = 10); -}; +inline SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal) { + return SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal); +} -class Svx3DBackscaleItem : public SfxUInt16Item { -public: - SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100); -}; +inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) { + return SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal); +} inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) { return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal); @@ -122,10 +120,9 @@ public: SVX_DLLPUBLIC Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff)); }; -class Svx3DMaterialSpecularIntensityItem : public SfxUInt16Item { -public: - SVX_DLLPUBLIC Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15); -}; +inline SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) { + return SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal); +} class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item { public: @@ -291,10 +288,9 @@ public: Svx3DLightDirection8Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); }; -class Svx3DShadowSlantItem : public SfxUInt16Item { -public: - SVX_DLLPUBLIC Svx3DShadowSlantItem(sal_uInt16 nVal = 0); -}; +inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) { + return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal); +} class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item { public: |