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
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svx.hxx"
26 #include <svx/svx3ditems.hxx>
27 #include <com/sun/star/drawing/NormalsKind.hpp>
28 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
29 #include <com/sun/star/drawing/TextureKind.hpp>
30 #include <com/sun/star/drawing/TextureMode.hpp>
31 #include <com/sun/star/drawing/ProjectionMode.hpp>
32 #include <com/sun/star/drawing/ShadeMode.hpp>
33
34
35 //////////////////////////////////////////////////////////////////////////////
36
37 using namespace ::rtl;
38 using namespace ::com::sun::star;
39
40 //////////////////////////////////////////////////////////////////////////////
Svx3DPercentDiagonalItem(sal_uInt16 nVal)41 Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal)
42 : SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal)
43 {}
44
Svx3DBackscaleItem(sal_uInt16 nVal)45 Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal)
46 : SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal)
47 {}
48
Svx3DDepthItem(sal_uInt32 nVal)49 Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal)
50 : SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal)
51 {}
52
Svx3DHorizontalSegmentsItem(sal_uInt32 nVal)53 Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal)
54 : SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal)
55 {}
56
Svx3DVerticalSegmentsItem(sal_uInt32 nVal)57 Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal)
58 : SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal)
59 {}
60
Svx3DEndAngleItem(sal_uInt32 nVal)61 Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal)
62 : SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal)
63 {}
64
Svx3DDoubleSidedItem(sal_Bool bVal)65 Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(sal_Bool bVal)
66 : SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal)
67 {}
68
69 //////////////////////////////////////////////////////////////////////////////
70 // #i28528#
71 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
72
Svx3DReducedLineGeometryItem(sal_Bool bVal)73 Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(sal_Bool bVal)
74 : SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal)
75 {}
76
GetVersion(sal_uInt16) const77 sal_uInt16 Svx3DReducedLineGeometryItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
78 {
79 return 1;
80 }
81
Create(SvStream & rIn,sal_uInt16 nItemVersion) const82 SfxPoolItem* Svx3DReducedLineGeometryItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
83 {
84 SfxBoolItem* pRetval = new Svx3DReducedLineGeometryItem();
85
86 if(nItemVersion > 0)
87 {
88 SfxBoolItem aBoolItem(Which(), rIn);
89 pRetval->SetValue(aBoolItem.GetValue());
90 }
91
92 return pRetval;
93 }
94
95 //////////////////////////////////////////////////////////////////////////////
96
Svx3DNormalsKindItem(sal_uInt16 nVal)97 Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal)
98 : SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal)
99 {}
100
Svx3DNormalsInvertItem(sal_Bool bVal)101 Svx3DNormalsInvertItem::Svx3DNormalsInvertItem(sal_Bool bVal)
102 : SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal)
103 {}
104
Svx3DTextureProjectionXItem(sal_uInt16 nVal)105 Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal)
106 : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal)
107 {}
108
Svx3DTextureProjectionYItem(sal_uInt16 nVal)109 Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal)
110 : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal)
111 {}
112
Svx3DShadow3DItem(sal_Bool bVal)113 Svx3DShadow3DItem::Svx3DShadow3DItem(sal_Bool bVal)
114 : SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal)
115 {}
116
Svx3DMaterialColorItem(const Color & rCol)117 Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol)
118 : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR)
119 {}
120
Svx3DMaterialEmissionItem(const Color & rCol)121 Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol)
122 : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION)
123 {}
124
Svx3DMaterialSpecularItem(const Color & rCol)125 Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol)
126 : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR)
127 {}
128
Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)129 Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
130 : SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal)
131 {}
132
Svx3DTextureKindItem(sal_uInt16 nVal)133 Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal)
134 : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal)
135 {}
136
Svx3DTextureModeItem(sal_uInt16 nVal)137 Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal)
138 : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
139 {}
140
Svx3DTextureFilterItem(sal_Bool bVal)141 Svx3DTextureFilterItem::Svx3DTextureFilterItem(sal_Bool bVal)
142 : SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal)
143 {}
144
Svx3DPerspectiveItem(sal_uInt16 nVal)145 Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal)
146 : SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal)
147 {}
148
Svx3DDistanceItem(sal_uInt32 nVal)149 Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal)
150 : SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal)
151 {}
152
Svx3DFocalLengthItem(sal_uInt32 nVal)153 Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal)
154 : SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal)
155 {}
156
Svx3DTwoSidedLightingItem(sal_Bool bVal)157 Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(sal_Bool bVal)
158 : SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal)
159 {}
160
Svx3DLightcolor1Item(const Color & rCol)161 Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol)
162 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1)
163 {}
164
Svx3DLightcolor2Item(const Color & rCol)165 Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol)
166 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2)
167 {}
168
Svx3DLightcolor3Item(const Color & rCol)169 Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol)
170 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3)
171 {}
172
Svx3DLightcolor4Item(const Color & rCol)173 Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol)
174 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4)
175 {}
176
Svx3DLightcolor5Item(const Color & rCol)177 Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol)
178 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5)
179 {}
180
Svx3DLightcolor6Item(const Color & rCol)181 Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol)
182 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6)
183 {}
184
Svx3DLightcolor7Item(const Color & rCol)185 Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol)
186 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7)
187 {}
188
Svx3DLightcolor8Item(const Color & rCol)189 Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol)
190 : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8)
191 {}
192
Svx3DAmbientcolorItem(const Color & rCol)193 Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol)
194 : SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR)
195 {}
196
Svx3DLightOnOff1Item(sal_Bool bVal)197 Svx3DLightOnOff1Item::Svx3DLightOnOff1Item(sal_Bool bVal)
198 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal)
199 {}
200
Svx3DLightOnOff2Item(sal_Bool bVal)201 Svx3DLightOnOff2Item::Svx3DLightOnOff2Item(sal_Bool bVal)
202 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal)
203 {}
204
Svx3DLightOnOff3Item(sal_Bool bVal)205 Svx3DLightOnOff3Item::Svx3DLightOnOff3Item(sal_Bool bVal)
206 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal)
207 {}
208
Svx3DLightOnOff4Item(sal_Bool bVal)209 Svx3DLightOnOff4Item::Svx3DLightOnOff4Item(sal_Bool bVal)
210 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal)
211 {}
212
Svx3DLightOnOff5Item(sal_Bool bVal)213 Svx3DLightOnOff5Item::Svx3DLightOnOff5Item(sal_Bool bVal)
214 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal)
215 {}
216
Svx3DLightOnOff6Item(sal_Bool bVal)217 Svx3DLightOnOff6Item::Svx3DLightOnOff6Item(sal_Bool bVal)
218 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal)
219 {}
220
Svx3DLightOnOff7Item(sal_Bool bVal)221 Svx3DLightOnOff7Item::Svx3DLightOnOff7Item(sal_Bool bVal)
222 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal)
223 {}
224
Svx3DLightOnOff8Item(sal_Bool bVal)225 Svx3DLightOnOff8Item::Svx3DLightOnOff8Item(sal_Bool bVal)
226 : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal)
227 {}
228
Svx3DLightDirection1Item(const basegfx::B3DVector & rVec)229 Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec)
230 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec)
231 {}
232
Svx3DLightDirection2Item(const basegfx::B3DVector & rVec)233 Svx3DLightDirection2Item::Svx3DLightDirection2Item(const basegfx::B3DVector& rVec)
234 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec)
235 {}
236
Svx3DLightDirection3Item(const basegfx::B3DVector & rVec)237 Svx3DLightDirection3Item::Svx3DLightDirection3Item(const basegfx::B3DVector& rVec)
238 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec)
239 {}
240
Svx3DLightDirection4Item(const basegfx::B3DVector & rVec)241 Svx3DLightDirection4Item::Svx3DLightDirection4Item(const basegfx::B3DVector& rVec)
242 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec)
243 {}
244
Svx3DLightDirection5Item(const basegfx::B3DVector & rVec)245 Svx3DLightDirection5Item::Svx3DLightDirection5Item(const basegfx::B3DVector& rVec)
246 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec)
247 {}
248
Svx3DLightDirection6Item(const basegfx::B3DVector & rVec)249 Svx3DLightDirection6Item::Svx3DLightDirection6Item(const basegfx::B3DVector& rVec)
250 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec)
251 {}
252
Svx3DLightDirection7Item(const basegfx::B3DVector & rVec)253 Svx3DLightDirection7Item::Svx3DLightDirection7Item(const basegfx::B3DVector& rVec)
254 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec)
255 {}
256
Svx3DLightDirection8Item(const basegfx::B3DVector & rVec)257 Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVec)
258 : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec)
259 {}
260
Svx3DShadowSlantItem(sal_uInt16 nVal)261 Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal)
262 : SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal)
263 {}
264
Svx3DShadeModeItem(sal_uInt16 nVal)265 Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
266 : SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
267 {}
268
269 //////////////////////////////////////////////////////////////////////////////
270 // #107245#
271
Svx3DSmoothNormalsItem(sal_Bool bVal)272 Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(sal_Bool bVal)
273 : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal)
274 {}
275
GetVersion(sal_uInt16) const276 sal_uInt16 Svx3DSmoothNormalsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
277 {
278 return 1;
279 }
280
Create(SvStream & rIn,sal_uInt16 nItemVersion) const281 SfxPoolItem* Svx3DSmoothNormalsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
282 {
283 SfxBoolItem* pRetval = new Svx3DSmoothNormalsItem();
284
285 if(nItemVersion > 0)
286 {
287 SfxBoolItem aBoolItem(Which(), rIn);
288 pRetval->SetValue(aBoolItem.GetValue());
289 }
290
291 return pRetval;
292 }
293
294 //////////////////////////////////////////////////////////////////////////////
295 // #107245#
296
Svx3DSmoothLidsItem(sal_Bool bVal)297 Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(sal_Bool bVal)
298 : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal)
299 {}
300
GetVersion(sal_uInt16) const301 sal_uInt16 Svx3DSmoothLidsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
302 {
303 return 1;
304 }
305
Create(SvStream & rIn,sal_uInt16 nItemVersion) const306 SfxPoolItem* Svx3DSmoothLidsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
307 {
308 SfxBoolItem* pRetval = new Svx3DSmoothLidsItem();
309
310 if(nItemVersion > 0)
311 {
312 SfxBoolItem aBoolItem(Which(), rIn);
313 pRetval->SetValue(aBoolItem.GetValue());
314 }
315
316 return pRetval;
317 }
318
319 //////////////////////////////////////////////////////////////////////////////
320 // #107245#
321
Svx3DCharacterModeItem(sal_Bool bVal)322 Svx3DCharacterModeItem::Svx3DCharacterModeItem(sal_Bool bVal)
323 : SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal)
324 {}
325
GetVersion(sal_uInt16) const326 sal_uInt16 Svx3DCharacterModeItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
327 {
328 return 1;
329 }
330
Create(SvStream & rIn,sal_uInt16 nItemVersion) const331 SfxPoolItem* Svx3DCharacterModeItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
332 {
333 SfxBoolItem* pRetval = new Svx3DCharacterModeItem();
334
335 if(nItemVersion > 0)
336 {
337 SfxBoolItem aBoolItem(Which(), rIn);
338 pRetval->SetValue(aBoolItem.GetValue());
339 }
340
341 return pRetval;
342 }
343
344 //////////////////////////////////////////////////////////////////////////////
345 // #107245#
346
Svx3DCloseFrontItem(sal_Bool bVal)347 Svx3DCloseFrontItem::Svx3DCloseFrontItem(sal_Bool bVal)
348 : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal)
349 {}
350
GetVersion(sal_uInt16) const351 sal_uInt16 Svx3DCloseFrontItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
352 {
353 return 1;
354 }
355
Create(SvStream & rIn,sal_uInt16 nItemVersion) const356 SfxPoolItem* Svx3DCloseFrontItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
357 {
358 SfxBoolItem* pRetval = new Svx3DCloseFrontItem();
359
360 if(nItemVersion > 0)
361 {
362 SfxBoolItem aBoolItem(Which(), rIn);
363 pRetval->SetValue(aBoolItem.GetValue());
364 }
365
366 return pRetval;
367 }
368
369 //////////////////////////////////////////////////////////////////////////////
370 // #107245#
371
Svx3DCloseBackItem(sal_Bool bVal)372 Svx3DCloseBackItem::Svx3DCloseBackItem(sal_Bool bVal)
373 : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal)
374 {}
375
GetVersion(sal_uInt16) const376 sal_uInt16 Svx3DCloseBackItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
377 {
378 return 1;
379 }
380
Create(SvStream & rIn,sal_uInt16 nItemVersion) const381 SfxPoolItem* Svx3DCloseBackItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
382 {
383 SfxBoolItem* pRetval = new Svx3DCloseBackItem();
384
385 if(nItemVersion > 0)
386 {
387 SfxBoolItem aBoolItem(Which(), rIn);
388 pRetval->SetValue(aBoolItem.GetValue());
389 }
390
391 return pRetval;
392 }
393
394 //////////////////////////////////////////////////////////////////////////////
395
396 // Svx3DNormalsKindItem: use drawing::NormalsKind
QueryValue(uno::Any & rVal,sal_uInt8) const397 sal_Bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
398 {
399 rVal <<= (drawing::NormalsKind)GetValue();
400 return sal_True;
401 }
402
PutValue(const uno::Any & rVal,sal_uInt8)403 sal_Bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
404 {
405 drawing::NormalsKind eVar;
406 if(!(rVal >>= eVar))
407 return sal_False;
408 SetValue((sal_Int16)eVar);
409 return sal_True;
410 }
411
Clone(SfxItemPool *) const412 SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const
413 {
414 return new Svx3DNormalsKindItem(*this);
415 }
416
417 // Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode
QueryValue(uno::Any & rVal,sal_uInt8) const418 sal_Bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
419 {
420 rVal <<= (drawing::TextureProjectionMode)GetValue();
421 return sal_True;
422 }
423
PutValue(const uno::Any & rVal,sal_uInt8)424 sal_Bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
425 {
426 drawing::TextureProjectionMode eVar;
427 if(!(rVal >>= eVar))
428 return sal_False;
429 SetValue((sal_Int16)eVar);
430 return sal_True;
431 }
432
Clone(SfxItemPool *) const433 SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*pPool*/) const
434 {
435 return new Svx3DTextureProjectionXItem(*this);
436 }
437
438 // Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode
QueryValue(uno::Any & rVal,sal_uInt8) const439 sal_Bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
440 {
441 rVal <<= (drawing::TextureProjectionMode)GetValue();
442 return sal_True;
443 }
444
PutValue(const uno::Any & rVal,sal_uInt8)445 sal_Bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
446 {
447 drawing::TextureProjectionMode eVar;
448 if(!(rVal >>= eVar))
449 return sal_False;
450 SetValue((sal_Int16)eVar);
451 return sal_True;
452 }
453
Clone(SfxItemPool *) const454 SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*pPool*/) const
455 {
456 return new Svx3DTextureProjectionYItem(*this);
457 }
458
459 // Svx3DTextureKindItem: use drawing::TextureKind
QueryValue(uno::Any & rVal,sal_uInt8) const460 sal_Bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
461 {
462 rVal <<= (drawing::TextureKind)GetValue();
463 return sal_True;
464 }
465
PutValue(const uno::Any & rVal,sal_uInt8)466 sal_Bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
467 {
468 drawing::TextureKind eVar;
469 if(!(rVal >>= eVar))
470 return sal_False;
471 SetValue((sal_Int16)eVar);
472 return sal_True;
473 }
474
Clone(SfxItemPool *) const475 SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const
476 {
477 return new Svx3DTextureKindItem(*this);
478 }
479
480 // Svx3DTextureModeItem: use drawing:TextureMode
QueryValue(uno::Any & rVal,sal_uInt8) const481 sal_Bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
482 {
483 rVal <<= (drawing::TextureMode)GetValue();
484 return sal_True;
485 }
486
PutValue(const uno::Any & rVal,sal_uInt8)487 sal_Bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
488 {
489 drawing::TextureMode eVar;
490 if(!(rVal >>= eVar))
491 return sal_False;
492 SetValue((sal_Int16)eVar);
493 return sal_True;
494 }
495
Clone(SfxItemPool *) const496 SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const
497 {
498 return new Svx3DTextureModeItem(*this);
499 }
500
501 // Svx3DPerspectiveItem: use drawing::ProjectionMode
QueryValue(uno::Any & rVal,sal_uInt8) const502 sal_Bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
503 {
504 rVal <<= (drawing::ProjectionMode)GetValue();
505 return sal_True;
506 }
507
PutValue(const uno::Any & rVal,sal_uInt8)508 sal_Bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
509 {
510 drawing::ProjectionMode eVar;
511 if(!(rVal >>= eVar))
512 return sal_False;
513 SetValue((sal_Int16)eVar);
514 return sal_True;
515 }
516
Clone(SfxItemPool *) const517 SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const
518 {
519 return new Svx3DPerspectiveItem(*this);
520 }
521
522 // Svx3DShadeModeItem: use drawing::ShadeMode
QueryValue(uno::Any & rVal,sal_uInt8) const523 sal_Bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
524 {
525 rVal <<= (drawing::ShadeMode)GetValue();
526 return sal_True;
527 }
528
PutValue(const uno::Any & rVal,sal_uInt8)529 sal_Bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
530 {
531 drawing::ShadeMode eVar;
532 if(!(rVal >>= eVar))
533 return sal_False;
534 SetValue((sal_Int16)eVar);
535 return sal_True;
536 }
537
Clone(SfxItemPool *) const538 SfxPoolItem* Svx3DShadeModeItem::Clone(SfxItemPool* /*pPool*/) const
539 {
540 return new Svx3DShadeModeItem(*this);
541 }
542
543 // EOF
544