LibreOffice Module svx (master)  1
svx3ditems.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_SVX_SVX3DITEMS_HXX
20 #define INCLUDED_SVX_SVX3DITEMS_HXX
21 
22 #include <config_options.h>
23 #include <svl/intitem.hxx>
24 #include <svl/eitem.hxx>
25 
26 
27 #include <editeng/colritem.hxx>
28 #include <svx/e3ditem.hxx>
29 #include <svx/viewpt3d.hxx>
30 #include <svx/svddef.hxx>
31 #include <svx/svxdllapi.h>
32 
33 // Svx3D _3DOBJ_ Items
36 }
37 
38 inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
40 }
41 
42 inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
43  return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
44 }
45 
48 }
49 
52 }
53 
54 inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) {
56 }
57 
60 }
61 
62 // #i28528#
63 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
65 public:
66  Svx3DReducedLineGeometryItem(bool bVal = false);
67  Svx3DReducedLineGeometryItem* Clone(SfxItemPool * = nullptr) const override;
68 };
69 
70 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem : public SfxUInt16Item {
71 public:
72  Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
73 
74  // use drawing::NormalsKind
75  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
76  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
77  SVX_DLLPRIVATE virtual Svx3DNormalsKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
78 };
79 
82 }
83 
84 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem : public SfxUInt16Item {
85 public:
86  Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
87 
88  // use drawing::TextureProjectionMode
89  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
90  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
91  SVX_DLLPRIVATE virtual Svx3DTextureProjectionXItem* Clone(SfxItemPool* pPool = nullptr) const override;
92 };
93 
94 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem : public SfxUInt16Item {
95 public:
96  Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
97 
98  // use drawing::TextureProjectionMode
99  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
100  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
101  virtual Svx3DTextureProjectionYItem* Clone(SfxItemPool* pPool = nullptr) const override;
102 };
103 
105  return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
106 }
107 
110 }
111 
114 }
115 
118 }
119 
120 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public SfxUInt16Item {
121 public:
122  Svx3DTextureKindItem(sal_uInt16 nVal = 3);
123 
124  // use drawing::TextureKind
125  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
126  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
127  SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
128 };
129 
130 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final : public SfxUInt16Item {
131 public:
132  Svx3DTextureModeItem(sal_uInt16 nVal = 2);
133 
134  // use drawing:TextureMode
135  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
136  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
137  SVX_DLLPRIVATE virtual Svx3DTextureModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
138 };
139 
142 }
143 
144 // Svx3D _3DSCENE_ Items
145 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem : public SfxUInt16Item {
146 public:
147  Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
148 
149  // use drawing::ProjectionMode
150  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
151  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
152  SVX_DLLPRIVATE virtual Svx3DPerspectiveItem* Clone(SfxItemPool* pPool = nullptr) const override;
153 };
154 
155 inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
157 }
158 
159 inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
161 }
162 
165 }
166 
169 }
170 
173 }
174 
177 }
178 
181 }
182 
185 }
186 
189 }
190 
193 }
194 
197 }
198 
201 }
202 
205 }
206 
209 }
210 
213 }
214 
217 }
218 
221 }
222 
225 }
226 
229 }
230 
233 }
234 
237 }
238 
241 }
242 
245 }
246 
249 }
250 
253 }
254 
257 }
258 
261 }
262 
265 }
266 
267 inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
269 }
270 
271 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DShadeModeItem : public SfxUInt16Item {
272 public:
273  Svx3DShadeModeItem(sal_uInt16 nVal = 2);
274 
275  // use drawing::ShadeMode
276  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
277  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
278  SVX_DLLPRIVATE virtual Svx3DShadeModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
279 };
280 
281 
282 // #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
284 public:
285  Svx3DSmoothNormalsItem(bool bVal = true);
286  Svx3DSmoothNormalsItem* Clone(SfxItemPool * = nullptr) const override;
287 };
288 
289 // #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
291 public:
292  Svx3DSmoothLidsItem(bool bVal = false);
293  Svx3DSmoothLidsItem* Clone(SfxItemPool * = nullptr) const override;
294 };
295 
296 // #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
298 public:
299  Svx3DCharacterModeItem(bool bVal = false);
300  Svx3DCharacterModeItem* Clone(SfxItemPool * = nullptr) const override;
301 };
302 
303 // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
304 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseFrontItem : public SfxBoolItem {
305 public:
306  Svx3DCloseFrontItem(bool bVal = true);
307  Svx3DCloseFrontItem* Clone(SfxItemPool * = nullptr) const override;
308 };
309 
310 // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
311 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseBackItem : public SfxBoolItem {
312 public:
313  Svx3DCloseBackItem(bool bVal = true);
314  Svx3DCloseBackItem* Clone(SfxItemPool * = nullptr) const override;
315 };
316 
317 #endif // INCLUDED_SVX_SVX3DITEMS_HXX
318 
319 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Svx3DReducedLineGeometryItem(bool bVal=false)
Definition: svx3ditems.cxx:34
SvxColorItem makeSvx3DLightcolor7Item(const Color &rCol)
Definition: svx3ditems.hxx:191
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_4(SDRATTR_3DSCENE_FIRST+16)
SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal)
Definition: svx3ditems.hxx:207
SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal)
Definition: svx3ditems.hxx:58
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_5(SDRATTR_3DSCENE_FIRST+25)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DOBJ_MAT_SPECULAR(SDRATTR_3DOBJ_FIRST+14)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_VERT_SEGS(SDRATTR_3DOBJ_FIRST+4)
virtual SfxBoolItem * Clone(SfxItemPool *=nullptr) const override
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_2(SDRATTR_3DSCENE_FIRST+22)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_NORMALS_INVERT(SDRATTR_3DOBJ_FIRST+8)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_5(SDRATTR_3DSCENE_FIRST+8)
ProjectionType
Definition: viewpt3d.hxx:38
Svx3DReducedLineGeometryItem * Clone(SfxItemPool *=nullptr) const override
Definition: svx3ditems.cxx:38
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY(SDRATTR_3DOBJ_FIRST+15)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_DOUBLE_SIDED(SDRATTR_3DOBJ_FIRST+6)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_DEPTH(SDRATTR_3DOBJ_FIRST+2)
SvxColorItem makeSvx3DLightcolor2Item(const Color &rCol)
Definition: svx3ditems.hxx:171
SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:50
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_7(SDRATTR_3DSCENE_FIRST+19)
SfxUInt16Item(sal_uInt16 which=0, sal_uInt16 nValue=0)
SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:116
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal)
Definition: svx3ditems.hxx:80
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_2(SDRATTR_3DSCENE_FIRST+14)
SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal)
Definition: svx3ditems.hxx:227
SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:34
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_DISTANCE(SDRATTR_3DSCENE_FIRST+1)
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DSCENE_SHADOW_SLANT(SDRATTR_3DSCENE_FIRST+29)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_3(SDRATTR_3DSCENE_FIRST+6)
SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal)
Definition: svx3ditems.hxx:203
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final SfxBoolItem makeSvx3DTextureFilterItem(bool bVal)
Definition: svx3ditems.hxx:140
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_7(SDRATTR_3DSCENE_FIRST+27)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_6(SDRATTR_3DSCENE_FIRST+26)
SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:247
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_6(SDRATTR_3DSCENE_FIRST+18)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_1(SDRATTR_3DSCENE_FIRST+13)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_1(SDRATTR_3DSCENE_FIRST+4)
SvxColorItem makeSvx3DMaterialSpecularItem(const Color &rCol)
Definition: svx3ditems.hxx:112
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_HORZ_SEGS(SDRATTR_3DOBJ_FIRST+3)
SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:255
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_TEXTURE_FILTER(SDRATTR_3DOBJ_FIRST+18)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_3(SDRATTR_3DSCENE_FIRST+15)
SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:159
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_7(SDRATTR_3DSCENE_FIRST+10)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_1(SDRATTR_3DSCENE_FIRST+21)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_5(SDRATTR_3DSCENE_FIRST+17)
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:155
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_TWO_SIDED_LIGHTING(SDRATTR_3DSCENE_FIRST+3)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_AMBIENTCOLOR(SDRATTR_3DSCENE_FIRST+12)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_8(SDRATTR_3DSCENE_FIRST+20)
SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:38
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_8(SDRATTR_3DSCENE_FIRST+28)
SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:46
SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:251
SvxColorItem makeSvx3DLightcolor1Item(const Color &rCol)
Definition: svx3ditems.hxx:167
SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:42
SvxColorItem makeSvx3DLightcolor4Item(const Color &rCol)
Definition: svx3ditems.hxx:179
SvxColorItem makeSvx3DLightcolor8Item(const Color &rCol)
Definition: svx3ditems.hxx:195
SvxColorItem makeSvx3DMaterialEmissionItem(const Color &rCol)
Definition: svx3ditems.hxx:108
SvxColorItem makeSvx3DAmbientcolorItem(const Color &rCol)
Definition: svx3ditems.hxx:199
SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal)
Definition: svx3ditems.hxx:215
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_FOCAL_LENGTH(SDRATTR_3DSCENE_FIRST+2)
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_BACKSCALE(SDRATTR_3DOBJ_FIRST+1)
SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:239
unsigned char sal_uInt8
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem SfxBoolItem makeSvx3DShadow3DItem(bool bVal)
Definition: svx3ditems.hxx:104
SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:54
SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:235
SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal)
Definition: svx3ditems.hxx:231
SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:243
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_3(SDRATTR_3DSCENE_FIRST+23)
SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal)
Definition: svx3ditems.hxx:211
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_PERCENT_DIAGONAL(SDRATTR_3DOBJ_FIRST+0)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_8(SDRATTR_3DSCENE_FIRST+11)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_6(SDRATTR_3DSCENE_FIRST+9)
virtual SfxUInt16Item * Clone(SfxItemPool *=nullptr) const override
SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal)
Definition: svx3ditems.hxx:163
SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:263
SvxColorItem makeSvx3DLightcolor3Item(const Color &rCol)
Definition: svx3ditems.hxx:175
SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal)
Definition: svx3ditems.hxx:219
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_END_ANGLE(SDRATTR_3DOBJ_FIRST+5)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:267
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_2(SDRATTR_3DSCENE_FIRST+5)
SvxColorItem makeSvx3DLightcolor6Item(const Color &rCol)
Definition: svx3ditems.hxx:187
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DOBJ_MAT_EMISSION(SDRATTR_3DOBJ_FIRST+13)
SvxColorItem makeSvx3DLightcolor5Item(const Color &rCol)
Definition: svx3ditems.hxx:183
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_4(SDRATTR_3DSCENE_FIRST+7)
SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal)
Definition: svx3ditems.hxx:223
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_4(SDRATTR_3DSCENE_FIRST+24)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_SHADOW_3D(SDRATTR_3DOBJ_FIRST+11)
SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:259