Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / svx3ditems.hxx
blob4675a9d8bdf78e99520ff34b7ee79c14aeb77142
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SVX_SVX3DITEMS_HXX
20 #define INCLUDED_SVX_SVX3DITEMS_HXX
22 #include <svl/intitem.hxx>
23 #include <svl/eitem.hxx>
26 #include <editeng/colritem.hxx>
27 #include <svx/e3ditem.hxx>
28 #include <svx/viewpt3d.hxx>
29 #include <svx/svddef.hxx>
30 #include <svx/svxdllapi.h>
32 // Svx3D _3DOBJ_ Items
33 inline SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal) {
34 return SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal);
37 inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
38 return SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal);
41 inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
42 return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
45 inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) {
46 return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal);
49 inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) {
50 return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal);
53 inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) {
54 return SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal);
57 inline SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal) {
58 return SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal);
61 // #i28528#
62 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
63 class Svx3DReducedLineGeometryItem : public SfxBoolItem {
64 public:
65 Svx3DReducedLineGeometryItem(bool bVal = false);
66 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
67 virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
68 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
71 class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item {
72 public:
73 Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
75 // use drawing::NormalsKind
76 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
77 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
78 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
81 inline SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal) {
82 return SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal);
85 class SVX_DLLPUBLIC Svx3DTextureProjectionXItem : public SfxUInt16Item {
86 public:
87 Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
89 // use drawing::TextureProjectionMode
90 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
91 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
92 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
95 class SVX_DLLPUBLIC Svx3DTextureProjectionYItem : public SfxUInt16Item {
96 public:
97 Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
99 // use drawing::TextureProjectionMode
100 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
101 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
102 virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
105 inline SfxBoolItem makeSvx3DShadow3DItem(bool bVal) {
106 return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
109 inline SvxColorItem makeSvx3DMaterialEmissionItem(const Color& rCol) {
110 return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION);
113 inline SvxColorItem makeSvx3DMaterialSpecularItem(const Color& rCol) {
114 return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR);
117 inline SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
118 return SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal);
121 class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item {
122 public:
123 Svx3DTextureKindItem(sal_uInt16 nVal = 3);
125 // use drawing::TextureKind
126 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
127 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
128 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
131 class SVX_DLLPUBLIC Svx3DTextureModeItem : public SfxUInt16Item {
132 public:
133 Svx3DTextureModeItem(sal_uInt16 nVal = 2);
135 // use drawing:TextureMode
136 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
137 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
138 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
141 inline SfxBoolItem makeSvx3DTextureFilterItem(bool bVal) {
142 return SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal);
145 // Svx3D _3DSCENE_ Items
146 class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item {
147 public:
148 Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE);
150 // use drawing::ProjectionMode
151 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
152 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
153 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
156 inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
157 return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal);
160 inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
161 return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal);
164 inline SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal) {
165 return SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal);
168 inline SvxColorItem makeSvx3DLightcolor1Item(const Color& rCol) {
169 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1);
172 inline SvxColorItem makeSvx3DLightcolor2Item(const Color& rCol) {
173 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2);
176 inline SvxColorItem makeSvx3DLightcolor3Item(const Color& rCol) {
177 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3);
180 inline SvxColorItem makeSvx3DLightcolor4Item(const Color& rCol) {
181 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4);
184 inline SvxColorItem makeSvx3DLightcolor5Item(const Color& rCol) {
185 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5);
188 inline SvxColorItem makeSvx3DLightcolor6Item(const Color& rCol) {
189 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6);
192 inline SvxColorItem makeSvx3DLightcolor7Item(const Color& rCol) {
193 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7);
196 inline SvxColorItem makeSvx3DLightcolor8Item(const Color& rCol) {
197 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8);
200 inline SvxColorItem makeSvx3DAmbientcolorItem(const Color& rCol) {
201 return SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR);
204 inline SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal) {
205 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal);
208 inline SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal) {
209 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal);
212 inline SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal) {
213 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal);
216 inline SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal) {
217 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal);
220 inline SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal) {
221 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal);
224 inline SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal) {
225 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal);
228 inline SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal) {
229 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal);
232 inline SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal) {
233 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal);
236 inline SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector& rVec) {
237 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec);
240 inline SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector& rVec) {
241 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec);
244 inline SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector& rVec) {
245 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec);
248 inline SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector& rVec) {
249 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec);
252 inline SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector& rVec) {
253 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec);
256 inline SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector& rVec) {
257 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec);
260 inline SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector& rVec) {
261 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec);
264 inline SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector& rVec) {
265 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec);
268 inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
269 return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal);
272 class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item {
273 public:
274 Svx3DShadeModeItem(sal_uInt16 nVal = 2);
276 // use drawing::ShadeMode
277 SVX_DLLPRIVATE virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
278 SVX_DLLPRIVATE virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
279 SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE;
283 // #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
284 class Svx3DSmoothNormalsItem : public SfxBoolItem {
285 public:
286 Svx3DSmoothNormalsItem(bool bVal = true);
287 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
288 virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
289 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
292 // #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
293 class Svx3DSmoothLidsItem : public SfxBoolItem {
294 public:
295 Svx3DSmoothLidsItem(bool bVal = false);
296 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
297 virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
298 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
301 // #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
302 class Svx3DCharacterModeItem : public SfxBoolItem {
303 public:
304 Svx3DCharacterModeItem(bool bVal = false);
305 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
306 virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
307 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
310 // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
311 class SVX_DLLPUBLIC Svx3DCloseFrontItem : public SfxBoolItem {
312 public:
313 Svx3DCloseFrontItem(bool bVal = true);
314 SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
315 SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
316 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
319 // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
320 class SVX_DLLPUBLIC Svx3DCloseBackItem : public SfxBoolItem {
321 public:
322 Svx3DCloseBackItem(bool bVal = true);
323 SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
324 SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
325 SfxPoolItem * Clone(SfxItemPool *) const SAL_OVERRIDE;
328 #endif // INCLUDED_SVX_SVX3DITEMS_HXX
330 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */