Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svx/svx3ditems.hxx
Line
Count
Source
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
34
2.85k
inline SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal) {
35
2.85k
    return SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal);
36
2.85k
}
37
38
0
inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
39
0
    return SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal);
40
0
}
41
42
9.79k
inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
43
9.79k
    return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
44
9.79k
}
45
46
0
inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) {
47
0
    return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal);
48
0
}
49
50
0
inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) {
51
0
    return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal);
52
0
}
53
54
0
inline SfxUInt16Item makeSvx3DEndAngleItem(sal_uInt16 nVal) {
55
0
    return SfxUInt16Item(SDRATTR_3DOBJ_END_ANGLE, nVal);
56
0
}
57
58
3.50k
inline SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal) {
59
3.50k
    return SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal);
60
3.50k
}
61
62
// #i28528#
63
// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
64
class Svx3DReducedLineGeometryItem final : public SfxBoolItem {
65
public:
66
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DReducedLineGeometryItem)
67
    Svx3DReducedLineGeometryItem(bool bVal = false);
68
    Svx3DReducedLineGeometryItem* Clone(SfxItemPool * = nullptr) const override;
69
};
70
71
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem final : public SfxUInt16Item {
72
public:
73
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DNormalsKindItem)
74
    Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
75
76
    // use drawing::NormalsKind
77
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
78
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
79
    SVX_DLLPRIVATE virtual Svx3DNormalsKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
80
};
81
82
0
inline SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal) {
83
0
    return SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal);
84
0
}
85
86
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem final : public SfxUInt16Item {
87
public:
88
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DTextureProjectionXItem)
89
    Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
90
91
    // use drawing::TextureProjectionMode
92
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
93
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
94
    SVX_DLLPRIVATE virtual Svx3DTextureProjectionXItem* Clone(SfxItemPool* pPool = nullptr) const override;
95
};
96
97
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem final : public SfxUInt16Item {
98
public:
99
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DTextureProjectionYItem)
100
    Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
101
102
    // use drawing::TextureProjectionMode
103
    virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
104
    virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
105
    virtual Svx3DTextureProjectionYItem* Clone(SfxItemPool* pPool = nullptr) const override;
106
};
107
108
0
inline SfxBoolItem makeSvx3DShadow3DItem(bool bVal) {
109
0
    return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
110
0
}
111
112
0
inline SvxColorItem makeSvx3DMaterialEmissionItem(const Color& rCol) {
113
0
    return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION);
114
0
}
115
116
9.79k
inline SvxColorItem makeSvx3DMaterialSpecularItem(const Color& rCol) {
117
9.79k
    return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR);
118
9.79k
}
119
120
9.79k
inline SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
121
9.79k
    return SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal);
122
9.79k
}
123
124
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public SfxUInt16Item {
125
public:
126
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DTextureKindItem)
127
    Svx3DTextureKindItem(sal_uInt16 nVal = 2);
128
129
    // use drawing::TextureKind2
130
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
131
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
132
    SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
133
};
134
135
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final : public SfxUInt16Item {
136
public:
137
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DTextureModeItem)
138
    Svx3DTextureModeItem(sal_uInt16 nVal = 2);
139
140
    // use drawing:TextureMode
141
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
142
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
143
    SVX_DLLPRIVATE virtual Svx3DTextureModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
144
};
145
146
0
inline SfxBoolItem makeSvx3DTextureFilterItem(bool bVal) {
147
0
    return SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal);
148
0
}
149
150
// Svx3D _3DSCENE_ Items
151
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem final : public SfxUInt16Item {
152
public:
153
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DPerspectiveItem)
154
    Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
155
156
    // use drawing::ProjectionMode
157
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
158
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
159
    SVX_DLLPRIVATE virtual Svx3DPerspectiveItem* Clone(SfxItemPool* pPool = nullptr) const override;
160
};
161
162
5.70k
inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
163
5.70k
    return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal);
164
5.70k
}
165
166
5.70k
inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
167
5.70k
    return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal);
168
5.70k
}
169
170
1.81k
inline SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal) {
171
1.81k
    return SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal);
