xref: /trunk/main/svx/source/engine3d/svx3ditems.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_svx.hxx"
30 #include <svx/svx3ditems.hxx>
31 #include <com/sun/star/drawing/NormalsKind.hpp>
32 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
33 #include <com/sun/star/drawing/TextureKind.hpp>
34 #include <com/sun/star/drawing/TextureMode.hpp>
35 #include <com/sun/star/drawing/ProjectionMode.hpp>
36 #include <com/sun/star/drawing/ShadeMode.hpp>
37 
38 
39 //////////////////////////////////////////////////////////////////////////////
40 
41 using namespace ::rtl;
42 using namespace ::com::sun::star;
43 
44 //////////////////////////////////////////////////////////////////////////////
45 Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal)
46 :	SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal)
47 {}
48 
49 Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal)
50 :	SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal)
51 {}
52 
53 Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal)
54 :	SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal)
55 {}
56 
57 Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal)
58 :	SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal)
59 {}
60 
61 Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal)
62 :	SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal)
63 {}
64 
65 Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal)
66 :	SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal)
67 {}
68 
69 Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(sal_Bool bVal)
70 :	SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal)
71 {}
72 
73 //////////////////////////////////////////////////////////////////////////////
74 // #i28528#
75 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
76 
77 Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(sal_Bool bVal)
78 :	SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal)
79 {}
80 
81 sal_uInt16 Svx3DReducedLineGeometryItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
82 {
83 	return 1;
84 }
85 
86 SfxPoolItem* Svx3DReducedLineGeometryItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
87 {
88 	SfxBoolItem* pRetval = new Svx3DReducedLineGeometryItem();
89 
90 	if(nItemVersion > 0)
91 	{
92 		SfxBoolItem aBoolItem(Which(), rIn);
93 		pRetval->SetValue(aBoolItem.GetValue());
94 	}
95 
96 	return pRetval;
97 }
98 
99 //////////////////////////////////////////////////////////////////////////////
100 
101 Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal)
102 :	SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal)
103 {}
104 
105 Svx3DNormalsInvertItem::Svx3DNormalsInvertItem(sal_Bool bVal)
106 :	SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal)
107 {}
108 
109 Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal)
110 :	SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal)
111 {}
112 
113 Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal)
114 :	SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal)
115 {}
116 
117 Svx3DShadow3DItem::Svx3DShadow3DItem(sal_Bool bVal)
118 :	SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal)
119 {}
120 
121 Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol)
122 :	SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR)
123 {}
124 
125 Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol)
126 :	SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION)
127 {}
128 
129 Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol)
130 :	SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR)
131 {}
132 
133 Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
134 :	SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal)
135 {}
136 
137 Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal)
138 :	SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal)
139 {}
140 
141 Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal)
142 :	SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
143 {}
144 
145 Svx3DTextureFilterItem::Svx3DTextureFilterItem(sal_Bool bVal)
146 :	SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal)
147 {}
148 
149 Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal)
150 :	SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal)
151 {}
152 
153 Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal)
154 :	SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal)
155 {}
156 
157 Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal)
158 :	SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal)
159 {}
160 
161 Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(sal_Bool bVal)
162 :	SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal)
163 {}
164 
165 Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol)
166 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1)
167 {}
168 
169 Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol)
170 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2)
171 {}
172 
173 Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol)
174 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3)
175 {}
176 
177 Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol)
178 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4)
179 {}
180 
181 Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol)
182 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5)
183 {}
184 
185 Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol)
186 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6)
187 {}
188 
189 Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol)
190 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7)
191 {}
192 
193 Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol)
194 :	SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8)
195 {}
196 
197 Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol)
198 :	SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR)
199 {}
200 
201 Svx3DLightOnOff1Item::Svx3DLightOnOff1Item(sal_Bool bVal)
202 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal)
203 {}
204 
205 Svx3DLightOnOff2Item::Svx3DLightOnOff2Item(sal_Bool bVal)
206 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal)
207 {}
208 
209 Svx3DLightOnOff3Item::Svx3DLightOnOff3Item(sal_Bool bVal)
210 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal)
211 {}
212 
213 Svx3DLightOnOff4Item::Svx3DLightOnOff4Item(sal_Bool bVal)
214 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal)
215 {}
216 
217 Svx3DLightOnOff5Item::Svx3DLightOnOff5Item(sal_Bool bVal)
218 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal)
219 {}
220 
221 Svx3DLightOnOff6Item::Svx3DLightOnOff6Item(sal_Bool bVal)
222 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal)
223 {}
224 
225 Svx3DLightOnOff7Item::Svx3DLightOnOff7Item(sal_Bool bVal)
226 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal)
227 {}
228 
229 Svx3DLightOnOff8Item::Svx3DLightOnOff8Item(sal_Bool bVal)
230 :	SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal)
231 {}
232 
233 Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec)
234 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec)
235 {}
236 
237 Svx3DLightDirection2Item::Svx3DLightDirection2Item(const basegfx::B3DVector& rVec)
238 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec)
239 {}
240 
241 Svx3DLightDirection3Item::Svx3DLightDirection3Item(const basegfx::B3DVector& rVec)
242 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec)
243 {}
244 
245 Svx3DLightDirection4Item::Svx3DLightDirection4Item(const basegfx::B3DVector& rVec)
246 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec)
247 {}
248 
249 Svx3DLightDirection5Item::Svx3DLightDirection5Item(const basegfx::B3DVector& rVec)
250 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec)
251 {}
252 
253 Svx3DLightDirection6Item::Svx3DLightDirection6Item(const basegfx::B3DVector& rVec)
254 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec)
255 {}
256 
257 Svx3DLightDirection7Item::Svx3DLightDirection7Item(const basegfx::B3DVector& rVec)
258 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec)
259 {}
260 
261 Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVec)
262 :	SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec)
263 {}
264 
265 Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal)
266 :	SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal)
267 {}
268 
269 Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
270 :	SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
271 {}
272 
273 //////////////////////////////////////////////////////////////////////////////
274 // #107245#
275 
276 Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(sal_Bool bVal)
277 :	SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal)
278 {}
279 
280 sal_uInt16 Svx3DSmoothNormalsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
281 {
282 	return 1;
283 }
284 
285 SfxPoolItem* Svx3DSmoothNormalsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
286 {
287 	SfxBoolItem* pRetval = new Svx3DSmoothNormalsItem();
288 
289 	if(nItemVersion > 0)
290 	{
291 		SfxBoolItem aBoolItem(Which(), rIn);
292 		pRetval->SetValue(aBoolItem.GetValue());
293 	}
294 
295 	return pRetval;
296 }
297 
298 //////////////////////////////////////////////////////////////////////////////
299 // #107245#
300 
301 Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(sal_Bool bVal)
302 :	SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal)
303 {}
304 
305 sal_uInt16 Svx3DSmoothLidsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
306 {
307 	return 1;
308 }
309 
310 SfxPoolItem* Svx3DSmoothLidsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
311 {
312 	SfxBoolItem* pRetval = new Svx3DSmoothLidsItem();
313 
314 	if(nItemVersion > 0)
315 	{
316 		SfxBoolItem aBoolItem(Which(), rIn);
317 		pRetval->SetValue(aBoolItem.GetValue());
318 	}
319 
320 	return pRetval;
321 }
322 
323 //////////////////////////////////////////////////////////////////////////////
324 // #107245#
325 
326 Svx3DCharacterModeItem::Svx3DCharacterModeItem(sal_Bool bVal)
327 :	SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal)
328 {}
329 
330 sal_uInt16 Svx3DCharacterModeItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
331 {
332 	return 1;
333 }
334 
335 SfxPoolItem* Svx3DCharacterModeItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
336 {
337 	SfxBoolItem* pRetval = new Svx3DCharacterModeItem();
338 
339 	if(nItemVersion > 0)
340 	{
341 		SfxBoolItem aBoolItem(Which(), rIn);
342 		pRetval->SetValue(aBoolItem.GetValue());
343 	}
344 
345 	return pRetval;
346 }
347 
348 //////////////////////////////////////////////////////////////////////////////
349 // #107245#
350 
351 Svx3DCloseFrontItem::Svx3DCloseFrontItem(sal_Bool bVal)
352 :	SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal)
353 {}
354 
355 sal_uInt16 Svx3DCloseFrontItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
356 {
357 	return 1;
358 }
359 
360 SfxPoolItem* Svx3DCloseFrontItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
361 {
362 	SfxBoolItem* pRetval = new Svx3DCloseFrontItem();
363 
364 	if(nItemVersion > 0)
365 	{
366 		SfxBoolItem aBoolItem(Which(), rIn);
367 		pRetval->SetValue(aBoolItem.GetValue());
368 	}
369 
370 	return pRetval;
371 }
372 
373 //////////////////////////////////////////////////////////////////////////////
374 // #107245#
375 
376 Svx3DCloseBackItem::Svx3DCloseBackItem(sal_Bool bVal)
377 :	SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal)
378 {}
379 
380 sal_uInt16 Svx3DCloseBackItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
381 {
382 	return 1;
383 }
384 
385 SfxPoolItem* Svx3DCloseBackItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
386 {
387 	SfxBoolItem* pRetval = new Svx3DCloseBackItem();
388 
389 	if(nItemVersion > 0)
390 	{
391 		SfxBoolItem aBoolItem(Which(), rIn);
392 		pRetval->SetValue(aBoolItem.GetValue());
393 	}
394 
395 	return pRetval;
396 }
397 
398 //////////////////////////////////////////////////////////////////////////////
399 
400 // Svx3DNormalsKindItem: use drawing::NormalsKind
401 sal_Bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
402 {
403 	rVal <<= (drawing::NormalsKind)GetValue();
404 	return sal_True;
405 }
406 
407 sal_Bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
408 {
409 	drawing::NormalsKind eVar;
410 	if(!(rVal >>= eVar))
411 		return sal_False;
412 	SetValue((sal_Int16)eVar);
413 	return sal_True;
414 }
415 
416 SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const
417 {
418 	return new Svx3DNormalsKindItem(*this);
419 }
420 
421 // Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode
422 sal_Bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
423 {
424 	rVal <<= (drawing::TextureProjectionMode)GetValue();
425 	return sal_True;
426 }
427 
428 sal_Bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
429 {
430 	drawing::TextureProjectionMode eVar;
431 	if(!(rVal >>= eVar))
432 		return sal_False;
433 	SetValue((sal_Int16)eVar);
434 	return sal_True;
435 }
436 
437 SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*pPool*/) const
438 {
439 	return new Svx3DTextureProjectionXItem(*this);
440 }
441 
442 // Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode
443 sal_Bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
444 {
445 	rVal <<= (drawing::TextureProjectionMode)GetValue();
446 	return sal_True;
447 }
448 
449 sal_Bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
450 {
451 	drawing::TextureProjectionMode eVar;
452 	if(!(rVal >>= eVar))
453 		return sal_False;
454 	SetValue((sal_Int16)eVar);
455 	return sal_True;
456 }
457 
458 SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*pPool*/) const
459 {
460 	return new Svx3DTextureProjectionYItem(*this);
461 }
462 
463 // Svx3DTextureKindItem: use drawing::TextureKind
464 sal_Bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
465 {
466 	rVal <<= (drawing::TextureKind)GetValue();
467 	return sal_True;
468 }
469 
470 sal_Bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
471 {
472 	drawing::TextureKind eVar;
473 	if(!(rVal >>= eVar))
474 		return sal_False;
475 	SetValue((sal_Int16)eVar);
476 	return sal_True;
477 }
478 
479 SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const
480 {
481 	return new Svx3DTextureKindItem(*this);
482 }
483 
484 // Svx3DTextureModeItem: use drawing:TextureMode
485 sal_Bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
486 {
487 	rVal <<= (drawing::TextureMode)GetValue();
488 	return sal_True;
489 }
490 
491 sal_Bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
492 {
493 	drawing::TextureMode eVar;
494 	if(!(rVal >>= eVar))
495 		return sal_False;
496 	SetValue((sal_Int16)eVar);
497 	return sal_True;
498 }
499 
500 SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const
501 {
502 	return new Svx3DTextureModeItem(*this);
503 }
504 
505 // Svx3DPerspectiveItem: use drawing::ProjectionMode
506 sal_Bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
507 {
508 	rVal <<= (drawing::ProjectionMode)GetValue();
509 	return sal_True;
510 }
511 
512 sal_Bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
513 {
514 	drawing::ProjectionMode eVar;
515 	if(!(rVal >>= eVar))
516 		return sal_False;
517 	SetValue((sal_Int16)eVar);
518 	return sal_True;
519 }
520 
521 SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const
522 {
523 	return new Svx3DPerspectiveItem(*this);
524 }
525 
526 // Svx3DShadeModeItem: use drawing::ShadeMode
527 sal_Bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
528 {
529 	rVal <<= (drawing::ShadeMode)GetValue();
530 	return sal_True;
531 }
532 
533 sal_Bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
534 {
535 	drawing::ShadeMode eVar;
536 	if(!(rVal >>= eVar))
537 		return sal_False;
538 	SetValue((sal_Int16)eVar);
539 	return sal_True;
540 }
541 
542 SfxPoolItem* Svx3DShadeModeItem::Clone(SfxItemPool* /*pPool*/) const
543 {
544 	return new Svx3DShadeModeItem(*this);
545 }
546 
547 // EOF
548