Branch data Line data Source code
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 : :
21 : : #include "WrappedStatisticProperties.hxx"
22 : : #include "WrappedSeriesOrDiagramProperty.hxx"
23 : : #include "macros.hxx"
24 : : #include "FastPropertyIdRanges.hxx"
25 : : #include "RegressionCurveHelper.hxx"
26 : : #include "DiagramHelper.hxx"
27 : : #include "ErrorBar.hxx"
28 : : #include "StatisticsHelper.hxx"
29 : :
30 : : #include <com/sun/star/beans/PropertyAttribute.hpp>
31 : : #include <com/sun/star/chart/ChartErrorCategory.hpp>
32 : : #include <com/sun/star/chart/ErrorBarStyle.hpp>
33 : : #include <com/sun/star/chart/ChartErrorIndicatorType.hpp>
34 : : #include <com/sun/star/chart/ChartRegressionCurveType.hpp>
35 : : #include <com/sun/star/chart2/data/XDataProvider.hpp>
36 : : #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
37 : :
38 : : using namespace ::com::sun::star;
39 : : using ::com::sun::star::uno::Any;
40 : : using ::com::sun::star::uno::Reference;
41 : : using ::com::sun::star::uno::Sequence;
42 : : using ::com::sun::star::beans::Property;
43 : : using ::rtl::OUString;
44 : :
45 : : //.............................................................................
46 : : namespace chart
47 : : {
48 : : namespace wrapper
49 : : {
50 : :
51 : : namespace
52 : : {
53 : :
54 : 127 : Any lcl_getRegressionDefault()
55 : : {
56 : 127 : Any aRet;
57 [ + - ]: 127 : aRet <<= ::com::sun::star::chart::ChartRegressionCurveType_NONE;
58 : 127 : return aRet;
59 : : }
60 : :
61 : : //-----------------------------------------------------------------------------
62 : :
63 : 240 : ::com::sun::star::chart::ChartRegressionCurveType lcl_getRegressionCurveType( RegressionCurveHelper::tRegressionType eRegressionType )
64 : : {
65 : 240 : ::com::sun::star::chart::ChartRegressionCurveType eRet = ::com::sun::star::chart::ChartRegressionCurveType_NONE;
66 [ - - - + : 240 : switch(eRegressionType)
+ ]
67 : : {
68 : : case RegressionCurveHelper::REGRESSION_TYPE_LINEAR:
69 : 0 : eRet = ::com::sun::star::chart::ChartRegressionCurveType_LINEAR;
70 : 0 : break;
71 : : case RegressionCurveHelper::REGRESSION_TYPE_LOG:
72 : 0 : eRet = ::com::sun::star::chart::ChartRegressionCurveType_LOGARITHM;
73 : 0 : break;
74 : : case RegressionCurveHelper::REGRESSION_TYPE_EXP:
75 : 0 : eRet = ::com::sun::star::chart::ChartRegressionCurveType_EXPONENTIAL;
76 : 0 : break;
77 : : case RegressionCurveHelper::REGRESSION_TYPE_POWER:
78 : 6 : eRet = ::com::sun::star::chart::ChartRegressionCurveType_POWER;
79 : 6 : break;
80 : : default:
81 : 234 : eRet = ::com::sun::star::chart::ChartRegressionCurveType_NONE;
82 : 234 : break;
83 : : }
84 : 240 : return eRet;
85 : : }
86 : :
87 : : //-----------------------------------------------------------------------------
88 : :
89 : 42 : RegressionCurveHelper::tRegressionType lcl_getRegressionType( ::com::sun::star::chart::ChartRegressionCurveType eRegressionCurveType )
90 : : {
91 : : RegressionCurveHelper::tRegressionType eRet;
92 [ - - - + : 42 : switch(eRegressionCurveType)
+ ]
93 : : {
94 : : case ::com::sun::star::chart::ChartRegressionCurveType_LINEAR:
95 : 0 : eRet = RegressionCurveHelper::REGRESSION_TYPE_LINEAR;
96 : 0 : break;
97 : : case ::com::sun::star::chart::ChartRegressionCurveType_LOGARITHM:
98 : 0 : eRet = RegressionCurveHelper::REGRESSION_TYPE_LOG;
99 : 0 : break;
100 : : case ::com::sun::star::chart::ChartRegressionCurveType_EXPONENTIAL:
101 : 0 : eRet = RegressionCurveHelper::REGRESSION_TYPE_EXP;
102 : 0 : break;
103 : : case ::com::sun::star::chart::ChartRegressionCurveType_POLYNOMIAL:
104 : : case ::com::sun::star::chart::ChartRegressionCurveType_POWER:
105 : 6 : eRet = RegressionCurveHelper::REGRESSION_TYPE_POWER;
106 : 6 : break;
107 : : default:
108 : 36 : eRet = RegressionCurveHelper::REGRESSION_TYPE_NONE;
109 : 36 : break;
110 : : }
111 : 42 : return eRet;
112 : : }
113 : :
114 : 156 : sal_Int32 lcl_getErrorBarStyle( const uno::Reference< beans::XPropertySet >& xErrorBarProperties )
115 : : {
116 : 156 : sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE;
117 [ + - ]: 156 : if(xErrorBarProperties.is())
118 [ + - ][ + - ]: 156 : xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle;
119 : 156 : return nStyle;
120 : : }
121 : :
122 : 0 : uno::Reference< chart2::data::XDataProvider > lcl_getDataProviderFromContact(
123 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
124 : : {
125 : 0 : uno::Reference< chart2::data::XDataProvider > xResult;
126 [ # # ]: 0 : if( spChart2ModelContact.get())
127 : : {
128 : : uno::Reference< chart2::XChartDocument > xChartDoc(
129 [ # # ]: 0 : spChart2ModelContact->getChart2Document());
130 [ # # ]: 0 : if( xChartDoc.is())
131 [ # # ][ # # ]: 0 : xResult.set( xChartDoc->getDataProvider());
[ # # ]
132 : : }
133 : 0 : return xResult;
134 : : }
135 : :
136 : 0 : void lcl_ConvertRangeFromXML(
137 : : ::rtl::OUString & rInOutRange,
138 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
139 : : {
140 [ # # ]: 0 : if( !rInOutRange.isEmpty())
141 : : {
142 : : uno::Reference< chart2::data::XRangeXMLConversion > xConverter(
143 [ # # ][ # # ]: 0 : lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
[ # # ][ # # ]
144 [ # # ]: 0 : if( xConverter.is())
145 : : {
146 [ # # ][ # # ]: 0 : ::rtl::OUString aResult = xConverter->convertRangeFromXML( rInOutRange );
147 : 0 : rInOutRange = aResult;
148 : 0 : }
149 : : }
150 : 0 : }
151 : :
152 : 296 : void lcl_ConvertRangeToXML(
153 : : ::rtl::OUString & rInOutRange,
154 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
155 : : {
156 [ - + ]: 296 : if( !rInOutRange.isEmpty())
157 : : {
158 : : uno::Reference< chart2::data::XRangeXMLConversion > xConverter(
159 [ # # ][ # # ]: 0 : lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
[ # # ][ # # ]
160 [ # # ]: 0 : if( xConverter.is())
161 : : {
162 [ # # ][ # # ]: 0 : ::rtl::OUString aResult = xConverter->convertRangeToXML( rInOutRange );
163 : 0 : rInOutRange = aResult;
164 : 0 : }
165 : : }
166 : 296 : }
167 : :
168 : : }//anonymous namespace
169 : :
170 : : //-----------------------------------------------------------------------------
171 : :
172 : : template< typename PROPERTYTYPE >
173 : : class WrappedStatisticProperty : public WrappedSeriesOrDiagramProperty< PROPERTYTYPE >
174 : : {
175 : : public:
176 : 1778 : explicit WrappedStatisticProperty( const OUString& rName, const Any& rDefaulValue
177 : : , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact
178 : : , tSeriesOrDiagramPropertyType ePropertyType )
179 [ + - ][ + - ]: 1778 : : WrappedSeriesOrDiagramProperty< PROPERTYTYPE >(rName,rDefaulValue,spChart2ModelContact,ePropertyType)
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
180 : 1778 : {}
181 [ - + ][ - + ]: 1778 : virtual ~WrappedStatisticProperty() {};
[ - + ][ - + ]
[ - + ][ - + ]
[ - + ][ - + ]
182 : :
183 : :
184 : : protected:
185 : 144 : uno::Reference< beans::XPropertySet > getOrCreateErrorBarProperties( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
186 : : {
187 [ # # ][ - + ]: 144 : if(!xSeriesPropertySet.is())
[ - + ][ - + ]
[ - + ]
188 [ # # ][ # # ]: 0 : return 0;
[ # # ][ # # ]
[ # # ]
189 : 144 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
190 [ # # ][ # # ]: 144 : xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties;
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ # # ]
191 [ # # + + : 144 : if( !xErrorBarProperties.is() )
- + - + +
+ ]
192 : : {
193 : : // todo: use a valid context
194 [ # # ][ # # ]: 24 : xErrorBarProperties = ::chart::createErrorBar( uno::Reference< uno::XComponentContext >() );
[ + - ][ + - ]
[ # # ][ # # ]
[ # # ][ # # ]
[ + - ][ + - ]
195 : : //default in new and old api are different
196 [ # # ][ # # ]: 24 : xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::makeAny(sal_Bool(sal_False)) );
[ + - ][ + - ]
[ + - ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ + - ]
[ + - ][ + - ]
[ # # ]
197 [ # # ][ # # ]: 24 : xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::makeAny(sal_Bool(sal_False)) );
[ + - ][ + - ]
[ + - ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ + - ]
[ + - ][ + - ]
[ # # ]
198 [ # # ][ # # ]: 24 : xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny(::com::sun::star::chart::ErrorBarStyle::NONE) );
[ + - ][ + - ]
[ + - ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ + - ]
[ + - ][ + - ]
[ # # ]
199 [ # # ][ # # ]: 24 : xSeriesPropertySet->setPropertyValue( "ErrorBarY" , uno::makeAny( xErrorBarProperties ) );
[ + - ][ + - ]
[ + - ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ + - ]
[ + - ][ + - ]
[ # # ]
200 : : }
201 : 144 : return xErrorBarProperties;
202 : : }
203 : :
204 : : };
205 : :
206 : : //-----------------------------------------------------------------------------
207 : : //PROP_CHART_STATISTIC_CONST_ERROR_LOW
208 : : class WrappedConstantErrorLowProperty : public WrappedStatisticProperty< double >
209 : : {
210 : : public:
211 : : virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
212 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const;
213 : :
214 : : explicit WrappedConstantErrorLowProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
215 : : tSeriesOrDiagramPropertyType ePropertyType );
216 : : virtual ~WrappedConstantErrorLowProperty();
217 : :
218 : : private:
219 : : mutable Any m_aOuterValue;
220 : : };
221 : :
222 : 127 : WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty(
223 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
224 : : tSeriesOrDiagramPropertyType ePropertyType )
225 : : : WrappedStatisticProperty< double >( "ConstantErrorLow"
226 [ + - ][ + - ]: 127 : , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType )
227 : : {
228 : 127 : }
229 : 127 : WrappedConstantErrorLowProperty::~WrappedConstantErrorLowProperty()
230 : : {
231 [ - + ]: 254 : }
232 : :
233 : 166 : double WrappedConstantErrorLowProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
234 : : {
235 : 166 : double aRet = 0.0;
236 : 166 : m_aDefaultValue >>= aRet;
237 : 166 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
238 [ + - ][ + - ]: 166 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + + ][ + - ]
[ + - ][ + - ]
[ + + # #
# # # # ]
[ + - ]
239 : : {
240 [ + - ][ - + ]: 6 : if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
241 [ # # ][ # # ]: 0 : xErrorBarProperties->getPropertyValue( "NegativeError" ) >>= aRet;
242 : : else
243 : 6 : m_aOuterValue >>= aRet;
244 : : }
245 : 166 : return aRet;
246 : : }
247 : :
248 : 24 : void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const
249 : : {
250 [ + - ]: 24 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
251 [ + - ]: 24 : if( xErrorBarProperties.is() )
252 : : {
253 [ + - ]: 24 : m_aOuterValue = uno::makeAny( aNewValue );
254 [ - + ][ + - ]: 24 : if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
255 : : {
256 [ # # ][ # # ]: 0 : xErrorBarProperties->setPropertyValue( "NegativeError", m_aOuterValue );
257 : : }
258 : 24 : }
259 : 24 : }
260 : :
261 : : //-----------------------------------------------------------------------------
262 : : //PROP_CHART_STATISTIC_CONST_ERROR_HIGH
263 : : class WrappedConstantErrorHighProperty : public WrappedStatisticProperty< double >
264 : : {
265 : : public:
266 : : virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
267 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const;
268 : :
269 : : explicit WrappedConstantErrorHighProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
270 : : tSeriesOrDiagramPropertyType ePropertyType );
271 : : virtual ~WrappedConstantErrorHighProperty();
272 : :
273 : : private:
274 : : mutable Any m_aOuterValue;
275 : : };
276 : :
277 : 127 : WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty(
278 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
279 : : tSeriesOrDiagramPropertyType ePropertyType )
280 : : : WrappedStatisticProperty< double >( "ConstantErrorHigh"
281 [ + - ][ + - ]: 127 : , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType )
282 : : {
283 : 127 : }
284 : 127 : WrappedConstantErrorHighProperty::~WrappedConstantErrorHighProperty()
285 : : {
286 [ - + ]: 254 : }
287 : :
288 : 166 : double WrappedConstantErrorHighProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
289 : : {
290 : 166 : double aRet = 0.0;
291 : 166 : m_aDefaultValue >>= aRet;
292 : 166 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
293 [ + - ][ + - ]: 166 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + + ][ + - ]
[ + - ][ + - ]
[ + + # #
# # # # ]
[ + - ]
294 : : {
295 [ + - ][ - + ]: 18 : if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
296 [ # # ][ # # ]: 0 : xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
297 : : else
298 : 18 : m_aOuterValue >>= aRet;
299 : : }
300 : 166 : return aRet;
301 : : }
302 : :
303 : 24 : void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const
304 : : {
305 [ + - ]: 24 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
306 [ + - ]: 24 : if( xErrorBarProperties.is() )
307 : : {
308 [ + - ]: 24 : m_aOuterValue = uno::makeAny( aNewValue );
309 [ - + ][ + - ]: 24 : if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
310 : : {
311 [ # # ][ # # ]: 0 : xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
312 : : }
313 : 24 : }
314 : 24 : }
315 : :
316 : : //-----------------------------------------------------------------------------
317 : : //PROP_CHART_STATISTIC_MEAN_VALUE
318 : : class WrappedMeanValueProperty : public WrappedStatisticProperty< sal_Bool >
319 : : {
320 : : public:
321 : : virtual sal_Bool getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
322 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool aNewValue ) const;
323 : :
324 : : explicit WrappedMeanValueProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
325 : : tSeriesOrDiagramPropertyType ePropertyType );
326 : : virtual ~WrappedMeanValueProperty();
327 : : };
328 : :
329 : 127 : WrappedMeanValueProperty::WrappedMeanValueProperty(
330 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
331 : : tSeriesOrDiagramPropertyType ePropertyType )
332 [ + - ][ + - ]: 127 : : WrappedStatisticProperty< sal_Bool >( "MeanValue", uno::makeAny( sal_False ), spChart2ModelContact, ePropertyType )
333 : : {
334 : 127 : }
335 : 127 : WrappedMeanValueProperty::~WrappedMeanValueProperty()
336 : : {
337 [ - + ]: 254 : }
338 : :
339 : 240 : sal_Bool WrappedMeanValueProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
340 : : {
341 : 240 : sal_Bool bRet = sal_False;
342 [ + - ]: 240 : uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY );
343 [ + - ]: 240 : if( xRegCnt.is() )
344 [ + - ]: 240 : bRet = RegressionCurveHelper::hasMeanValueLine( xRegCnt );
345 : 240 : return bRet;
346 : : }
347 : :
348 : 44 : void WrappedMeanValueProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Bool aNewValue ) const
349 : : {
350 [ + - ]: 44 : uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY );
351 [ + - ]: 44 : if( xRegCnt.is() )
352 : : {
353 [ + + ]: 44 : if(aNewValue)
354 [ + - ][ + - ]: 8 : RegressionCurveHelper::addMeanValueLine( xRegCnt, 0, 0 );
[ + - ]
355 : : else
356 [ + - ]: 36 : RegressionCurveHelper::removeMeanValueLine( xRegCnt );
357 : 44 : }
358 : 44 : }
359 : :
360 : : //-----------------------------------------------------------------------------
361 : : //PROP_CHART_STATISTIC_ERROR_CATEGORY
362 : : // deprecated, replaced by ErrorBarStyle
363 : : class WrappedErrorCategoryProperty : public WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorCategory >
364 : : {
365 : : public:
366 : : virtual ::com::sun::star::chart::ChartErrorCategory getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
367 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorCategory aNewValue ) const;
368 : :
369 : : explicit WrappedErrorCategoryProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
370 : : tSeriesOrDiagramPropertyType ePropertyType );
371 : : virtual ~WrappedErrorCategoryProperty();
372 : : };
373 : :
374 : 127 : WrappedErrorCategoryProperty::WrappedErrorCategoryProperty(
375 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
376 : : tSeriesOrDiagramPropertyType ePropertyType )
377 : : : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorCategory >( "ErrorCategory"
378 [ + - ][ + - ]: 127 : , uno::makeAny( ::com::sun::star::chart::ChartErrorCategory_NONE ), spChart2ModelContact, ePropertyType )
379 : : {
380 : 127 : }
381 : 127 : WrappedErrorCategoryProperty::~WrappedErrorCategoryProperty()
382 : : {
383 [ - + ]: 254 : }
384 : :
385 : 18 : ::com::sun::star::chart::ChartErrorCategory WrappedErrorCategoryProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
386 : : {
387 : 18 : ::com::sun::star::chart::ChartErrorCategory aRet = ::com::sun::star::chart::ChartErrorCategory_NONE;
388 [ + - ]: 18 : m_aDefaultValue >>= aRet;
389 : 18 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
390 [ + - ][ + - ]: 18 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - # #
# # # # ]
[ + - ]
391 : : {
392 : 18 : sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE;
393 [ + - ][ + - ]: 18 : xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle;
394 [ + - - - : 18 : switch(nStyle)
+ - - -
- ]
395 : : {
396 : : case ::com::sun::star::chart::ErrorBarStyle::NONE:
397 : 12 : aRet = ::com::sun::star::chart::ChartErrorCategory_NONE;
398 : 12 : break;
399 : : case ::com::sun::star::chart::ErrorBarStyle::VARIANCE:
400 : 0 : aRet = ::com::sun::star::chart::ChartErrorCategory_VARIANCE;
401 : 0 : break;
402 : : case ::com::sun::star::chart::ErrorBarStyle::STANDARD_DEVIATION:
403 : 0 : aRet = ::com::sun::star::chart::ChartErrorCategory_STANDARD_DEVIATION;
404 : 0 : break;
405 : : case ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE:
406 : 0 : aRet = ::com::sun::star::chart::ChartErrorCategory_CONSTANT_VALUE;
407 : 0 : break;
408 : : case ::com::sun::star::chart::ErrorBarStyle::RELATIVE:
409 : 6 : aRet = ::com::sun::star::chart::ChartErrorCategory_PERCENT;
410 : 6 : break;
411 : : case ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN:
412 : 0 : aRet = ::com::sun::star::chart::ChartErrorCategory_ERROR_MARGIN;
413 : 0 : break;
414 : : case ::com::sun::star::chart::ErrorBarStyle::STANDARD_ERROR:
415 : 0 : break;
416 : : case ::com::sun::star::chart::ErrorBarStyle::FROM_DATA:
417 : 0 : break;
418 : : default:
419 : 18 : break;
420 : : }
421 : : }
422 : 18 : return aRet;
423 : : }
424 : 6 : void WrappedErrorCategoryProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorCategory aNewValue ) const
425 : : {
426 [ + - ]: 6 : if( !xSeriesPropertySet.is() )
427 : 6 : return;
428 : :
429 [ + - ]: 6 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
430 [ + - ]: 6 : if( xErrorBarProperties.is() )
431 : : {
432 : 6 : sal_Int32 nNewStyle = ::com::sun::star::chart::ErrorBarStyle::NONE;
433 [ - - - - : 6 : switch(aNewValue)
+ - - ]
434 : : {
435 : : case ::com::sun::star::chart::ChartErrorCategory_NONE:
436 : 0 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::NONE;
437 : 0 : break;
438 : : case ::com::sun::star::chart::ChartErrorCategory_VARIANCE:
439 : 0 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::VARIANCE;
440 : 0 : break;
441 : : case ::com::sun::star::chart::ChartErrorCategory_STANDARD_DEVIATION:
442 : 0 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::STANDARD_DEVIATION;
443 : 0 : break;
444 : : case ::com::sun::star::chart::ChartErrorCategory_CONSTANT_VALUE:
445 : 0 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE;
446 : 0 : break;
447 : : case ::com::sun::star::chart::ChartErrorCategory_PERCENT:
448 : 6 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::RELATIVE;
449 : 6 : break;
450 : : case ::com::sun::star::chart::ChartErrorCategory_ERROR_MARGIN:
451 : 0 : nNewStyle = ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN;
452 : 0 : break;
453 : : default:
454 : 0 : break;
455 : : }
456 [ + - ][ + - ]: 6 : xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny(nNewStyle) );
[ + - ]
457 : 6 : }
458 : : }
459 : :
460 : : //-----------------------------------------------------------------------------
461 : : //PROP_CHART_STATISTIC_PERCENT_ERROR
462 : : class WrappedPercentageErrorProperty : public WrappedStatisticProperty< double >
463 : : {
464 : : public:
465 : : virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
466 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const;
467 : :
468 : : explicit WrappedPercentageErrorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
469 : : tSeriesOrDiagramPropertyType ePropertyType );
470 : : virtual ~WrappedPercentageErrorProperty();
471 : :
472 : : private:
473 : : mutable Any m_aOuterValue;
474 : : };
475 : :
476 : 127 : WrappedPercentageErrorProperty::WrappedPercentageErrorProperty(
477 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
478 : : tSeriesOrDiagramPropertyType ePropertyType )
479 : : : WrappedStatisticProperty< double >( "PercentageError"
480 [ + - ][ + - ]: 127 : , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType )
481 : : {
482 : 127 : }
483 : 127 : WrappedPercentageErrorProperty::~WrappedPercentageErrorProperty()
484 : : {
485 [ - + ]: 254 : }
486 : :
487 : 166 : double WrappedPercentageErrorProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
488 : : {
489 : 166 : double aRet = 0.0;
490 : 166 : m_aDefaultValue >>= aRet;
491 : 166 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
492 [ + - ][ + - ]: 166 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + + ][ + - ]
[ + - ][ + - ]
[ + + # #
# # # # ]
[ + - ]
493 : : {
494 [ + - ][ + - ]: 18 : if( ::com::sun::star::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) )
495 [ + - ][ + - ]: 18 : xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
496 : : else
497 : 0 : m_aOuterValue >>= aRet;
498 : : }
499 : 166 : return aRet;
500 : : }
501 : 24 : void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const
502 : : {
503 [ + - ]: 24 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
504 [ + - ]: 24 : if( xErrorBarProperties.is() )
505 : : {
506 [ + - ]: 24 : m_aOuterValue = uno::makeAny( aNewValue );
507 [ + + ][ + - ]: 24 : if( ::com::sun::star::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) )
508 : : {
509 [ + - ][ + - ]: 6 : xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
510 [ + - ][ + - ]: 6 : xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue );
511 : : }
512 : 24 : }
513 : 24 : }
514 : :
515 : : //-----------------------------------------------------------------------------
516 : : //PROP_CHART_STATISTIC_ERROR_MARGIN
517 : : class WrappedErrorMarginProperty : public WrappedStatisticProperty< double >
518 : : {
519 : : public:
520 : : virtual double getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
521 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const;
522 : :
523 : : explicit WrappedErrorMarginProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
524 : : tSeriesOrDiagramPropertyType ePropertyType );
525 : : virtual ~WrappedErrorMarginProperty();
526 : :
527 : : private:
528 : : mutable Any m_aOuterValue;
529 : : };
530 : :
531 : 127 : WrappedErrorMarginProperty::WrappedErrorMarginProperty(
532 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
533 : : tSeriesOrDiagramPropertyType ePropertyType )
534 : : : WrappedStatisticProperty< double >( "ErrorMargin"
535 [ + - ][ + - ]: 127 : , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType )
536 : : {
537 : 127 : }
538 : 127 : WrappedErrorMarginProperty::~WrappedErrorMarginProperty()
539 : : {
540 [ - + ]: 254 : }
541 : :
542 : 166 : double WrappedErrorMarginProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
543 : : {
544 : 166 : double aRet = 0.0;
545 : 166 : m_aDefaultValue >>= aRet;
546 : 166 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
547 [ + - ][ + - ]: 166 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + + ][ + - ]
[ + - ][ + - ]
[ + + # #
# # # # ]
[ + - ]
548 : : {
549 [ + - ][ - + ]: 18 : if( ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) )
550 [ # # ][ # # ]: 0 : xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
551 : : else
552 : 18 : m_aOuterValue >>= aRet;
553 : : }
554 : 166 : return aRet;
555 : : }
556 : 24 : void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, double aNewValue ) const
557 : : {
558 [ + - ]: 24 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
559 [ + - ]: 24 : if( xErrorBarProperties.is() )
560 : : {
561 [ + - ]: 24 : m_aOuterValue = uno::makeAny( aNewValue );
562 [ - + ][ + - ]: 24 : if( ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) )
563 : : {
564 [ # # ][ # # ]: 0 : xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
565 [ # # ][ # # ]: 0 : xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue );
566 : : }
567 : 24 : }
568 : 24 : }
569 : :
570 : : //-----------------------------------------------------------------------------
571 : : //PROP_CHART_STATISTIC_ERROR_INDICATOR
572 : : class WrappedErrorIndicatorProperty : public WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorIndicatorType >
573 : : {
574 : : public:
575 : : virtual ::com::sun::star::chart::ChartErrorIndicatorType getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
576 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorIndicatorType aNewValue ) const;
577 : :
578 : : explicit WrappedErrorIndicatorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
579 : : tSeriesOrDiagramPropertyType ePropertyType );
580 : : virtual ~WrappedErrorIndicatorProperty();
581 : : };
582 : :
583 : 127 : WrappedErrorIndicatorProperty::WrappedErrorIndicatorProperty(
584 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
585 : : tSeriesOrDiagramPropertyType ePropertyType )
586 : : : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorIndicatorType >( "ErrorIndicator"
587 [ + - ][ + - ]: 127 : , uno::makeAny( ::com::sun::star::chart::ChartErrorIndicatorType_NONE ), spChart2ModelContact, ePropertyType )
588 : : {
589 : 127 : }
590 : 127 : WrappedErrorIndicatorProperty::~WrappedErrorIndicatorProperty()
591 : : {
592 [ - + ]: 254 : }
593 : :
594 : 166 : ::com::sun::star::chart::ChartErrorIndicatorType WrappedErrorIndicatorProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
595 : : {
596 : 166 : ::com::sun::star::chart::ChartErrorIndicatorType aRet = ::com::sun::star::chart::ChartErrorIndicatorType_NONE;
597 [ + - ]: 166 : m_aDefaultValue >>= aRet;
598 : 166 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
599 [ + - ][ + - ]: 166 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ + + ][ + - ]
[ + - ][ + - ]
[ + + # #
# # # # ]
[ + - ]
600 : : {
601 : 18 : sal_Bool bPositive = sal_False;
602 : 18 : sal_Bool bNegative = sal_False;
603 [ + - ][ + - ]: 18 : xErrorBarProperties->getPropertyValue( "ShowPositiveError" ) >>= bPositive;
604 [ + - ][ + - ]: 18 : xErrorBarProperties->getPropertyValue( "ShowNegativeError" ) >>= bNegative;
605 : :
606 [ + - ][ + + ]: 18 : if( bPositive && bNegative )
607 : 6 : aRet = ::com::sun::star::chart::ChartErrorIndicatorType_TOP_AND_BOTTOM;
608 [ - + ][ # # ]: 12 : else if( bPositive && !bNegative )
609 : 0 : aRet = ::com::sun::star::chart::ChartErrorIndicatorType_UPPER;
610 [ + - ][ - + ]: 12 : else if( !bPositive && bNegative )
611 : 18 : aRet = ::com::sun::star::chart::ChartErrorIndicatorType_LOWER;
612 : : }
613 : 166 : return aRet;
614 : : }
615 : 6 : void WrappedErrorIndicatorProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartErrorIndicatorType aNewValue ) const
616 : : {
617 [ + - ]: 6 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
618 [ + - ]: 6 : if( xErrorBarProperties.is() )
619 : : {
620 : 6 : sal_Bool bPositive = sal_False;
621 : 6 : sal_Bool bNegative = sal_False;
622 [ + - - - ]: 6 : switch( aNewValue )
623 : : {
624 : : case ::com::sun::star::chart::ChartErrorIndicatorType_TOP_AND_BOTTOM:
625 : 6 : bPositive = sal_True;
626 : 6 : bNegative = sal_True;
627 : 6 : break;
628 : : case ::com::sun::star::chart::ChartErrorIndicatorType_UPPER:
629 : 0 : bPositive = sal_True;
630 : 0 : break;
631 : : case ::com::sun::star::chart::ChartErrorIndicatorType_LOWER:
632 : 0 : bNegative = sal_True;
633 : 0 : break;
634 : : default:
635 : 0 : break;
636 : : }
637 : :
638 [ + - ][ + - ]: 6 : xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::makeAny(bPositive) );
[ + - ]
639 [ + - ][ + - ]: 6 : xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::makeAny(bNegative) );
[ + - ]
640 : 6 : }
641 : 6 : }
642 : :
643 : :
644 : : //-----------------------------------------------------------------------------
645 : : //PROP_CHART_STATISTIC_ERROR_BAR_STYLE
646 : : // this is the new constant group that replaces the deprecated enum ChartErrorCategory
647 : : class WrappedErrorBarStyleProperty : public WrappedStatisticProperty< sal_Int32 >
648 : : {
649 : : public:
650 : : virtual sal_Int32 getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
651 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nNewValue ) const;
652 : :
653 : : explicit WrappedErrorBarStyleProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact1,
654 : : tSeriesOrDiagramPropertyType ePropertyType );
655 : : virtual ~WrappedErrorBarStyleProperty();
656 : : };
657 : :
658 : 127 : WrappedErrorBarStyleProperty::WrappedErrorBarStyleProperty(
659 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
660 : : tSeriesOrDiagramPropertyType ePropertyType )
661 : : : WrappedStatisticProperty< sal_Int32 >( "ErrorBarStyle"
662 [ + - ][ + - ]: 127 : , uno::makeAny( ::com::sun::star::chart::ErrorBarStyle::NONE ), spChart2ModelContact, ePropertyType )
663 : : {
664 : 127 : }
665 : 127 : WrappedErrorBarStyleProperty::~WrappedErrorBarStyleProperty()
666 : : {
667 [ - + ]: 254 : }
668 : :
669 : 148 : sal_Int32 WrappedErrorBarStyleProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
670 : : {
671 : 148 : sal_Int32 nRet = ::com::sun::star::chart::ErrorBarStyle::NONE;
672 : 148 : m_aDefaultValue >>= nRet;
673 : 148 : uno::Reference< beans::XPropertySet > xErrorBarProperties;
674 [ + - ][ + - ]: 148 : if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
[ + - ][ + - ]
[ - + ][ + - ]
[ + - ][ + - ]
[ - + # #
# # # # ]
[ + - ]
675 : : {
676 [ # # ][ # # ]: 0 : xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nRet;
677 : : }
678 : 148 : return nRet;
679 : : }
680 : 36 : void WrappedErrorBarStyleProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, sal_Int32 nNewValue ) const
681 : : {
682 [ + - ]: 36 : if( !xSeriesPropertySet.is() )
683 : 36 : return;
684 : :
685 [ + - ]: 36 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
686 [ + - ]: 36 : if( xErrorBarProperties.is() )
687 : : {
688 [ + - ][ + - ]: 36 : xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny( nNewValue ));
[ + - ]
689 : 36 : }
690 : : }
691 : :
692 : : //-----------------------------------------------------------------------------
693 : : //PROP_CHART_STATISTIC_ERROR_RANGE_POSITIVE
694 : : class WrappedErrorBarRangePositiveProperty : public WrappedStatisticProperty< OUString >
695 : : {
696 : : public:
697 : : virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
698 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const;
699 : :
700 : : explicit WrappedErrorBarRangePositiveProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
701 : : tSeriesOrDiagramPropertyType ePropertyType );
702 : : virtual ~WrappedErrorBarRangePositiveProperty();
703 : :
704 : : private:
705 : : mutable Any m_aOuterValue;
706 : : };
707 : :
708 : 127 : WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty(
709 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
710 : : tSeriesOrDiagramPropertyType ePropertyType )
711 : : : WrappedStatisticProperty< OUString >( "ErrorBarRangePositive"
712 [ + - ][ + - ]: 127 : , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType )
713 : : {
714 : 127 : }
715 : 127 : WrappedErrorBarRangePositiveProperty::~WrappedErrorBarRangePositiveProperty()
716 : : {
717 [ - + ]: 254 : }
718 : :
719 : 148 : OUString WrappedErrorBarRangePositiveProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
720 : : {
721 : 148 : OUString aRet;
722 : 148 : m_aDefaultValue >>= aRet;
723 : 148 : uno::Reference< chart2::data::XDataSource > xErrorBarDataSource;
724 [ + - - + ]: 592 : if( xSeriesPropertySet.is() &&
[ - + ][ + - ]
725 [ + - ][ + - ]: 296 : ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarDataSource ) &&
[ + - ][ + - ]
[ + - ][ + - ]
[ # # # #
# # ]
726 : 148 : xErrorBarDataSource.is())
727 : : {
728 : : uno::Reference< chart2::data::XDataSequence > xSeq(
729 : : StatisticsHelper::getErrorDataSequenceFromDataSource(
730 [ # # ]: 0 : xErrorBarDataSource, true /* positive */, true /* y-error */ ));
731 [ # # ]: 0 : if( xSeq.is())
732 [ # # ][ # # ]: 0 : aRet = xSeq->getSourceRangeRepresentation();
733 : : else
734 : 0 : m_aOuterValue >>= aRet;
735 : : }
736 [ + - ][ + - ]: 148 : lcl_ConvertRangeToXML( aRet, m_spChart2ModelContact );
[ + - ]
737 : 148 : return aRet;
738 : : }
739 : :
740 : 0 : void WrappedErrorBarRangePositiveProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const
741 : : {
742 [ # # ]: 0 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
743 [ # # ]: 0 : if( xErrorBarProperties.is() )
744 : : {
745 : : uno::Reference< chart2::data::XDataProvider > xDataProvider(
746 [ # # ][ # # ]: 0 : lcl_getDataProviderFromContact( m_spChart2ModelContact ));
[ # # ]
747 [ # # ]: 0 : uno::Reference< chart2::data::XDataSource > xDataSource( xErrorBarProperties, uno::UNO_QUERY );
748 [ # # ][ # # ]: 0 : if( xDataSource.is() && xDataProvider.is())
[ # # ]
749 : : {
750 : 0 : OUString aXMLRange( aNewValue );
751 [ # # ][ # # ]: 0 : lcl_ConvertRangeFromXML( aNewValue, m_spChart2ModelContact );
[ # # ]
752 : : StatisticsHelper::setErrorDataSequence(
753 [ # # ]: 0 : xDataSource, xDataProvider, aNewValue, true /* positive */, true /* y-error */, &aXMLRange );
754 [ # # ]: 0 : m_aOuterValue <<= aNewValue;
755 : 0 : }
756 : 0 : }
757 : 0 : }
758 : :
759 : : //-----------------------------------------------------------------------------
760 : : //PROP_CHART_STATISTIC_ERROR_RANGE_NEGATIVE
761 : : class WrappedErrorBarRangeNegativeProperty : public WrappedStatisticProperty< OUString >
762 : : {
763 : : public:
764 : : virtual OUString getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
765 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const;
766 : :
767 : : explicit WrappedErrorBarRangeNegativeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
768 : : tSeriesOrDiagramPropertyType ePropertyType );
769 : : virtual ~WrappedErrorBarRangeNegativeProperty();
770 : :
771 : : private:
772 : : mutable Any m_aOuterValue;
773 : : };
774 : :
775 : 127 : WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty(
776 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
777 : : tSeriesOrDiagramPropertyType ePropertyType )
778 : : : WrappedStatisticProperty< OUString >( "ErrorBarRangeNegative"
779 [ + - ][ + - ]: 127 : , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType )
780 : : {
781 : 127 : }
782 : 127 : WrappedErrorBarRangeNegativeProperty::~WrappedErrorBarRangeNegativeProperty()
783 : : {
784 [ - + ]: 254 : }
785 : :
786 : 148 : OUString WrappedErrorBarRangeNegativeProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
787 : : {
788 : 148 : OUString aRet;
789 : 148 : m_aDefaultValue >>= aRet;
790 : 148 : uno::Reference< chart2::data::XDataSource > xErrorBarDataSource;
791 [ + - - + ]: 592 : if( xSeriesPropertySet.is() &&
[ - + ][ + - ]
792 [ + - ][ + - ]: 296 : ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarDataSource ) &&
[ + - ][ + - ]
[ + - ][ + - ]
[ # # # #
# # ]
793 : 148 : xErrorBarDataSource.is())
794 : : {
795 : : uno::Reference< chart2::data::XDataSequence > xSeq(
796 : : StatisticsHelper::getErrorDataSequenceFromDataSource(
797 [ # # ]: 0 : xErrorBarDataSource, false /* positive */, true /* y-error */ ));
798 [ # # ]: 0 : if( xSeq.is())
799 [ # # ][ # # ]: 0 : aRet = xSeq->getSourceRangeRepresentation();
800 : : else
801 : 0 : m_aOuterValue >>= aRet;
802 : : }
803 [ + - ][ + - ]: 148 : lcl_ConvertRangeToXML( aRet, m_spChart2ModelContact );
[ + - ]
804 : 148 : return aRet;
805 : : }
806 : :
807 : 0 : void WrappedErrorBarRangeNegativeProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, OUString aNewValue ) const
808 : : {
809 [ # # ]: 0 : uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) );
810 [ # # ]: 0 : if( xErrorBarProperties.is() )
811 : : {
812 : : uno::Reference< chart2::data::XDataProvider > xDataProvider(
813 [ # # ][ # # ]: 0 : lcl_getDataProviderFromContact( m_spChart2ModelContact ));
[ # # ]
814 [ # # ]: 0 : uno::Reference< chart2::data::XDataSource > xDataSource( xErrorBarProperties, uno::UNO_QUERY );
815 [ # # ][ # # ]: 0 : if( xDataSource.is() && xDataProvider.is())
[ # # ]
816 : : {
817 : 0 : OUString aXMLRange( aNewValue );
818 [ # # ][ # # ]: 0 : lcl_ConvertRangeFromXML( aNewValue, m_spChart2ModelContact );
[ # # ]
819 : : StatisticsHelper::setErrorDataSequence(
820 [ # # ]: 0 : xDataSource, xDataProvider, aNewValue, false /* positive */, true /* y-error */, &aXMLRange );
821 [ # # ]: 0 : m_aOuterValue <<= aNewValue;
822 : 0 : }
823 : 0 : }
824 : 0 : }
825 : :
826 : : //-----------------------------------------------------------------------------
827 : : //PROP_CHART_STATISTIC_REGRESSION_CURVES
828 : : class WrappedRegressionCurvesProperty : public WrappedStatisticProperty< ::com::sun::star::chart::ChartRegressionCurveType >
829 : : {
830 : : public:
831 : : virtual ::com::sun::star::chart::ChartRegressionCurveType getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
832 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartRegressionCurveType aNewValue ) const;
833 : :
834 : : explicit WrappedRegressionCurvesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
835 : : tSeriesOrDiagramPropertyType ePropertyType );
836 : : virtual ~WrappedRegressionCurvesProperty();
837 : : };
838 : :
839 : 127 : WrappedRegressionCurvesProperty::WrappedRegressionCurvesProperty(
840 : : ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
841 : : tSeriesOrDiagramPropertyType ePropertyType )
842 : : : WrappedStatisticProperty< ::com::sun::star::chart::ChartRegressionCurveType >( "RegressionCurves"
843 [ + - ][ + - ]: 127 : , lcl_getRegressionDefault(), spChart2ModelContact, ePropertyType )
844 : : {
845 : 127 : }
846 : 127 : WrappedRegressionCurvesProperty::~WrappedRegressionCurvesProperty()
847 : : {
848 [ - + ]: 254 : }
849 : :
850 : 240 : ::com::sun::star::chart::ChartRegressionCurveType WrappedRegressionCurvesProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
851 : : {
852 : : ::com::sun::star::chart::ChartRegressionCurveType aRet;
853 [ + - ]: 240 : m_aDefaultValue >>= aRet;
854 [ + - ]: 240 : uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY );
855 [ + - ]: 240 : if( xRegCnt.is() )
856 : : {
857 : : aRet = lcl_getRegressionCurveType(
858 [ + - ]: 240 : RegressionCurveHelper::getFirstRegressTypeNotMeanValueLine( xRegCnt ) );
859 : : }
860 : 240 : return aRet;
861 : : }
862 : 42 : void WrappedRegressionCurvesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, ::com::sun::star::chart::ChartRegressionCurveType aNewValue ) const
863 : : {
864 [ + - ]: 42 : uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY );
865 [ + - ]: 42 : if( xRegCnt.is() )
866 : : {
867 : 42 : RegressionCurveHelper::tRegressionType eNewRegressionType = lcl_getRegressionType( aNewValue );
868 [ + - ]: 42 : RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCnt );
869 [ + + ]: 42 : if( eNewRegressionType != RegressionCurveHelper::REGRESSION_TYPE_NONE )
870 [ + - ][ + - ]: 6 : RegressionCurveHelper::addRegressionCurve( eNewRegressionType, xRegCnt, 0, 0 );
[ + - ]
871 : 42 : }
872 : 42 : }
873 : :
874 : : //-----------------------------------------------------------------------------
875 : : //PROP_CHART_STATISTIC_REGRESSION_PROPERTIES
876 : : //PROP_CHART_STATISTIC_ERROR_PROPERTIES
877 : : //PROP_CHART_STATISTIC_MEAN_VALUE_PROPERTIES
878 : : class WrappedStatisticPropertySetProperty : public WrappedStatisticProperty< Reference< beans::XPropertySet > >
879 : : {
880 : : public:
881 : : virtual Reference< beans::XPropertySet > getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const;
882 : : // properties are read-only, so this method should never be called
883 : : virtual void setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, Reference< beans::XPropertySet > xNewValue ) const;
884 : :
885 : : enum PropertySetType
886 : : {
887 : : PROPERTY_SET_TYPE_REGRESSION,
888 : : PROPERTY_SET_TYPE_ERROR_BAR,
889 : : PROPERTY_SET_TYPE_MEAN_VALUE
890 : : };
891 : :
892 : : explicit WrappedStatisticPropertySetProperty(
893 : : PropertySetType ePropertySetType, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact,
894 : : tSeriesOrDiagramPropertyType ePropertyType );
895 : : virtual ~WrappedStatisticPropertySetProperty();
896 : :
897 : : private:
898 : : PropertySetType m_eType;
899 : : };
900 : :
901 : 381 : WrappedStatisticPropertySetProperty::WrappedStatisticPropertySetProperty(
902 : : PropertySetType ePropertySetType
903 : : , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact
904 : : , tSeriesOrDiagramPropertyType ePropertyType )
905 : : : WrappedStatisticProperty< Reference< beans::XPropertySet > >(
906 : : (ePropertySetType == PROPERTY_SET_TYPE_REGRESSION)
907 : : ? rtl::OUString("DataRegressionProperties")
908 : : : (ePropertySetType == PROPERTY_SET_TYPE_ERROR_BAR)
909 : : ? rtl::OUString("DataErrorProperties")
910 : : : rtl::OUString("DataMeanValueProperties")
911 : : , uno::Any(), spChart2ModelContact, ePropertyType )
912 [ + + ][ + + ]: 381 : , m_eType( ePropertySetType )
[ + - ][ + + ]
[ + + ][ + + ]
[ # # # #
# # ]
913 : : {
914 : 381 : }
915 : 381 : WrappedStatisticPropertySetProperty::~WrappedStatisticPropertySetProperty()
916 : : {
917 [ - + ]: 762 : }
918 : :
919 : 2 : Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFromSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet ) const
920 : : {
921 : 2 : Reference< beans::XPropertySet > xResult;
922 [ + - ]: 2 : uno::Reference< chart2::XRegressionCurveContainer > xRegCnt( xSeriesPropertySet, uno::UNO_QUERY );
923 : :
924 [ - - + - ]: 2 : switch( m_eType )
925 : : {
926 : : case PROPERTY_SET_TYPE_REGRESSION:
927 [ # # ]: 0 : if( xRegCnt.is() )
928 [ # # ][ # # ]: 0 : xResult.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt ), uno::UNO_QUERY );
929 : 0 : break;
930 : : case PROPERTY_SET_TYPE_ERROR_BAR:
931 [ # # ]: 0 : if( xSeriesPropertySet.is())
932 [ # # ][ # # ]: 0 : xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xResult;
[ # # ]
933 : 0 : break;
934 : : case PROPERTY_SET_TYPE_MEAN_VALUE:
935 [ + - ]: 2 : if( xRegCnt.is() )
936 [ + - ][ + - ]: 2 : xResult.set( RegressionCurveHelper::getMeanValueLine( xRegCnt ), uno::UNO_QUERY );
937 : 2 : break;
938 : : }
939 : :
940 : 2 : return xResult;
941 : : }
942 : :
943 : 0 : void WrappedStatisticPropertySetProperty::setValueToSeries(
944 : : const Reference< beans::XPropertySet >& /* xSeriesPropertySet */
945 : : , Reference< beans::XPropertySet > /* xNewValue */ ) const
946 : : {
947 : 0 : }
948 : :
949 : : //-----------------------------------------------------------------------------
950 : :
951 : : namespace
952 : : {
953 : : enum
954 : : {
955 : : //statistic properties
956 : : PROP_CHART_STATISTIC_CONST_ERROR_LOW = FAST_PROPERTY_ID_START_CHART_STATISTIC_PROP,
957 : : PROP_CHART_STATISTIC_CONST_ERROR_HIGH,
958 : : PROP_CHART_STATISTIC_MEAN_VALUE,
959 : : PROP_CHART_STATISTIC_ERROR_CATEGORY,
960 : : PROP_CHART_STATISTIC_ERROR_BAR_STYLE,
961 : : PROP_CHART_STATISTIC_PERCENT_ERROR,
962 : : PROP_CHART_STATISTIC_ERROR_MARGIN,
963 : : PROP_CHART_STATISTIC_ERROR_INDICATOR,
964 : : PROP_CHART_STATISTIC_ERROR_RANGE_POSITIVE,
965 : : PROP_CHART_STATISTIC_ERROR_RANGE_NEGATIVE,
966 : : PROP_CHART_STATISTIC_REGRESSION_CURVES,
967 : : PROP_CHART_STATISTIC_REGRESSION_PROPERTIES,
968 : : PROP_CHART_STATISTIC_ERROR_PROPERTIES,
969 : : PROP_CHART_STATISTIC_MEAN_VALUE_PROPERTIES
970 : : };
971 : :
972 : : /** @parameter bDataSeriesProperty if true, this property is for a single data
973 : : series, if false, it is for the whole diagram, i.e. for all
974 : : series
975 : : */
976 : 127 : void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
977 : : , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact
978 : : , tSeriesOrDiagramPropertyType ePropertyType )
979 : : {
980 [ + - ][ + - ]: 127 : rList.push_back( new WrappedConstantErrorLowProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
981 [ + - ][ + - ]: 127 : rList.push_back( new WrappedConstantErrorHighProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
982 [ + - ][ + - ]: 127 : rList.push_back( new WrappedMeanValueProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
983 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorCategoryProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
984 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorBarStyleProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
985 [ + - ][ + - ]: 127 : rList.push_back( new WrappedPercentageErrorProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
986 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorMarginProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
987 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorIndicatorProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
988 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorBarRangePositiveProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
989 [ + - ][ + - ]: 127 : rList.push_back( new WrappedErrorBarRangeNegativeProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
990 [ + - ][ + - ]: 127 : rList.push_back( new WrappedRegressionCurvesProperty( spChart2ModelContact, ePropertyType ) );
[ + - ]
991 : : rList.push_back( new WrappedStatisticPropertySetProperty(
992 [ + - ][ + - ]: 127 : WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_REGRESSION, spChart2ModelContact, ePropertyType ) );
[ + - ]
993 : : rList.push_back( new WrappedStatisticPropertySetProperty(
994 [ + - ][ + - ]: 127 : WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_ERROR_BAR, spChart2ModelContact, ePropertyType ) );
[ + - ]
995 : : rList.push_back( new WrappedStatisticPropertySetProperty(
996 [ + - ][ + - ]: 127 : WrappedStatisticPropertySetProperty::PROPERTY_SET_TYPE_MEAN_VALUE, spChart2ModelContact, ePropertyType ) );
[ + - ]
997 : 127 : }
998 : :
999 : : }//anonymous namespace
1000 : :
1001 : 17 : void WrappedStatisticProperties::addProperties( ::std::vector< Property > & rOutProperties )
1002 : : {
1003 : : rOutProperties.push_back(
1004 : : Property( "ConstantErrorLow",
1005 : : PROP_CHART_STATISTIC_CONST_ERROR_LOW,
1006 [ + - ]: 17 : ::getCppuType( reinterpret_cast< double * >(0)),
1007 : : beans::PropertyAttribute::BOUND
1008 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1009 : : rOutProperties.push_back(
1010 : : Property( "ConstantErrorHigh",
1011 : : PROP_CHART_STATISTIC_CONST_ERROR_HIGH,
1012 [ + - ]: 17 : ::getCppuType( reinterpret_cast< double * >(0)),
1013 : : beans::PropertyAttribute::BOUND
1014 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1015 : : rOutProperties.push_back(
1016 : : Property( "MeanValue",
1017 : : PROP_CHART_STATISTIC_MEAN_VALUE,
1018 [ + - ]: 17 : ::getBooleanCppuType(),
1019 : : beans::PropertyAttribute::BOUND
1020 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1021 : : rOutProperties.push_back(
1022 : : Property( "ErrorCategory",
1023 : : PROP_CHART_STATISTIC_ERROR_CATEGORY,
1024 [ + - ]: 17 : ::getCppuType( reinterpret_cast< ::com::sun::star::chart::ChartErrorCategory * >(0)),
1025 : : beans::PropertyAttribute::BOUND
1026 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1027 : : rOutProperties.push_back(
1028 : : Property( "ErrorBarStyle",
1029 : : PROP_CHART_STATISTIC_ERROR_BAR_STYLE,
1030 [ + - ]: 17 : ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
1031 : : beans::PropertyAttribute::BOUND
1032 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1033 : : rOutProperties.push_back(
1034 : : Property( "PercentageError",
1035 : : PROP_CHART_STATISTIC_PERCENT_ERROR,
1036 [ + - ]: 17 : ::getCppuType( reinterpret_cast< double * >(0)),
1037 : : beans::PropertyAttribute::BOUND
1038 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1039 : : rOutProperties.push_back(
1040 : : Property( "ErrorMargin",
1041 : : PROP_CHART_STATISTIC_ERROR_MARGIN,
1042 [ + - ]: 17 : ::getCppuType( reinterpret_cast< double * >(0)),
1043 : : beans::PropertyAttribute::BOUND
1044 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1045 : : rOutProperties.push_back(
1046 : : Property( "ErrorIndicator",
1047 : : PROP_CHART_STATISTIC_ERROR_INDICATOR,
1048 [ + - ]: 17 : ::getCppuType( reinterpret_cast< ::com::sun::star::chart::ChartErrorIndicatorType * >(0)),
1049 : : beans::PropertyAttribute::BOUND
1050 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1051 : : rOutProperties.push_back(
1052 : : Property( "ErrorBarRangePositive",
1053 : : PROP_CHART_STATISTIC_ERROR_RANGE_POSITIVE,
1054 [ + - ]: 17 : ::getCppuType( reinterpret_cast< OUString * >(0)),
1055 : : beans::PropertyAttribute::BOUND
1056 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1057 : : rOutProperties.push_back(
1058 : : Property( "ErrorBarRangeNegative",
1059 : : PROP_CHART_STATISTIC_ERROR_RANGE_NEGATIVE,
1060 [ + - ]: 17 : ::getCppuType( reinterpret_cast< OUString * >(0)),
1061 : : beans::PropertyAttribute::BOUND
1062 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1063 : : rOutProperties.push_back(
1064 : : Property( "RegressionCurves",
1065 : : PROP_CHART_STATISTIC_REGRESSION_CURVES,
1066 [ + - ]: 17 : ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartRegressionCurveType * >(0)),
1067 : : beans::PropertyAttribute::BOUND
1068 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEDEFAULT ));
1069 : :
1070 : : rOutProperties.push_back(
1071 : : Property( "DataRegressionProperties",
1072 : : PROP_CHART_STATISTIC_REGRESSION_PROPERTIES,
1073 [ + - ]: 17 : ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)),
1074 : : beans::PropertyAttribute::BOUND
1075 : : | beans::PropertyAttribute::READONLY
1076 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEVOID ));
1077 : : rOutProperties.push_back(
1078 : : Property( "DataErrorProperties",
1079 : : PROP_CHART_STATISTIC_ERROR_PROPERTIES,
1080 [ + - ]: 17 : ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)),
1081 : : beans::PropertyAttribute::BOUND
1082 : : | beans::PropertyAttribute::READONLY
1083 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEVOID ));
1084 : : rOutProperties.push_back(
1085 : : Property( "DataMeanValueProperties",
1086 : : PROP_CHART_STATISTIC_MEAN_VALUE_PROPERTIES,
1087 [ + - ]: 17 : ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)),
1088 : : beans::PropertyAttribute::BOUND
1089 : : | beans::PropertyAttribute::READONLY
1090 [ + - ]: 17 : | beans::PropertyAttribute::MAYBEVOID ));
1091 : 17 : }
1092 : :
1093 : : //-----------------------------------------------------------------------------
1094 : 94 : void WrappedStatisticProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
1095 : : , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
1096 : : {
1097 [ + - ]: 94 : lcl_addWrappedProperties( rList, spChart2ModelContact, DATA_SERIES );
1098 : 94 : }
1099 : :
1100 : : //-----------------------------------------------------------------------------
1101 : 33 : void WrappedStatisticProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
1102 : : , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
1103 : : {
1104 [ + - ]: 33 : lcl_addWrappedProperties( rList, spChart2ModelContact, DIAGRAM );
1105 : 33 : }
1106 : :
1107 : : } //namespace wrapper
1108 : : } //namespace chart
1109 : : //.............................................................................
1110 : :
1111 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|