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