1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*cde9e8dcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*cde9e8dcSAndrew Rist  * distributed with this work for additional information
6*cde9e8dcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*cde9e8dcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist  * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*cde9e8dcSAndrew Rist  *
11*cde9e8dcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*cde9e8dcSAndrew Rist  *
13*cde9e8dcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist  * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist  * KIND, either express or implied.  See the License for the
17*cde9e8dcSAndrew Rist  * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist  * under the License.
19*cde9e8dcSAndrew Rist  *
20*cde9e8dcSAndrew Rist  *************************************************************/
21*cde9e8dcSAndrew Rist 
22*cde9e8dcSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir #include "DataPointProperties.hxx"
27cdf0e10cSrcweir #include "macros.hxx"
28cdf0e10cSrcweir #include "LineProperties.hxx"
29cdf0e10cSrcweir #include "FillProperties.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // #ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
32cdf0e10cSrcweir // #include <com/sun/star/awt/Gradient.hpp>
33cdf0e10cSrcweir // #endif
34cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
35cdf0e10cSrcweir #include <com/sun/star/drawing/FillStyle.hpp>
36cdf0e10cSrcweir #include <com/sun/star/drawing/LineStyle.hpp>
37cdf0e10cSrcweir #include <com/sun/star/drawing/LineDash.hpp>
38cdf0e10cSrcweir #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
39cdf0e10cSrcweir // #ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_
40cdf0e10cSrcweir // #include <com/sun/star/drawing/Hatch.hpp>
41cdf0e10cSrcweir // #endif
42cdf0e10cSrcweir #include <com/sun/star/style/XStyle.hpp>
43cdf0e10cSrcweir #include <com/sun/star/drawing/BitmapMode.hpp>
44cdf0e10cSrcweir #include <com/sun/star/drawing/RectanglePoint.hpp>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir // #ifndef _COM_SUN_STAR_CHART2_FILLBITMAP_HPP_
47cdf0e10cSrcweir // #include <com/sun/star/chart2/FillBitmap.hpp>
48cdf0e10cSrcweir // #endif
49cdf0e10cSrcweir #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
50cdf0e10cSrcweir #include <com/sun/star/chart2/DataPointLabel.hpp>
51cdf0e10cSrcweir #include <com/sun/star/chart2/Symbol.hpp>
52cdf0e10cSrcweir 
53cdf0e10cSrcweir using namespace ::com::sun::star;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir using ::com::sun::star::beans::Property;
56cdf0e10cSrcweir 
57cdf0e10cSrcweir namespace chart
58cdf0e10cSrcweir {
59cdf0e10cSrcweir 
AddPropertiesToVector(::std::vector<Property> & rOutProperties)60cdf0e10cSrcweir void DataPointProperties::AddPropertiesToVector(
61cdf0e10cSrcweir     ::std::vector< Property > & rOutProperties )
62cdf0e10cSrcweir {
63cdf0e10cSrcweir     // DataPointProperties
64cdf0e10cSrcweir     // ===================
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     // Common
67cdf0e10cSrcweir     // ------
68cdf0e10cSrcweir     rOutProperties.push_back(
69cdf0e10cSrcweir         Property( C2U( "Color" ),
70cdf0e10cSrcweir                   PROP_DATAPOINT_COLOR,
71cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
72cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
73cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
74cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     rOutProperties.push_back(
77cdf0e10cSrcweir         Property( C2U( "Transparency" ),
78cdf0e10cSrcweir                   PROP_DATAPOINT_TRANSPARENCY,
79cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
80cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
81cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     // Fill Properties
84cdf0e10cSrcweir     // ---------------
85cdf0e10cSrcweir     rOutProperties.push_back(
86cdf0e10cSrcweir         Property( C2U( "FillStyle" ),
87cdf0e10cSrcweir                   PROP_DATAPOINT_FILL_STYLE,
88cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const drawing::FillStyle * >(0)),
89cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
90cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     rOutProperties.push_back(
93cdf0e10cSrcweir         Property( C2U( "TransparencyGradientName" ),
94cdf0e10cSrcweir                   PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME,
95cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
96cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
97cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT
98cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     rOutProperties.push_back(
101cdf0e10cSrcweir         Property( C2U( "GradientName" ),
102cdf0e10cSrcweir                   PROP_DATAPOINT_GRADIENT_NAME,
103cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
104cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
105cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT
106cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     rOutProperties.push_back(
110cdf0e10cSrcweir         beans::Property( C2U( "GradientStepCount" ),
111cdf0e10cSrcweir                   PROP_DATAPOINT_GRADIENT_STEPCOUNT,
112cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
113cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
114cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     rOutProperties.push_back(
117cdf0e10cSrcweir         Property( C2U( "HatchName" ),
118cdf0e10cSrcweir                   PROP_DATAPOINT_HATCH_NAME,
119cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
120cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
121cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT
122cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     rOutProperties.push_back(
125cdf0e10cSrcweir         Property( C2U( "FillBitmapName" ),
126cdf0e10cSrcweir                   PROP_DATAPOINT_FILL_BITMAP_NAME,
127cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
128cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
129cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT
130cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID  ));
131cdf0e10cSrcweir     rOutProperties.push_back(
132cdf0e10cSrcweir         Property( C2U( "FillBackground" ),
133cdf0e10cSrcweir                   PROP_DATAPOINT_FILL_BACKGROUND,
134cdf0e10cSrcweir                   ::getBooleanCppuType(),
135cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
136cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT
137cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     // border for filled objects
140cdf0e10cSrcweir     rOutProperties.push_back(
141cdf0e10cSrcweir         Property( C2U( "BorderColor" ),
142cdf0e10cSrcweir                   PROP_DATAPOINT_BORDER_COLOR,
143cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
144cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
145cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID         // "maybe auto"
146cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
147cdf0e10cSrcweir     rOutProperties.push_back(
148cdf0e10cSrcweir         Property( C2U( "BorderStyle" ),
149cdf0e10cSrcweir                   PROP_DATAPOINT_BORDER_STYLE,
150cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)),
151cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
152cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
153cdf0e10cSrcweir     rOutProperties.push_back(
154cdf0e10cSrcweir         Property( C2U( "BorderWidth" ),
155cdf0e10cSrcweir                   PROP_DATAPOINT_BORDER_WIDTH,
156cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
157cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
158cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
159cdf0e10cSrcweir     rOutProperties.push_back(
160cdf0e10cSrcweir         Property( C2U( "BorderDashName" ),
161cdf0e10cSrcweir                   PROP_DATAPOINT_BORDER_DASH_NAME,
162cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
163cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
164cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
165cdf0e10cSrcweir     rOutProperties.push_back(
166cdf0e10cSrcweir         Property( C2U( "BorderTransparency" ),
167cdf0e10cSrcweir                   PROP_DATAPOINT_BORDER_TRANSPARENCY,
168cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
169cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
170cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
171cdf0e10cSrcweir 
172cdf0e10cSrcweir     // Line Properties
173cdf0e10cSrcweir     // ---------------
174cdf0e10cSrcweir     rOutProperties.push_back(
175cdf0e10cSrcweir         Property( C2U( "LineStyle" ),
176cdf0e10cSrcweir                   LineProperties::PROP_LINE_STYLE,
177cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)),
178cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
179cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
180cdf0e10cSrcweir     rOutProperties.push_back(
181cdf0e10cSrcweir         Property( C2U( "LineWidth" ),
182cdf0e10cSrcweir                   LineProperties::PROP_LINE_WIDTH,
183cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
184cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
185cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
186cdf0e10cSrcweir     rOutProperties.push_back(
187cdf0e10cSrcweir          Property( C2U( "LineDash" ),
188cdf0e10cSrcweir                    LineProperties::PROP_LINE_DASH,
189cdf0e10cSrcweir                    ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)),
190cdf0e10cSrcweir                    beans::PropertyAttribute::BOUND
191cdf0e10cSrcweir                    | beans::PropertyAttribute::MAYBEVOID ));
192cdf0e10cSrcweir     rOutProperties.push_back(
193cdf0e10cSrcweir         Property( C2U( "LineDashName" ),
194cdf0e10cSrcweir                   LineProperties::PROP_LINE_DASH_NAME,
195cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
196cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
197cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
198cdf0e10cSrcweir 
199cdf0e10cSrcweir     // FillProperties
200cdf0e10cSrcweir     // bitmap properties
201cdf0e10cSrcweir     rOutProperties.push_back(
202cdf0e10cSrcweir         Property( C2U( "FillBitmapOffsetX" ),
203cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_OFFSETX,
204cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
205cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
206cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
207cdf0e10cSrcweir 
208cdf0e10cSrcweir     rOutProperties.push_back(
209cdf0e10cSrcweir         Property( C2U( "FillBitmapOffsetY" ),
210cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_OFFSETY,
211cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
212cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
213cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
214cdf0e10cSrcweir 
215cdf0e10cSrcweir     rOutProperties.push_back(
216cdf0e10cSrcweir         Property( C2U( "FillBitmapPositionOffsetX" ),
217cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX,
218cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
219cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
220cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     rOutProperties.push_back(
223cdf0e10cSrcweir         Property( C2U( "FillBitmapPositionOffsetY" ),
224cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY,
225cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
226cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
227cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
228cdf0e10cSrcweir 
229cdf0e10cSrcweir 
230cdf0e10cSrcweir     rOutProperties.push_back(
231cdf0e10cSrcweir         Property( C2U( "FillBitmapRectanglePoint" ),
232cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT,
233cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const drawing::RectanglePoint * >(0)),
234cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
235cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
236cdf0e10cSrcweir 
237cdf0e10cSrcweir     rOutProperties.push_back(
238cdf0e10cSrcweir         Property( C2U( "FillBitmapLogicalSize" ),
239cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_LOGICALSIZE,
240cdf0e10cSrcweir                   ::getBooleanCppuType(),
241cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
242cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     rOutProperties.push_back(
245cdf0e10cSrcweir         Property( C2U( "FillBitmapSizeX" ),
246cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_SIZEX,
247cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
248cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
249cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
250cdf0e10cSrcweir 
251cdf0e10cSrcweir     rOutProperties.push_back(
252cdf0e10cSrcweir         Property( C2U( "FillBitmapSizeY" ),
253cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_SIZEY,
254cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
255cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
256cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
257cdf0e10cSrcweir 
258cdf0e10cSrcweir     rOutProperties.push_back(
259cdf0e10cSrcweir         Property( C2U( "FillBitmapMode" ),
260cdf0e10cSrcweir                   FillProperties::PROP_FILL_BITMAP_MODE,
261cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const drawing::BitmapMode * >(0)),
262cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
263cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
264cdf0e10cSrcweir 
265cdf0e10cSrcweir     // others
266cdf0e10cSrcweir     rOutProperties.push_back(
267cdf0e10cSrcweir         Property( C2U( "Symbol" ),
268cdf0e10cSrcweir                   PROP_DATAPOINT_SYMBOL_PROP,
269cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const chart2::Symbol * >(0)),
270cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
271cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
272cdf0e10cSrcweir     rOutProperties.push_back(
273cdf0e10cSrcweir         Property( C2U( "Offset" ),
274cdf0e10cSrcweir                   PROP_DATAPOINT_OFFSET,
275cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const double * >(0)),
276cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
277cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
278cdf0e10cSrcweir     rOutProperties.push_back(
279cdf0e10cSrcweir         Property( C2U( "Geometry3D" ),
280cdf0e10cSrcweir                   PROP_DATAPOINT_GEOMETRY3D,
281cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
282cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
283cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
284cdf0e10cSrcweir 
285cdf0e10cSrcweir     rOutProperties.push_back(
286cdf0e10cSrcweir         Property( C2U( "Label" ),
287cdf0e10cSrcweir                   PROP_DATAPOINT_LABEL,
288cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const chart2::DataPointLabel * >(0)),
289cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
290cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
291cdf0e10cSrcweir 
292cdf0e10cSrcweir     rOutProperties.push_back(
293cdf0e10cSrcweir         Property( C2U( "LabelSeparator" ),
294cdf0e10cSrcweir                   PROP_DATAPOINT_LABEL_SEPARATOR,
295cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)),
296cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
297cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
298cdf0e10cSrcweir 
299cdf0e10cSrcweir     rOutProperties.push_back(
300cdf0e10cSrcweir         Property( C2U( "NumberFormat" ),
301cdf0e10cSrcweir                   PROP_DATAPOINT_NUMBER_FORMAT,
302cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
303cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
304cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
305cdf0e10cSrcweir 
306cdf0e10cSrcweir     //additional 'PercentageNumberFormat'
307cdf0e10cSrcweir     rOutProperties.push_back(
308cdf0e10cSrcweir         Property( C2U( "PercentageNumberFormat" ),
309cdf0e10cSrcweir                   PROP_DATAPOINT_PERCENTAGE_NUMBER_FORMAT,
310cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
311cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
312cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
313cdf0e10cSrcweir 
314cdf0e10cSrcweir     rOutProperties.push_back(
315cdf0e10cSrcweir         Property( C2U( "LabelPlacement" ),
316cdf0e10cSrcweir                   PROP_DATAPOINT_LABEL_PLACEMENT,
317cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
318cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
319cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
320cdf0e10cSrcweir 
321cdf0e10cSrcweir     rOutProperties.push_back(
322cdf0e10cSrcweir         Property( C2U( "ReferencePageSize" ),
323cdf0e10cSrcweir                   PROP_DATAPOINT_REFERENCE_DIAGRAM_SIZE,
324cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const awt::Size * >(0)),
325cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
326cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
327cdf0e10cSrcweir 
328cdf0e10cSrcweir         rOutProperties.push_back(
329cdf0e10cSrcweir         Property( C2U( "TextRotation" ),
330cdf0e10cSrcweir                   PROP_DATAPOINT_TEXT_ROTATION,
331cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const double * >(0)),
332cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
333cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
334cdf0e10cSrcweir 
335cdf0e10cSrcweir     // statistics
336cdf0e10cSrcweir     rOutProperties.push_back(
337cdf0e10cSrcweir         Property( C2U( "ErrorBarX" ),
338cdf0e10cSrcweir                   PROP_DATAPOINT_ERROR_BAR_X,
339cdf0e10cSrcweir                   // XPropertySet supporting service ErrorBar
340cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const uno::Reference< beans::XPropertySet > * >(0)),
341cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
342cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
343cdf0e10cSrcweir     rOutProperties.push_back(
344cdf0e10cSrcweir         Property( C2U( "ErrorBarY" ),
345cdf0e10cSrcweir                   PROP_DATAPOINT_ERROR_BAR_Y,
346cdf0e10cSrcweir                   // XPropertySet supporting service ErrorBar
347cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const uno::Reference< beans::XPropertySet > * >(0)),
348cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
349cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
350cdf0e10cSrcweir     rOutProperties.push_back(
351cdf0e10cSrcweir         Property( C2U( "ShowErrorBox" ),
352cdf0e10cSrcweir                   PROP_DATAPOINT_SHOW_ERROR_BOX,
353cdf0e10cSrcweir                   ::getBooleanCppuType(),
354cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
355cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
356cdf0e10cSrcweir     rOutProperties.push_back(
357cdf0e10cSrcweir         Property( C2U( "PercentDiagonal" ),
358cdf0e10cSrcweir                   PROP_DATAPOINT_PERCENT_DIAGONAL,
359cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
360cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
361cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEVOID ));
362cdf0e10cSrcweir }
363cdf0e10cSrcweir 
AddDefaultsToMap(::chart::tPropertyValueMap & rOutMap)364cdf0e10cSrcweir void DataPointProperties::AddDefaultsToMap(
365cdf0e10cSrcweir     ::chart::tPropertyValueMap & rOutMap )
366cdf0e10cSrcweir {
367cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_COLOR, 0x0099ccff ); // blue 8
368cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_TRANSPARENCY, 0 );
369cdf0e10cSrcweir 
370cdf0e10cSrcweir     //fill
371cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_STYLE, drawing::FillStyle_SOLID );
372cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME );
373cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_GRADIENT_NAME );
374cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_HATCH_NAME );
375cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_BITMAP_NAME );
376cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_FILL_BACKGROUND, false );
377cdf0e10cSrcweir 
378cdf0e10cSrcweir     //border
379cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_BORDER_COLOR, 0x000000 ); // black
380cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_STYLE, drawing::LineStyle_SOLID ); // drawing::LineStyle_NONE
381cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATAPOINT_BORDER_WIDTH, 0 );
382cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, PROP_DATAPOINT_BORDER_DASH_NAME );
383cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_BORDER_TRANSPARENCY, 0 );
384cdf0e10cSrcweir 
385cdf0e10cSrcweir     //line
386cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, LineProperties::PROP_LINE_STYLE, drawing::LineStyle_SOLID );
387cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, LineProperties::PROP_LINE_WIDTH, 0 );
388cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, LineProperties::PROP_LINE_DASH, drawing::LineDash());
389cdf0e10cSrcweir     PropertyHelper::setEmptyPropertyValueDefault( rOutMap, LineProperties::PROP_LINE_DASH_NAME );
390cdf0e10cSrcweir 
391cdf0e10cSrcweir     //fill bitmap
392cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETX, 0 );
393cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_OFFSETY, 0 );
394cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, 0 );
395cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, 0 );
396cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, drawing::RectanglePoint_MIDDLE_MIDDLE );
397cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, true );
398cdf0e10cSrcweir 
399cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEX, 0 );
400cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, FillProperties::PROP_FILL_BITMAP_SIZEY, 0 );
401cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, FillProperties::PROP_FILL_BITMAP_MODE, drawing::BitmapMode_REPEAT );
402cdf0e10cSrcweir 
403cdf0e10cSrcweir     //others
404cdf0e10cSrcweir     chart2::Symbol aSymbProp;
405cdf0e10cSrcweir     aSymbProp.Style = chart2::SymbolStyle_NONE;
406cdf0e10cSrcweir     aSymbProp.StandardSymbol = 0;
407cdf0e10cSrcweir     aSymbProp.Size = awt::Size( 250, 250 ); // ca. 7pt x 7pt (7pt=246.94)
408cdf0e10cSrcweir     aSymbProp.BorderColor = 0x000000;       // Black
409cdf0e10cSrcweir     aSymbProp.FillColor = 0xee4000;         // OrangeRed2
410cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_SYMBOL_PROP, aSymbProp );
411cdf0e10cSrcweir 
412cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_DATAPOINT_OFFSET, 0.0 );
413cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_GEOMETRY3D, chart2::DataPointGeometry3D::CUBOID );
414cdf0e10cSrcweir 
415cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault(
416cdf0e10cSrcweir         rOutMap, PROP_DATAPOINT_LABEL,
417cdf0e10cSrcweir         chart2::DataPointLabel(
418cdf0e10cSrcweir             sal_False, // ShowNumber
419cdf0e10cSrcweir             sal_False, // ShowNumberInPercent
420cdf0e10cSrcweir             sal_False, // ShowCategoryName
421cdf0e10cSrcweir             sal_False  // ShowLegendSymbol
422cdf0e10cSrcweir             ));
423cdf0e10cSrcweir 
424cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< rtl::OUString >( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, C2U(" ") );
425cdf0e10cSrcweir 
426cdf0e10cSrcweir     //@todo maybe choose a different one here -> should be dynamically that of the attached axis
427cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_X, uno::Reference< beans::XPropertySet >());
428cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_Y, uno::Reference< beans::XPropertySet >());
429cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_PERCENT_DIAGONAL, 0 );
430cdf0e10cSrcweir 
431cdf0e10cSrcweir     PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_DATAPOINT_TEXT_ROTATION, 0.0 );
432cdf0e10cSrcweir }
433cdf0e10cSrcweir 
434cdf0e10cSrcweir } //  namespace chart
435