Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/chart2/source/model/main/DataPointProperties.cxx
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
20
#include "DataPointProperties.hxx"
21
#include <LinePropertiesHelper.hxx>
22
#include <FillProperties.hxx>
23
#include <unonames.hxx>
24
25
#include <com/sun/star/beans/PropertyAttribute.hpp>
26
#include <com/sun/star/drawing/FillStyle.hpp>
27
#include <com/sun/star/drawing/LineStyle.hpp>
28
#include <com/sun/star/drawing/LineDash.hpp>
29
#include <com/sun/star/drawing/LineCap.hpp>
30
#include <com/sun/star/drawing/BitmapMode.hpp>
31
#include <com/sun/star/drawing/RectanglePoint.hpp>
32
#include <com/sun/star/chart2/RelativePosition.hpp>
33
#include <com/sun/star/chart2/RelativeSize.hpp>
34
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
35
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
36
#include <com/sun/star/chart2/DataPointLabel.hpp>
37
#include <com/sun/star/chart2/Symbol.hpp>
38
#include <com/sun/star/util/XComplexColor.hpp>
39
40
#include <tools/color.hxx>
41
42
using namespace ::com::sun::star;
43
44
using ::com::sun::star::beans::Property;
45
46
namespace chart
47
{
48
49
void DataPointProperties::AddPropertiesToVector(
50
    std::vector< Property > & rOutProperties )
51
0
{
52
    // DataPointProperties
53
54
    // Common
55
56
0
    rOutProperties.emplace_back( "Color",
57
0
                  PROP_DATAPOINT_COLOR,
58
0
                  cppu::UnoType<sal_Int32>::get(),
59
0
                  beans::PropertyAttribute::BOUND
60
0
                  | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
61
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
62
63
0
    rOutProperties.emplace_back("ComplexColor",
64
0
                  PROP_DATAPOINT_COMPLEX_COLOR,
65
0
                  cppu::UnoType<util::XComplexColor>::get(),
66
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT );
67
68
0
    rOutProperties.emplace_back( "FillColor",
69
0
                  PROP_DATAPOINT_COLOR,
70
0
                  cppu::UnoType<sal_Int32>::get(),
71
0
                  beans::PropertyAttribute::BOUND
72
0
                  | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
73
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
74
75
0
    rOutProperties.emplace_back("FillComplexColor",
76
0
                  PROP_DATAPOINT_COMPLEX_COLOR,
77
0
                  cppu::UnoType<util::XComplexColor>::get(),
78
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT );
79
80
0
    rOutProperties.emplace_back( "Transparency",
81
0
                  PROP_DATAPOINT_TRANSPARENCY,
82
0
                  cppu::UnoType<sal_Int16>::get(),
83
0
                  beans::PropertyAttribute::BOUND
84
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
85
86
0
    rOutProperties.emplace_back( "FillTransparence",
87
0
                  PROP_DATAPOINT_TRANSPARENCY,
88
0
                  cppu::UnoType<sal_Int16>::get(),
89
0
                  beans::PropertyAttribute::BOUND
90
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
91
92
    // Fill Properties
93
0
    rOutProperties.emplace_back( "FillStyle",
94
0
                  PROP_DATAPOINT_FILL_STYLE,
95
0
                  cppu::UnoType<drawing::FillStyle>::get(),
96
0
                  beans::PropertyAttribute::BOUND
97
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
98
99
0
    rOutProperties.emplace_back( "TransparencyGradientName",
100
0
                  PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME,
101
0
                  cppu::UnoType<OUString>::get(),
102
0
                  beans::PropertyAttribute::BOUND
103
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
104
0
                  | beans::PropertyAttribute::MAYBEVOID );
105
106
0
    rOutProperties.emplace_back( "FillTransparenceGradientName",
107
0
                  PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME,
108
0
                  cppu::UnoType<OUString>::get(),
109
0
                  beans::PropertyAttribute::BOUND
110
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
111
0
                  | beans::PropertyAttribute::MAYBEVOID );
112
113
0
    rOutProperties.emplace_back( "GradientName",
114
0
                  PROP_DATAPOINT_GRADIENT_NAME,
115
0
                  cppu::UnoType<OUString>::get(),
116
0
                  beans::PropertyAttribute::BOUND
117
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
118
0
                  | beans::PropertyAttribute::MAYBEVOID );
119
120
0
    rOutProperties.emplace_back( "FillGradientName",
121
0
                  PROP_DATAPOINT_GRADIENT_NAME,
122
0
                  cppu::UnoType<OUString>::get(),
123
0
                  beans::PropertyAttribute::BOUND
124
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
125
0
                  | beans::PropertyAttribute::MAYBEVOID );
126
127
0
    rOutProperties.emplace_back( "GradientStepCount",
128
0
                  PROP_DATAPOINT_GRADIENT_STEPCOUNT,
129
0
                  cppu::UnoType<sal_Int16>::get(),
130
0
                  beans::PropertyAttribute::BOUND
131
0
                  | beans::PropertyAttribute::MAYBEVOID );
132
133
0
    rOutProperties.emplace_back( "FillGradientStepCount",
134
0
                  PROP_DATAPOINT_GRADIENT_STEPCOUNT,
135
0
                  cppu::UnoType<sal_Int16>::get(),
136
0
                  beans::PropertyAttribute::BOUND
137
0
                  | beans::PropertyAttribute::MAYBEVOID );
138
139
0
    rOutProperties.emplace_back( "HatchName",
140
0
                  PROP_DATAPOINT_HATCH_NAME,
141
0
                  cppu::UnoType<OUString>::get(),
142
0
                  beans::PropertyAttribute::BOUND
143
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
144
0
                  | beans::PropertyAttribute::MAYBEVOID );
145
146
0
    rOutProperties.emplace_back( "FillHatchName",
147
0
                  PROP_DATAPOINT_HATCH_NAME,
148
0
                  cppu::UnoType<OUString>::get(),
149
0
                  beans::PropertyAttribute::BOUND
150
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
151
0
                  | beans::PropertyAttribute::MAYBEVOID );
152
153
0
    rOutProperties.emplace_back( "FillBitmapName",
154
0
                  PROP_DATAPOINT_FILL_BITMAP_NAME,
155
0
                  cppu::UnoType<OUString>::get(),
156
0
                  beans::PropertyAttribute::BOUND
157
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
158
0
                  | beans::PropertyAttribute::MAYBEVOID  );
159
160
0
    rOutProperties.emplace_back( "FillBackground",
161
0
                  PROP_DATAPOINT_FILL_BACKGROUND,
162
0
                  cppu::UnoType<bool>::get(),
163
0
                  beans::PropertyAttribute::BOUND
164
0
                  | beans::PropertyAttribute::MAYBEDEFAULT
165
0
                  | beans::PropertyAttribute::MAYBEVOID );
166
167
    // border for filled objects
168
0
    rOutProperties.emplace_back( "BorderColor",
169
0
                  PROP_DATAPOINT_BORDER_COLOR,
170
0
                  cppu::UnoType<sal_Int32>::get(),
171
0
                  beans::PropertyAttribute::BOUND
172
0
                  | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
173
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
174
175
0
    rOutProperties.emplace_back("BorderComplexColor",
176
0
                  PROP_DATAPOINT_BORDER_COMPLEX_COLOR,
177
0
                  cppu::UnoType<util::XComplexColor>::get(),
178
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT);
179
180
0
    rOutProperties.emplace_back( "BorderStyle",
181
0
                  PROP_DATAPOINT_BORDER_STYLE,
182
0
                  cppu::UnoType<drawing::LineStyle>::get(),
183
0
                  beans::PropertyAttribute::BOUND
184
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
185
186
0
    rOutProperties.emplace_back( "BorderWidth",
187
0
                  PROP_DATAPOINT_BORDER_WIDTH,
188
0
                  cppu::UnoType<sal_Int32>::get(),
189
0
                  beans::PropertyAttribute::BOUND
190
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
191
192
0
    rOutProperties.emplace_back( "BorderDashName",
193
0
                  PROP_DATAPOINT_BORDER_DASH_NAME,
194
0
                  cppu::UnoType<OUString>::get(),
195
0
                  beans::PropertyAttribute::BOUND
196
0
                  | beans::PropertyAttribute::MAYBEVOID );
197
198
0
    rOutProperties.emplace_back( "BorderTransparency",
199
0
                  PROP_DATAPOINT_BORDER_TRANSPARENCY,
200
0
                  cppu::UnoType<sal_Int16>::get(),
201
0
                  beans::PropertyAttribute::BOUND
202
0
                  | beans::PropertyAttribute::MAYBEVOID );
203
204
    // Line Properties
205
206
0
    rOutProperties.emplace_back( "LineColor",
207
0
                  PROP_DATAPOINT_BORDER_COLOR,
208
0
                  cppu::UnoType<sal_Int32>::get(),
209
0
                  beans::PropertyAttribute::BOUND
210
0
                  | beans::PropertyAttribute::MAYBEVOID
211
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
212
213
0
    rOutProperties.emplace_back("LineComplexColor",
214
0
                  PROP_DATAPOINT_BORDER_COMPLEX_COLOR,
215
0
                  cppu::UnoType<util::XComplexColor>::get(),
216
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT );
217
218
0
    rOutProperties.emplace_back( "LineStyle",
219
0
                  LinePropertiesHelper::PROP_LINE_STYLE,
220
0
                  cppu::UnoType<drawing::LineStyle>::get(),
221
0
                  beans::PropertyAttribute::BOUND
222
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
223
224
0
    rOutProperties.emplace_back( "LineWidth",
225
0
                  LinePropertiesHelper::PROP_LINE_WIDTH,
226
0
                  cppu::UnoType<sal_Int32>::get(),
227
0
                  beans::PropertyAttribute::BOUND
228
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
229
230
0
    rOutProperties.emplace_back( "LineDash",
231
0
                   LinePropertiesHelper::PROP_LINE_DASH,
232
0
                   cppu::UnoType<drawing::LineDash>::get(),
233
0
                   beans::PropertyAttribute::BOUND
234
0
                   | beans::PropertyAttribute::MAYBEVOID );
235
236
0
    rOutProperties.emplace_back( "LineDashName",
237
0
                  LinePropertiesHelper::PROP_LINE_DASH_NAME,
238
0
                  cppu::UnoType<OUString>::get(),
239
0
                  beans::PropertyAttribute::BOUND
240
0
                  | beans::PropertyAttribute::MAYBEVOID );
241
242
0
    rOutProperties.emplace_back( "LineTransparence",
243
0
                  PROP_DATAPOINT_BORDER_TRANSPARENCY,
244
0
                  cppu::UnoType<sal_Int16>::get(),
245
0
                  beans::PropertyAttribute::BOUND
246
0
                  | beans::PropertyAttribute::MAYBEVOID );
247
248
0
    rOutProperties.emplace_back( "LineCap",
249
0
                  ::chart::LinePropertiesHelper::PROP_LINE_CAP,
250
0
                  cppu::UnoType<drawing::LineCap>::get(),
251
0
                  beans::PropertyAttribute::BOUND
252
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
253
254
    // FillProperties
255
    // bitmap properties
256
0
    rOutProperties.emplace_back( "FillBitmapOffsetX",
257
0
                  FillProperties::PROP_FILL_BITMAP_OFFSETX,
258
0
                  cppu::UnoType<sal_Int16>::get(),
259
0
                  beans::PropertyAttribute::BOUND
260
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
261
262
0
    rOutProperties.emplace_back( "FillBitmapOffsetY",
263
0
                  FillProperties::PROP_FILL_BITMAP_OFFSETY,
264
0
                  cppu::UnoType<sal_Int16>::get(),
265
0
                  beans::PropertyAttribute::BOUND
266
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
267
268
0
    rOutProperties.emplace_back( "FillBitmapPositionOffsetX",
269
0
                  FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX,
270
0
                  cppu::UnoType<sal_Int16>::get(),
271
0
                  beans::PropertyAttribute::BOUND
272
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
273
274
0
    rOutProperties.emplace_back( "FillBitmapPositionOffsetY",
275
0
                  FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY,
276
0
                  cppu::UnoType<sal_Int16>::get(),
277
0
                  beans::PropertyAttribute::BOUND
278
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
279
280
0
    rOutProperties.emplace_back( "FillBitmapRectanglePoint",
281
0
                  FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT,
282
0
                  cppu::UnoType<drawing::RectanglePoint>::get(),
283
0
                  beans::PropertyAttribute::BOUND
284
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
285
286
0
    rOutProperties.emplace_back( "FillBitmapLogicalSize",
287
0
                  FillProperties::PROP_FILL_BITMAP_LOGICALSIZE,
288
0
                  cppu::UnoType<bool>::get(),
289
0
                  beans::PropertyAttribute::BOUND
290
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
291
292
0
    rOutProperties.emplace_back( "FillBitmapSizeX",
293
0
                  FillProperties::PROP_FILL_BITMAP_SIZEX,
294
0
                  cppu::UnoType<sal_Int32>::get(),
295
0
                  beans::PropertyAttribute::BOUND
296
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
297
298
0
    rOutProperties.emplace_back( "FillBitmapSizeY",
299
0
                  FillProperties::PROP_FILL_BITMAP_SIZEY,
300
0
                  cppu::UnoType<sal_Int32>::get(),
301
0
                  beans::PropertyAttribute::BOUND
302
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
303
304
0
    rOutProperties.emplace_back( "FillBitmapMode",
305
0
                  FillProperties::PROP_FILL_BITMAP_MODE,
306
0
                  cppu::UnoType<drawing::BitmapMode>::get(),
307
0
                  beans::PropertyAttribute::BOUND
308
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
309
310
    // others
311
0
    rOutProperties.emplace_back( "Symbol",
312
0
                  PROP_DATAPOINT_SYMBOL_PROP,
313
0
                  cppu::UnoType<chart2::Symbol>::get(),
314
0
                  beans::PropertyAttribute::BOUND
315
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
316
0
    rOutProperties.emplace_back( "Offset",
317
0
                  PROP_DATAPOINT_OFFSET,
318
0
                  cppu::UnoType<double>::get(),
319
0
                  beans::PropertyAttribute::BOUND
320
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
321
0
    rOutProperties.emplace_back( "Geometry3D",
322
0
                  PROP_DATAPOINT_GEOMETRY3D,
323
0
                  cppu::UnoType<sal_Int32>::get(),
324
0
                  beans::PropertyAttribute::BOUND
325
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
326
327
0
    rOutProperties.emplace_back( CHART_UNONAME_NUMFMT,
328
0
                  PROP_DATAPOINT_NUMBER_FORMAT,
329
0
                  cppu::UnoType<sal_Int32>::get(),
330
0
                  beans::PropertyAttribute::BOUND
331
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
332
333
0
    rOutProperties.emplace_back( CHART_UNONAME_LINK_TO_SRC_NUMFMT,
334
0
                  PROP_DATAPOINT_LINK_NUMBERFORMAT_TO_SOURCE,
335
0
                  cppu::UnoType<bool>::get(),
336
0
                  beans::PropertyAttribute::BOUND
337
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
338
339
    //additional 'PercentageNumberFormat'
340
0
    rOutProperties.emplace_back( "PercentageNumberFormat",
341
0
                  PROP_DATAPOINT_PERCENTAGE_NUMBER_FORMAT,
342
0
                  cppu::UnoType<sal_Int32>::get(),
343
0
                  beans::PropertyAttribute::BOUND
344
0
                  | beans::PropertyAttribute::MAYBEVOID );
345
346
0
    rOutProperties.emplace_back( "LabelPlacement",
347
0
                  PROP_DATAPOINT_LABEL_PLACEMENT,
348
0
                  cppu::UnoType<sal_Int32>::get(),
349
0
                  beans::PropertyAttribute::BOUND
350
0
                  | beans::PropertyAttribute::MAYBEVOID );
351
352
0
    rOutProperties.emplace_back( "ReferencePageSize",
353
0
                  PROP_DATAPOINT_REFERENCE_DIAGRAM_SIZE,
354
0
                  cppu::UnoType<awt::Size>::get(),
355
0
                  beans::PropertyAttribute::BOUND
356
0
                  | beans::PropertyAttribute::MAYBEVOID );
357
358
0
    rOutProperties.emplace_back( "TextRotation",
359
0
                  PROP_DATAPOINT_TEXT_ROTATION,
360
0
                  cppu::UnoType<double>::get(),
361
0
                  beans::PropertyAttribute::BOUND
362
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
363
364
0
    rOutProperties.emplace_back( "InvertNegative",
365
0
                  PROP_DATAPOINT_INVERT_NEGATIVE,
366
0
                  cppu::UnoType<bool>::get(),
367
0
                  beans::PropertyAttribute::BOUND
368
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
369
370
    // statistics
371
0
    rOutProperties.emplace_back( CHART_UNONAME_ERRORBAR_X,
372
0
                  PROP_DATAPOINT_ERROR_BAR_X,
373
                  // XPropertySet supporting service ErrorBar
374
0
                  cppu::UnoType<beans::XPropertySet>::get(),
375
0
                  beans::PropertyAttribute::BOUND
376
0
                  | beans::PropertyAttribute::MAYBEVOID );
377
0
    rOutProperties.emplace_back( CHART_UNONAME_ERRORBAR_Y,
378
0
                  PROP_DATAPOINT_ERROR_BAR_Y,
379
                  // XPropertySet supporting service ErrorBar
380
0
                  cppu::UnoType<beans::XPropertySet>::get(),
381
0
                  beans::PropertyAttribute::BOUND
382
0
                  | beans::PropertyAttribute::MAYBEVOID );
383
0
    rOutProperties.emplace_back( "ShowErrorBox",
384
0
                  PROP_DATAPOINT_SHOW_ERROR_BOX,
385
0
                  cppu::UnoType<bool>::get(),
386
0
                  beans::PropertyAttribute::BOUND
387
0
                  | beans::PropertyAttribute::MAYBEVOID );
388
0
    rOutProperties.emplace_back( "PercentDiagonal",
389
0
                  PROP_DATAPOINT_PERCENT_DIAGONAL,
390
0
                  cppu::UnoType<sal_Int16>::get(),
391
0
                  beans::PropertyAttribute::BOUND
392
0
                  | beans::PropertyAttribute::MAYBEVOID );
393
394
    // Properties specific to data label.
395
396
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL,
397
0
                  PROP_DATAPOINT_LABEL,
398
0
                  cppu::UnoType<chart2::DataPointLabel>::get(),
399
0
                  beans::PropertyAttribute::BOUND
400
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
401
402
0
    rOutProperties.emplace_back( "TextWordWrap",
403
0
                  PROP_DATAPOINT_TEXT_WORD_WRAP,
404
0
                  cppu::UnoType<bool>::get(),
405
0
                  beans::PropertyAttribute::BOUND
406
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
407
408
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_SEP,
409
0
                  PROP_DATAPOINT_LABEL_SEPARATOR,
410
0
                  cppu::UnoType<OUString>::get(),
411
0
                  beans::PropertyAttribute::BOUND
412
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
413
414
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_STYLE,
415
0
                  PROP_DATAPOINT_LABEL_BORDER_STYLE,
416
0
                  cppu::UnoType<drawing::LineStyle>::get(),
417
0
                  beans::PropertyAttribute::BOUND
418
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
419
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_COLOR,
420
0
                  PROP_DATAPOINT_LABEL_BORDER_COLOR,
421
0
                  cppu::UnoType<sal_Int32>::get(),
422
0
                  beans::PropertyAttribute::BOUND
423
0
                  | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
424
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
425
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_COMPLEX_COLOR,
426
0
                  PROP_DATAPOINT_LABEL_BORDER_COMPLEX_COLOR,
427
0
                  cppu::UnoType<util::XComplexColor>::get(),
428
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT);
429
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_STYLE,
430
0
                  PROP_DATAPOINT_LABEL_FILL_STYLE,
431
0
                  cppu::UnoType<drawing::FillStyle>::get(),
432
0
                  beans::PropertyAttribute::BOUND
433
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
434
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_COLOR,
435
0
                  PROP_DATAPOINT_LABEL_FILL_COLOR,
436
0
                  cppu::UnoType<sal_Int32>::get(),
437
0
                  beans::PropertyAttribute::BOUND
438
0
                  | beans::PropertyAttribute::MAYBEVOID
439
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
440
0
    rOutProperties.emplace_back(CHART_UNONAME_LABEL_FILL_COMPLEX_COLOR,
441
0
                  PROP_DATAPOINT_LABEL_FILL_COMPLEX_COLOR,
442
0
                  cppu::UnoType<util::XComplexColor>::get(),
443
0
                  beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT);
444
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_BACKGROUND,
445
0
                  PROP_DATAPOINT_LABEL_FILL_BACKGROUND,
446
0
                  cppu::UnoType<sal_Bool>::get(),
447
0
                  beans::PropertyAttribute::BOUND
448
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
449
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_HATCH_NAME,
450
0
                  PROP_DATAPOINT_LABEL_FILL_HATCH_NAME,
451
0
                  cppu::UnoType<OUString>::get(),
452
0
                  beans::PropertyAttribute::BOUND
453
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
454
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_WIDTH,
455
0
                  PROP_DATAPOINT_LABEL_BORDER_WIDTH,
456
0
                  cppu::UnoType<sal_Int32>::get(),
457
0
                  beans::PropertyAttribute::BOUND
458
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
459
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_DASH,
460
0
                   PROP_DATAPOINT_LABEL_BORDER_DASH,
461
0
                   cppu::UnoType<drawing::LineDash>::get(),
462
0
                   beans::PropertyAttribute::BOUND
463
0
                   | beans::PropertyAttribute::MAYBEVOID );
464
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_DASHNAME,
465
0
                  PROP_DATAPOINT_LABEL_BORDER_DASH_NAME,
466
0
                  cppu::UnoType<OUString>::get(),
467
0
                  beans::PropertyAttribute::BOUND
468
0
                  | beans::PropertyAttribute::MAYBEVOID );
469
0
    rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_TRANS,
470
0
                  PROP_DATAPOINT_LABEL_BORDER_TRANS,
471
0
                  cppu::UnoType<sal_Int16>::get(),
472
0
                  beans::PropertyAttribute::BOUND
473
0
                  | beans::PropertyAttribute::MAYBEDEFAULT );
474
475
0
    rOutProperties.emplace_back( CHART_UNONAME_CUSTOM_LABEL_FIELDS,
476
0
                  PROP_DATAPOINT_CUSTOM_LABEL_FIELDS,
477
0
                  cppu::UnoType<uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>>>::get(),
478
0
                  beans::PropertyAttribute::BOUND
479
0
                  | beans::PropertyAttribute::MAYBEDEFAULT);
480
481
0
    rOutProperties.emplace_back( "CustomLabelPosition",
482
0
                  PROP_DATAPOINT_LABEL_CUSTOM_POS,
483
0
                  cppu::UnoType<chart2::RelativePosition>::get(),
484
0
                  beans::PropertyAttribute::BOUND
485
0
                  | beans::PropertyAttribute::MAYBEVOID );
486
487
0
    rOutProperties.emplace_back("CustomLabelSize", PROP_DATAPOINT_LABEL_CUSTOM_SIZE,
488
0
                                cppu::UnoType<chart2::RelativeSize>::get(),
489
0
                                beans::PropertyAttribute::BOUND
490
0
                                    | beans::PropertyAttribute::MAYBEVOID);
491
0
}
492
493
void DataPointProperties::AddDefaultsToMap(
494
    ::chart::tPropertyValueMap & rOutMap )
495
0
{
496
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_COLOR, Color(0x99, 0xcc, 0xff) ); // blue 8
497
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TRANSPARENCY, sal_Int16(0) );
498
499
    //fill
500
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_STYLE, drawing::FillStyle_SOLID );
501
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME );
502
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_GRADIENT_NAME );
503
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_HATCH_NAME );
504
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_BITMAP_NAME );
505
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_BACKGROUND, false );
506
507
    //border
508
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_COLOR, COL_BLACK );
509
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_STYLE, drawing::LineStyle_SOLID ); // drawing::LineStyle_NONE
510
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_WIDTH, sal_Int32(0) );
511
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_DASH_NAME );
512
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_TRANSPARENCY, sal_Int16(0) );
513
514
    //line
515
0
    PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_SOLID );
516
0
    PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_WIDTH, sal_Int32(0) );
517
0
    PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_DASH, drawing::LineDash());
518
0
    PropertyHelper::setEmptyPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_DASH_NAME );
519
0
    PropertyHelper::setPropertyValueDefault( rOutMap, LinePropertiesHelper::PROP_LINE_CAP, drawing::LineCap_BUTT);
520
521
    //fill bitmap
522
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, sal_Int16(0) );
523
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, sal_Int16(0) );
524
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, sal_Int16(0) );
525
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, sal_Int16(0) );
526
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, drawing::RectanglePoint_MIDDLE_MIDDLE );
527
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, true );
528
529
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, sal_Int32(0) );
530
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, sal_Int32(0) );
531
0
    PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_MODE, drawing::BitmapMode_REPEAT );
532
533
    //others
534
0
    chart2::Symbol aSymbProp;
535
0
    aSymbProp.Style = chart2::SymbolStyle_NONE;
536
0
    aSymbProp.StandardSymbol = 0;
537
0
    aSymbProp.Size = awt::Size( 250, 250 ); // ca. 7pt x 7pt (7pt=246.94)
538
0
    aSymbProp.BorderColor = sal_Int32(COL_BLACK);
539
0
    aSymbProp.FillColor = 0xee4000;         // OrangeRed2
540
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_SYMBOL_PROP, aSymbProp );
541
542
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_OFFSET, 0.0 );
543
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_GEOMETRY3D, chart2::DataPointGeometry3D::CUBOID );
544
545
    //@todo maybe choose a different one here -> should be dynamically that of the attached axis