172
1.81k
}
173
174
2.85k
inline SvxColorItem makeSvx3DLightcolor1Item(const Color& rCol) {
175
2.85k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1);
176
2.85k
}
177
178
2.85k
inline SvxColorItem makeSvx3DLightcolor2Item(const Color& rCol) {
179
2.85k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2);
180
2.85k
}
181
182
0
inline SvxColorItem makeSvx3DLightcolor3Item(const Color& rCol) {
183
0
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3);
184
0
}
185
186
2.66k
inline SvxColorItem makeSvx3DLightcolor4Item(const Color& rCol) {
187
2.66k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4);
188
2.66k
}
189
190
2.81k
inline SvxColorItem makeSvx3DLightcolor5Item(const Color& rCol) {
191
2.81k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5);
192
2.81k
}
193
194
2.81k
inline SvxColorItem makeSvx3DLightcolor6Item(const Color& rCol) {
195
2.81k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6);
196
2.81k
}
197
198
2.81k
inline SvxColorItem makeSvx3DLightcolor7Item(const Color& rCol) {
199
2.81k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7);
200
2.81k
}
201
202
2.81k
inline SvxColorItem makeSvx3DLightcolor8Item(const Color& rCol) {
203
2.81k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8);
204
2.81k
}
205
206
2.85k
inline SvxColorItem makeSvx3DAmbientcolorItem(const Color& rCol) {
207
2.85k
    return SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR);
208
2.85k
}
209
210
5.51k
inline SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal) {
211
5.51k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal);
212
5.51k
}
213
214
2.85k
inline SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal) {
215
2.85k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal);
216
2.85k
}
217
218
0
inline SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal) {
219
0
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal);
220
0
}
221
222
2.66k
inline SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal) {
223
2.66k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal);
224
2.66k
}
225
226
2.81k
inline SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal) {
227
2.81k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal);
228
2.81k
}
229
230
2.81k
inline SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal) {
231
2.81k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal);
232
2.81k
}
233
234
2.81k
inline SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal) {
235
2.81k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal);
236
2.81k
}
237
238
2.81k
inline SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal) {
239
2.81k
    return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal);
240
2.81k
}
241
242
2.85k
inline SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector& rVec) {
243
2.85k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec);
244
2.85k
}
245
246
2.85k
inline SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector& rVec) {
247
2.85k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec);
248
2.85k
}
249
250
0
inline SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector& rVec) {
251
0
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec);
252
0
}
253
254
2.66k
inline SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector& rVec) {
255
2.66k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec);
256
2.66k
}
257
258
2.81k
inline SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector& rVec) {
259
2.81k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec);
260
2.81k
}
261
262
2.81k
inline SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector& rVec) {
263
2.81k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec);
264
2.81k
}
265
266
2.81k
inline SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector& rVec) {
267
2.81k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec);
268
2.81k
}
269
270
2.81k
inline SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector& rVec) {
271
2.81k
    return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec);
272
2.81k
}
273
274
0
inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
275
0
    return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal);
276
0
}
277
278
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DShadeModeItem final : public SfxUInt16Item {
279
public:
280
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DShadeModeItem)
281
    Svx3DShadeModeItem(sal_uInt16 nVal = 2);
282
283
    // use drawing::ShadeMode
284
    SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
285
    SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
286
    SVX_DLLPRIVATE virtual Svx3DShadeModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
287
};
288
289
290
// #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
291
class Svx3DSmoothNormalsItem final : public SfxBoolItem {
292
public:
293
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DSmoothNormalsItem)
294
    Svx3DSmoothNormalsItem(bool bVal = true);
295
    Svx3DSmoothNormalsItem* Clone(SfxItemPool * = nullptr) const override;
296
};
297
298
// #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
299
class Svx3DSmoothLidsItem final : public SfxBoolItem {
300
public:
301
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DSmoothLidsItem)
302
    Svx3DSmoothLidsItem(bool bVal = false);
303
    Svx3DSmoothLidsItem* Clone(SfxItemPool * = nullptr) const override;
304
};
305
306
// #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
307
class Svx3DCharacterModeItem final : public SfxBoolItem {
308
public:
309
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DCharacterModeItem)
310
    Svx3DCharacterModeItem(bool bVal = false);
311
    Svx3DCharacterModeItem* Clone(SfxItemPool * = nullptr) const override;
312
};
313
314
// #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
315
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseFrontItem final : public SfxBoolItem {
316
public:
317
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DCloseFrontItem)
318
    Svx3DCloseFrontItem(bool bVal = true);
319
    Svx3DCloseFrontItem* Clone(SfxItemPool * = nullptr) const override;
320
};
321
322
// #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
323
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseBackItem final : public SfxBoolItem {
324
public:
325
    DECLARE_ITEM_TYPE_FUNCTION(Svx3DCloseBackItem)
326
    Svx3DCloseBackItem(bool bVal = true);
327
    Svx3DCloseBackItem* Clone(SfxItemPool * = nullptr) const override;
328
};
329
330
#endif // INCLUDED_SVX_SVX3DITEMS_HXX
331
332
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */