LibreOffice Module svx (master)  1
svx3ditems.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SVX_SVX3DITEMS_HXX
20 #define INCLUDED_SVX_SVX3DITEMS_HXX
21 
22 #include <config_options.h>
23 #include <svl/intitem.hxx>
24 #include <svl/eitem.hxx>
25 
26 
27 #include <editeng/colritem.hxx>
28 #include <svx/e3ditem.hxx>
29 #include <svx/viewpt3d.hxx>
30 #include <svx/svddef.hxx>
31 #include <svx/svxdllapi.h>
32 
33 // Svx3D _3DOBJ_ Items
36 }
37 
38 inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
40 }
41 
42 inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
43  return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
44 }
45 
48 }
49 
52 }
53 
54 inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) {
56 }
57 
60 }
61 
62 // #i28528#
63 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
65 public:
66  Svx3DReducedLineGeometryItem(bool bVal = false);
67  Svx3DReducedLineGeometryItem* Clone(SfxItemPool * = nullptr) const override;
68 };
69 
70 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem : public SfxUInt16Item {
71 public:
72  Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
73 
74  // use drawing::NormalsKind
75  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
76  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
77  SVX_DLLPRIVATE virtual Svx3DNormalsKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
78 };
79 
82 }
83 
84 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem : public SfxUInt16Item {
85 public:
86  Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
87 
88  // use drawing::TextureProjectionMode
89  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
90  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
91  SVX_DLLPRIVATE virtual Svx3DTextureProjectionXItem* Clone(SfxItemPool* pPool = nullptr) const override;
92 };
93 
94 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem : public SfxUInt16Item {
95 public:
96  Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
97 
98  // use drawing::TextureProjectionMode
99  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
100  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
101  virtual Svx3DTextureProjectionYItem* Clone(SfxItemPool* pPool = nullptr) const override;
102 };
103 
105  return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
106 }
107 
110 }
111 
114 }
115 
118 }
119 
120 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public SfxUInt16Item {
121 public:
122  Svx3DTextureKindItem(sal_uInt16 nVal = 3);
123 
124  // use drawing::TextureKind
125  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
126  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
127  SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
128 };
129 
130 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final : public SfxUInt16Item {
131 public:
132  Svx3DTextureModeItem(sal_uInt16 nVal = 2);
133 
134  // use drawing:TextureMode
135  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
136  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
137  SVX_DLLPRIVATE virtual Svx3DTextureModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
138 };
139 
142 }
143 
144 // Svx3D _3DSCENE_ Items
145 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem : public SfxUInt16Item {
146 public:
147  Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
148 
149  // use drawing::ProjectionMode
150  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
151  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
152  SVX_DLLPRIVATE virtual Svx3DPerspectiveItem* Clone(SfxItemPool* pPool = nullptr) const override;
153 };
154 
155 inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
157 }
158 
159 inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
161 }
162 
165 }
166 
169 }
170 
173 }
174 
177 }
178 
181 }
182 
185 }
186 
189 }
190 
193 }
194 
197 }
198 
201 }
202 
205 }
206 
209 }
210 
213 }
214 
217 }
218 
221 }
222 
225 }
226 
229 }
230 
233 }
234 
237 }
238 
241 }
242 
245 }
246 
249 }
250 
253 }
254 
257 }
258 
261 }
262 
265 }
266 
267 inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
269 }
270 
271 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DShadeModeItem : public SfxUInt16Item {
272 public:
273  Svx3DShadeModeItem(sal_uInt16 nVal = 2);
274 
275  // use drawing::ShadeMode
276  SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
277  SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
278  SVX_DLLPRIVATE virtual Svx3DShadeModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
279 };
280 
281 
282 // #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
284 public:
285  Svx3DSmoothNormalsItem(bool bVal = true);
286  Svx3DSmoothNormalsItem* Clone(SfxItemPool * = nullptr) const override;
287 };
288 
289 // #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
291 public:
292  Svx3DSmoothLidsItem(bool bVal = false);
293  Svx3DSmoothLidsItem* Clone(SfxItemPool * = nullptr) const override;
294 };
295 
296 // #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
298 public:
299  Svx3DCharacterModeItem(bool bVal = false);
300  Svx3DCharacterModeItem* Clone(SfxItemPool * = nullptr) const override;
301 };
302 
303 // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
304 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseFrontItem : public SfxBoolItem {
305 public:
306  Svx3DCloseFrontItem(bool bVal = true);
307  Svx3DCloseFrontItem* Clone(SfxItemPool * = nullptr) const override;
308 };
309 
310 // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
311 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseBackItem : public SfxBoolItem {
312 public:
313  Svx3DCloseBackItem(bool bVal = true);
314  Svx3DCloseBackItem* Clone(SfxItemPool * = nullptr) const override;
315 };
316 
317 #endif // INCLUDED_SVX_SVX3DITEMS_HXX
318 
319 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Svx3DReducedLineGeometryItem(bool bVal=false)
Definition: svx3ditems.cxx:34
SvxColorItem makeSvx3DLightcolor7Item(const Color &rCol)
Definition: svx3ditems.hxx:191
SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal)
Definition: svx3ditems.hxx:207
SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal)
Definition: svx3ditems.hxx:58
virtual SfxBoolItem * Clone(SfxItemPool *=nullptr) const override
#define SDRATTR_3DSCENE_TWO_SIDED_LIGHTING
Definition: svddef.hxx:366
#define SDRATTR_3DOBJ_PERCENT_DIAGONAL
Definition: svddef.hxx:328
#define SDRATTR_3DOBJ_VERT_SEGS
Definition: svddef.hxx:332
#define SDRATTR_3DSCENE_LIGHTON_4
Definition: svddef.hxx:379
ProjectionType
Definition: viewpt3d.hxx:38
#define SDRATTR_3DOBJ_MAT_EMISSION
Definition: svddef.hxx:341
Svx3DReducedLineGeometryItem * Clone(SfxItemPool *=nullptr) const override
Definition: svx3ditems.cxx:38
#define SDRATTR_3DSCENE_LIGHTON_2
Definition: svddef.hxx:377
#define SDRATTR_3DOBJ_DOUBLE_SIDED
Definition: svddef.hxx:334
SvxColorItem makeSvx3DLightcolor2Item(const Color &rCol)
Definition: svx3ditems.hxx:171
SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:50
SfxUInt16Item(sal_uInt16 which=0, sal_uInt16 nValue=0)
SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:116
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal)
Definition: svx3ditems.hxx:80
#define SDRATTR_3DSCENE_LIGHTON_8
Definition: svddef.hxx:383
#define SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY
Definition: svddef.hxx:343
SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal)
Definition: svx3ditems.hxx:227
SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:34
#define SDRATTR_3DSCENE_LIGHTCOLOR_3
Definition: svddef.hxx:369
SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal)
Definition: svx3ditems.hxx:203
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final SfxBoolItem makeSvx3DTextureFilterItem(bool bVal)
Definition: svx3ditems.hxx:140
SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:247
#define SDRATTR_3DOBJ_NORMALS_INVERT
Definition: svddef.hxx:336
#define SDRATTR_3DSCENE_LIGHTCOLOR_6
Definition: svddef.hxx:372
#define SDRATTR_3DSCENE_FOCAL_LENGTH
Definition: svddef.hxx:365
#define SDRATTR_3DSCENE_LIGHTON_5
Definition: svddef.hxx:380
#define SDRATTR_3DOBJ_END_ANGLE
Definition: svddef.hxx:333
SvxColorItem makeSvx3DMaterialSpecularItem(const Color &rCol)
Definition: svx3ditems.hxx:112
#define SDRATTR_3DSCENE_LIGHTON_3
Definition: svddef.hxx:378
#define SDRATTR_3DSCENE_LIGHTDIRECTION_5
Definition: svddef.hxx:388
SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:255
#define SDRATTR_3DSCENE_LIGHTCOLOR_1
Definition: svddef.hxx:367
SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:159
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
#define SDRATTR_3DSCENE_LIGHTCOLOR_2
Definition: svddef.hxx:368
#define SDRATTR_3DSCENE_LIGHTDIRECTION_6
Definition: svddef.hxx:389
#define SDRATTR_3DSCENE_LIGHTDIRECTION_4
Definition: svddef.hxx:387
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:155
#define SDRATTR_3DSCENE_LIGHTDIRECTION_8
Definition: svddef.hxx:391
#define SDRATTR_3DOBJ_HORZ_SEGS
Definition: svddef.hxx:331
#define SDRATTR_3DOBJ_BACKSCALE
Definition: svddef.hxx:329
#define SDRATTR_3DSCENE_LIGHTON_1
Definition: svddef.hxx:376
SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:38
#define SDRATTR_3DOBJ_DEPTH
Definition: svddef.hxx:330
SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:46
SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:251
#define SDRATTR_3DSCENE_DISTANCE
Definition: svddef.hxx:364
SvxColorItem makeSvx3DLightcolor1Item(const Color &rCol)
Definition: svx3ditems.hxx:167
#define SDRATTR_3DSCENE_LIGHTDIRECTION_7
Definition: svddef.hxx:390
#define SDRATTR_3DSCENE_LIGHTCOLOR_4
Definition: svddef.hxx:370
SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:42
SvxColorItem makeSvx3DLightcolor4Item(const Color &rCol)
Definition: svx3ditems.hxx:179
SvxColorItem makeSvx3DLightcolor8Item(const Color &rCol)
Definition: svx3ditems.hxx:195
SvxColorItem makeSvx3DMaterialEmissionItem(const Color &rCol)
Definition: svx3ditems.hxx:108
SvxColorItem makeSvx3DAmbientcolorItem(const Color &rCol)
Definition: svx3ditems.hxx:199
#define SDRATTR_3DSCENE_LIGHTCOLOR_8
Definition: svddef.hxx:374
#define SDRATTR_3DOBJ_MAT_SPECULAR
Definition: svddef.hxx:342
SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal)
Definition: svx3ditems.hxx:215
SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:239
unsigned char sal_uInt8
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem SfxBoolItem makeSvx3DShadow3DItem(bool bVal)
Definition: svx3ditems.hxx:104
SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:54
SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:235
SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal)
Definition: svx3ditems.hxx:231
SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:243
#define SDRATTR_3DSCENE_LIGHTON_7
Definition: svddef.hxx:382
SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal)
Definition: svx3ditems.hxx:211
#define SDRATTR_3DSCENE_SHADOW_SLANT
Definition: svddef.hxx:392
virtual SfxUInt16Item * Clone(SfxItemPool *=nullptr) const override
#define SDRATTR_3DSCENE_AMBIENTCOLOR
Definition: svddef.hxx:375
SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal)
Definition: svx3ditems.hxx:163
#define SDRATTR_3DOBJ_TEXTURE_FILTER
Definition: svddef.hxx:346
SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:263
SvxColorItem makeSvx3DLightcolor3Item(const Color &rCol)
Definition: svx3ditems.hxx:175
SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal)
Definition: svx3ditems.hxx:219
#define SDRATTR_3DOBJ_SHADOW_3D
Definition: svddef.hxx:339
#define SDRATTR_3DSCENE_LIGHTDIRECTION_3
Definition: svddef.hxx:386
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
#define SDRATTR_3DSCENE_LIGHTCOLOR_7
Definition: svddef.hxx:373
#define SDRATTR_3DSCENE_LIGHTON_6
Definition: svddef.hxx:381
SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:267
#define SDRATTR_3DSCENE_LIGHTDIRECTION_1
Definition: svddef.hxx:384
SvxColorItem makeSvx3DLightcolor6Item(const Color &rCol)
Definition: svx3ditems.hxx:187
#define SDRATTR_3DSCENE_LIGHTDIRECTION_2
Definition: svddef.hxx:385
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
#define SDRATTR_3DSCENE_LIGHTCOLOR_5
Definition: svddef.hxx:371
SvxColorItem makeSvx3DLightcolor5Item(const Color &rCol)
Definition: svx3ditems.hxx:183
SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal)
Definition: svx3ditems.hxx:223
SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:259