546
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_X, uno::Reference< beans::XPropertySet >());
547
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_Y, uno::Reference< beans::XPropertySet >());
548
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_PERCENT_DIAGONAL, sal_Int16(0) );
549
550
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TEXT_ROTATION, 0.0 );
551
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_INVERT_NEGATIVE, false );
552
553
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LINK_NUMBERFORMAT_TO_SOURCE, true);
554
555
    // data label
556
0
    PropertyHelper::setPropertyValueDefault(
557
0
        rOutMap, PROP_DATAPOINT_LABEL,
558
0
        chart2::DataPointLabel(
559
0
            false, // ShowNumber
560
0
            false, // ShowNumberInPercent
561
0
            false, // ShowCategoryName
562
0
            false, // ShowLegendSymbol
563
0
            false, // ShowCustomLabel
564
0
            false // ShowSeriesName
565
0
            ));
566
567
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TEXT_WORD_WRAP, false );
568
0
    PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, u" "_ustr );
569
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_STYLE, drawing::LineStyle_NONE);
570
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_COLOR);
571
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_STYLE);
572
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_COLOR);
573
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_BACKGROUND);
574
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_HATCH_NAME);
575
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_WIDTH, sal_Int32(0));
576
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH, drawing::LineDash());
577
0
    PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH_NAME);
578
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_TRANS, sal_Int16(0));
579
580
0
    uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields(0);
581
0
    PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_CUSTOM_LABEL_FIELDS, aFields);
582
0
}
583
584
} //  namespace chart
585
586
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */