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