xref: /AOO42X/main/svx/inc/svx/svx3ditems.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX3DITEMS_HXX
24 #define _SVX3DITEMS_HXX
25 
26 #include <svl/intitem.hxx>
27 #include <svl/eitem.hxx>
28 
29 
30 #include <editeng/colritem.hxx>
31 #include <svx/e3ditem.hxx>
32 #include <svx/viewpt3d.hxx>
33 #include <svx/svddef.hxx>
34 #include "svx/svxdllapi.h"
35 
36 // Svx3D _3DOBJ_ Items
37 class SVX_DLLPUBLIC Svx3DPercentDiagonalItem : public SfxUInt16Item {
38 public:
39     Svx3DPercentDiagonalItem(sal_uInt16 nVal = 10);
40 };
41 
42 class Svx3DBackscaleItem : public SfxUInt16Item {
43 public:
44     SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100);
45 };
46 
47 class Svx3DDepthItem : public SfxUInt32Item {
48 public:
49     SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000);
50 };
51 
52 class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item {
53 public:
54     Svx3DHorizontalSegmentsItem(sal_uInt32 nVal = 24);
55 };
56 
57 class Svx3DVerticalSegmentsItem : public SfxUInt32Item {
58 public:
59     SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24);
60 };
61 
62 class Svx3DEndAngleItem : public SfxUInt32Item {
63 public:
64     SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600);
65 };
66 
67 class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem {
68 public:
69     Svx3DDoubleSidedItem(sal_Bool bVal = 0);
70 };
71 
72 // #i28528#
73 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
74 class Svx3DReducedLineGeometryItem : public SfxBoolItem {
75 public:
76     Svx3DReducedLineGeometryItem(sal_Bool bVal = 0);
77     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
78     virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
79 };
80 
81 class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item {
82 public:
83     Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
84 
85     // use drawing::NormalsKind
86     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
87     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
88     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
89 };
90 
91 class Svx3DNormalsInvertItem : public SfxBoolItem {
92 public:
93     SVX_DLLPUBLIC Svx3DNormalsInvertItem(sal_Bool bVal = 0);
94 };
95 
96 class SVX_DLLPUBLIC Svx3DTextureProjectionXItem : public SfxUInt16Item {
97 public:
98     Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
99 
100     // use drawing::TextureProjectionMode
101     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
102     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
103     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
104 };
105 
106 class SVX_DLLPUBLIC Svx3DTextureProjectionYItem : public SfxUInt16Item {
107 public:
108     Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
109 
110     // use drawing::TextureProjectionMode
111     virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
112     virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
113     virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
114 };
115 
116 class Svx3DShadow3DItem : public SfxBoolItem {
117 public:
118     SVX_DLLPUBLIC Svx3DShadow3DItem(sal_Bool bVal = 0);
119 };
120 
121 class Svx3DMaterialColorItem : public SvxColorItem {
122 public:
123     Svx3DMaterialColorItem(const Color& rCol = Color(0x0000b8ff));
124 };
125 
126 class Svx3DMaterialEmissionItem : public SvxColorItem {
127 public:
128     SVX_DLLPUBLIC Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000));
129 };
130 
131 class Svx3DMaterialSpecularItem : public SvxColorItem {
132 public:
133     SVX_DLLPUBLIC Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff));
134 };
135 
136 class Svx3DMaterialSpecularIntensityItem : public SfxUInt16Item {
137 public:
138     SVX_DLLPUBLIC Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15);
139 };
140 
141 class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item {
142 public:
143     Svx3DTextureKindItem(sal_uInt16 nVal = 3);
144 
145     // use drawing::TextureKind
146     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
147     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
148     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
149 };
150 
151 class SVX_DLLPUBLIC Svx3DTextureModeItem : public SfxUInt16Item {
152 public:
153     Svx3DTextureModeItem(sal_uInt16 nVal = 2);
154 
155     // use drawing:TextureMode
156     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
157     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
158     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
159 };
160 
161 class Svx3DTextureFilterItem : public SfxBoolItem {
162 public:
163     SVX_DLLPUBLIC Svx3DTextureFilterItem(sal_Bool bVal = 0);
164 };
165 
166 // Svx3D _3DSCENE_ Items
167 class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item {
168 public:
169     Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE);
170 
171     // use drawing::ProjectionMode
172     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
173     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
174     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
175 };
176 
177 class Svx3DDistanceItem : public SfxUInt32Item {
178 public:
179     SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100);
180 };
181 
182 class Svx3DFocalLengthItem : public SfxUInt32Item {
183 public:
184     SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100);
185 };
186 
187 class Svx3DTwoSidedLightingItem : public SfxBoolItem {
188 public:
189     SVX_DLLPUBLIC Svx3DTwoSidedLightingItem(sal_Bool bVal = 0);
190 };
191 
192 class SVX_DLLPUBLIC Svx3DLightcolor1Item : public SvxColorItem {
193 public:
194     Svx3DLightcolor1Item(const Color& rCol = Color(0xffcccccc));
195 };
196 
197 class SVX_DLLPUBLIC Svx3DLightcolor2Item : public SvxColorItem {
198 public:
199     Svx3DLightcolor2Item(const Color& rCol = Color(0x00000000));
200 };
201 
202 class SVX_DLLPUBLIC Svx3DLightcolor3Item : public SvxColorItem {
203 public:
204     Svx3DLightcolor3Item(const Color& rCol = Color(0x00000000));
205 };
206 
207 class SVX_DLLPUBLIC Svx3DLightcolor4Item : public SvxColorItem {
208 public:
209     Svx3DLightcolor4Item(const Color& rCol = Color(0x00000000));
210 };
211 
212 class SVX_DLLPUBLIC Svx3DLightcolor5Item : public SvxColorItem {
213 public:
214     Svx3DLightcolor5Item(const Color& rCol = Color(0x00000000));
215 };
216 
217 class SVX_DLLPUBLIC Svx3DLightcolor6Item : public SvxColorItem {
218 public:
219     Svx3DLightcolor6Item(const Color& rCol = Color(0x00000000));
220 };
221 
222 class SVX_DLLPUBLIC Svx3DLightcolor7Item : public SvxColorItem {
223 public:
224     Svx3DLightcolor7Item(const Color& rCol = Color(0x00000000));
225 };
226 
227 class SVX_DLLPUBLIC Svx3DLightcolor8Item : public SvxColorItem {
228 public:
229     Svx3DLightcolor8Item(const Color& rCol = Color(0x00000000));
230 };
231 
232 class SVX_DLLPUBLIC Svx3DAmbientcolorItem : public SvxColorItem {
233 public:
234     Svx3DAmbientcolorItem(const Color& rCol = Color(0x00666666));
235 };
236 
237 class SVX_DLLPUBLIC Svx3DLightOnOff1Item : public SfxBoolItem {
238 public:
239     Svx3DLightOnOff1Item(sal_Bool bVal = 1);
240 };
241 
242 class SVX_DLLPUBLIC Svx3DLightOnOff2Item : public SfxBoolItem {
243 public:
244     Svx3DLightOnOff2Item(sal_Bool bVal = 0);
245 };
246 
247 class SVX_DLLPUBLIC Svx3DLightOnOff3Item : public SfxBoolItem {
248 public:
249     Svx3DLightOnOff3Item(sal_Bool bVal = 0);
250 };
251 
252 class SVX_DLLPUBLIC Svx3DLightOnOff4Item : public SfxBoolItem {
253 public:
254     Svx3DLightOnOff4Item(sal_Bool bVal = 0);
255 };
256 
257 class SVX_DLLPUBLIC Svx3DLightOnOff5Item : public SfxBoolItem {
258 public:
259     Svx3DLightOnOff5Item(sal_Bool bVal = 0);
260 };
261 
262 class SVX_DLLPUBLIC Svx3DLightOnOff6Item : public SfxBoolItem {
263 public:
264     Svx3DLightOnOff6Item(sal_Bool bVal = 0);
265 };
266 
267 class SVX_DLLPUBLIC Svx3DLightOnOff7Item : public SfxBoolItem {
268 public:
269     Svx3DLightOnOff7Item(sal_Bool bVal = 0);
270 };
271 
272 class SVX_DLLPUBLIC Svx3DLightOnOff8Item : public SfxBoolItem {
273 public:
274     Svx3DLightOnOff8Item(sal_Bool bVal = 0);
275 };
276 
277 class SVX_DLLPUBLIC Svx3DLightDirection1Item : public SvxB3DVectorItem {
278 public:
279     Svx3DLightDirection1Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963));
280 };
281 
282 class SVX_DLLPUBLIC Svx3DLightDirection2Item : public SvxB3DVectorItem {
283 public:
284     Svx3DLightDirection2Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
285 };
286 
287 class SVX_DLLPUBLIC Svx3DLightDirection3Item : public SvxB3DVectorItem {
288 public:
289     Svx3DLightDirection3Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
290 };
291 
292 class SVX_DLLPUBLIC Svx3DLightDirection4Item : public SvxB3DVectorItem {
293 public:
294     Svx3DLightDirection4Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
295 };
296 
297 class SVX_DLLPUBLIC Svx3DLightDirection5Item : public SvxB3DVectorItem {
298 public:
299     Svx3DLightDirection5Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
300 };
301 
302 class SVX_DLLPUBLIC Svx3DLightDirection6Item : public SvxB3DVectorItem {
303 public:
304     Svx3DLightDirection6Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
305 };
306 
307 class SVX_DLLPUBLIC Svx3DLightDirection7Item : public SvxB3DVectorItem {
308 public:
309     Svx3DLightDirection7Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
310 };
311 
312 class SVX_DLLPUBLIC Svx3DLightDirection8Item : public SvxB3DVectorItem {
313 public:
314     Svx3DLightDirection8Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
315 };
316 
317 class Svx3DShadowSlantItem : public SfxUInt16Item {
318 public:
319     SVX_DLLPUBLIC Svx3DShadowSlantItem(sal_uInt16 nVal = 0);
320 };
321 
322 class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item {
323 public:
324     Svx3DShadeModeItem(sal_uInt16 nVal = 2);
325 
326     // use drawing::ShadeMode
327     SVX_DLLPRIVATE virtual  sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
328     SVX_DLLPRIVATE virtual  sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
329     SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
330 };
331 
332 //////////////////////////////////////////////////////////////////////////////
333 // #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
334 class Svx3DSmoothNormalsItem : public SfxBoolItem {
335 public:
336     Svx3DSmoothNormalsItem(sal_Bool bVal = 1);
337     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
338     virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
339 };
340 
341 // #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
342 class Svx3DSmoothLidsItem : public SfxBoolItem {
343 public:
344     Svx3DSmoothLidsItem(sal_Bool bVal = 0);
345     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
346     virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
347 };
348 
349 // #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
350 class Svx3DCharacterModeItem : public SfxBoolItem {
351 public:
352     Svx3DCharacterModeItem(sal_Bool bVal = 0);
353     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
354     virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
355 };
356 
357 // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
358 class SVX_DLLPUBLIC Svx3DCloseFrontItem : public SfxBoolItem {
359 public:
360     Svx3DCloseFrontItem(sal_Bool bVal = 1);
361     SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
362     SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
363 };
364 
365 // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
366 class SVX_DLLPUBLIC Svx3DCloseBackItem : public SfxBoolItem {
367 public:
368     Svx3DCloseBackItem(sal_Bool bVal = 1);
369     SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
370     SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
371 };
372 
373 #endif // _SVX3DITEMS_HXX
374