xref: /AOO41X/main/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_chart2.hxx"
30 
31 #include "WrappedScaleProperty.hxx"
32 #include "macros.hxx"
33 #include "CommonConverters.hxx"
34 #include "AxisHelper.hxx"
35 #include <com/sun/star/chart2/XAxis.hpp>
36 #include <com/sun/star/chart/ChartAxisType.hpp>
37 #include <chartview/ExplicitScaleValues.hxx>
38 
39 using namespace ::com::sun::star;
40 using ::com::sun::star::uno::Any;
41 using namespace ::com::sun::star::chart2;
42 using ::com::sun::star::uno::Reference;
43 using ::com::sun::star::uno::Sequence;
44 using ::rtl::OUString;
45 using ::com::sun::star::chart::TimeIncrement;
46 
47 //.............................................................................
48 namespace chart
49 {
50 namespace wrapper
51 {
52 
53 WrappedScaleProperty::WrappedScaleProperty( tScaleProperty eScaleProperty
54                 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
55             : WrappedProperty(OUString(),OUString())
56             , m_spChart2ModelContact( spChart2ModelContact )
57             , m_eScaleProperty( eScaleProperty )
58 {
59     switch( m_eScaleProperty )
60     {
61         case SCALE_PROP_MAX:
62             m_aOuterName = C2U("Max");
63             break;
64         case SCALE_PROP_MIN:
65             m_aOuterName = C2U("Min");
66             break;
67         case SCALE_PROP_ORIGIN:
68             m_aOuterName = C2U("Origin");
69             break;
70         case SCALE_PROP_STEPMAIN:
71             m_aOuterName = C2U("StepMain");
72             break;
73         case SCALE_PROP_STEPHELP:
74             m_aOuterName = C2U("StepHelp");
75             break;
76         case SCALE_PROP_STEPHELP_COUNT:
77             m_aOuterName = C2U("StepHelpCount");
78             break;
79         case SCALE_PROP_AUTO_MAX:
80             m_aOuterName = C2U("AutoMax");
81             break;
82         case SCALE_PROP_AUTO_MIN:
83             m_aOuterName = C2U("AutoMin");
84             break;
85         case SCALE_PROP_AUTO_ORIGIN:
86             m_aOuterName = C2U("AutoOrigin");
87             break;
88         case SCALE_PROP_AUTO_STEPMAIN:
89             m_aOuterName = C2U("AutoStepMain");
90             break;
91         case SCALE_PROP_AUTO_STEPHELP:
92             m_aOuterName = C2U("AutoStepHelp");
93             break;
94         case SCALE_PROP_AXIS_TYPE:
95             m_aOuterName = C2U("AxisType");
96             break;
97         case SCALE_PROP_DATE_INCREMENT:
98             m_aOuterName = C2U("TimeIncrement");
99             break;
100         case SCALE_PROP_EXPLICIT_DATE_INCREMENT:
101             m_aOuterName = C2U("ExplicitTimeIncrement");
102             break;
103         case SCALE_PROP_LOGARITHMIC:
104             m_aOuterName = C2U("Logarithmic");
105             break;
106         case SCALE_PROP_REVERSEDIRECTION:
107             m_aOuterName = C2U("ReverseDirection");
108             break;
109         default:
110             OSL_ENSURE(false,"unknown scale property");
111             break;
112     }
113 }
114 
115 WrappedScaleProperty::~WrappedScaleProperty()
116 {
117 }
118 
119 void WrappedScaleProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
120             , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
121 {
122     rList.push_back( new WrappedScaleProperty( SCALE_PROP_MAX, spChart2ModelContact ) );
123     rList.push_back( new WrappedScaleProperty( SCALE_PROP_MIN, spChart2ModelContact ) );
124     rList.push_back( new WrappedScaleProperty( SCALE_PROP_ORIGIN, spChart2ModelContact ) );
125     rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPMAIN, spChart2ModelContact ) );
126     rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP, spChart2ModelContact ) );
127     rList.push_back( new WrappedScaleProperty( SCALE_PROP_STEPHELP_COUNT, spChart2ModelContact ) );
128     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MAX, spChart2ModelContact ) );
129     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_MIN, spChart2ModelContact ) );
130     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_ORIGIN, spChart2ModelContact ) );
131     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPMAIN, spChart2ModelContact ) );
132     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AUTO_STEPHELP, spChart2ModelContact ) );
133     rList.push_back( new WrappedScaleProperty( SCALE_PROP_AXIS_TYPE, spChart2ModelContact ) );
134     rList.push_back( new WrappedScaleProperty( SCALE_PROP_DATE_INCREMENT, spChart2ModelContact ) );
135     rList.push_back( new WrappedScaleProperty( SCALE_PROP_EXPLICIT_DATE_INCREMENT, spChart2ModelContact ) );
136     rList.push_back( new WrappedScaleProperty( SCALE_PROP_LOGARITHMIC, spChart2ModelContact ) );
137     rList.push_back( new WrappedScaleProperty( SCALE_PROP_REVERSEDIRECTION, spChart2ModelContact ) );
138 }
139 
140 void WrappedScaleProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
141                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
142 {
143     setPropertyValue( m_eScaleProperty, rOuterValue, xInnerPropertySet );
144 }
145 
146 Any WrappedScaleProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
147                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
148 {
149     return getPropertyValue( m_eScaleProperty, xInnerPropertySet );
150 }
151 
152 void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
153                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
154 {
155     m_aOuterValue = rOuterValue;
156 
157     Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
158     OSL_ENSURE(xAxis.is(),"need an XAxis");
159     if(!xAxis.is())
160         return;
161 
162     bool bSetScaleData     = false;
163 
164     chart2::ScaleData aScaleData( xAxis->getScaleData() );
165 
166     sal_Bool bBool = false;
167     switch( eScaleProperty )
168     {
169         case SCALE_PROP_MAX:
170         {
171             aScaleData.Maximum = rOuterValue;
172             bSetScaleData = true;
173             break;
174         }
175         case SCALE_PROP_MIN:
176         {
177             aScaleData.Minimum = rOuterValue;
178             bSetScaleData = true;
179             break;
180         }
181         case SCALE_PROP_STEPMAIN:
182         {
183             aScaleData.IncrementData.Distance = rOuterValue;
184             bSetScaleData = true;
185             break;
186         }
187         case SCALE_PROP_STEPHELP:
188         {
189             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
190             if( rSubIncrements.getLength() == 0 )
191                 rSubIncrements.realloc( 1 );
192 
193             double fStepMain = 0, fStepHelp = 0;
194             if( (rOuterValue >>= fStepHelp) )
195             {
196                 if( AxisHelper::isLogarithmic(aScaleData.Scaling) )
197                 {
198                     sal_Int32 nIntervalCount = static_cast< sal_Int32 >(fStepHelp);
199                     rSubIncrements[ 0 ].IntervalCount <<= nIntervalCount;
200                 }
201                 else if( (fStepHelp != 0.0) &&
202                     (aScaleData.IncrementData.Distance >>= fStepMain) )
203                 {
204                     // approximate interval count
205                     sal_Int32 nIntervalCount = static_cast< sal_Int32 >(fStepMain / fStepHelp);
206                     rSubIncrements[ 0 ].IntervalCount <<= nIntervalCount;
207                 }
208             }
209             bSetScaleData = true;
210             break;
211         }
212         case SCALE_PROP_STEPHELP_COUNT:
213         {
214             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
215             if( rSubIncrements.getLength() == 0 )
216                 rSubIncrements.realloc( 1 );
217             sal_Int32 nIntervalCount=0;
218             if( rOuterValue>>=nIntervalCount )
219                 rSubIncrements[ 0 ].IntervalCount <<= nIntervalCount;
220             else
221                 rSubIncrements[ 0 ].IntervalCount  = Any();
222             bSetScaleData = true;
223             break;
224         }
225         case SCALE_PROP_AUTO_MAX:
226         {
227             if( (rOuterValue >>= bBool) && bBool )
228                 aScaleData.Maximum = Any();
229             else
230                 aScaleData.Maximum = getPropertyValue( SCALE_PROP_MAX, xInnerPropertySet );
231             bSetScaleData = true;
232             break;
233         }
234         case SCALE_PROP_AUTO_MIN:
235         {
236             if( (rOuterValue >>= bBool) && bBool )
237                 aScaleData.Minimum = Any();
238             else
239                 aScaleData.Minimum = getPropertyValue( SCALE_PROP_MIN, xInnerPropertySet );
240             bSetScaleData = true;
241             break;
242         }
243         case SCALE_PROP_AUTO_STEPMAIN:
244         {
245             if( (rOuterValue >>= bBool) && bBool )
246                 aScaleData.IncrementData.Distance = Any();
247             else
248                 aScaleData.IncrementData.Distance = getPropertyValue( SCALE_PROP_STEPMAIN, xInnerPropertySet );
249             bSetScaleData = true;
250             break;
251         }
252         case SCALE_PROP_AUTO_STEPHELP:
253         {
254             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
255             if( rSubIncrements.getLength() == 0 )
256                 rSubIncrements.realloc( 1 );
257 
258             if( (rOuterValue >>= bBool) && bBool )
259                 rSubIncrements[ 0 ].IntervalCount = Any();
260             else
261                 rSubIncrements[ 0 ].IntervalCount = getPropertyValue( SCALE_PROP_STEPHELP_COUNT, xInnerPropertySet );
262             bSetScaleData = true;
263             break;
264         }
265         case SCALE_PROP_ORIGIN:
266         {
267             aScaleData.Origin = rOuterValue;
268             bSetScaleData = true;
269             break;
270         }
271         case SCALE_PROP_AUTO_ORIGIN:
272         {
273             if( (rOuterValue >>= bBool) && bBool )
274                 aScaleData.Origin = Any();
275             else
276                 aScaleData.Origin = getPropertyValue( SCALE_PROP_ORIGIN, xInnerPropertySet );
277             bSetScaleData = true;
278             break;
279         }
280         case SCALE_PROP_AXIS_TYPE:
281         {
282             sal_Int32 nType = 0;
283             if( (rOuterValue >>= nType) )
284             {
285                 if( ::com::sun::star::chart::ChartAxisType::AUTOMATIC == nType )
286                 {
287                     aScaleData.AutoDateAxis = true;
288                     if( aScaleData.AxisType == AxisType::DATE )
289                         aScaleData.AxisType = AxisType::CATEGORY;
290                 }
291                 else if( ::com::sun::star::chart::ChartAxisType::CATEGORY == nType )
292                 {
293                     aScaleData.AutoDateAxis = false;
294                     if( aScaleData.AxisType == AxisType::DATE )
295                         aScaleData.AxisType = AxisType::CATEGORY;
296                 }
297                 else if( ::com::sun::star::chart::ChartAxisType::DATE == nType )
298                 {
299                     if( aScaleData.AxisType == AxisType::CATEGORY )
300                         aScaleData.AxisType = AxisType::DATE;
301                 }
302                 bSetScaleData = true;
303             }
304             break;
305         }
306         case SCALE_PROP_DATE_INCREMENT:
307         {
308             TimeIncrement aTimeIncrement;
309             rOuterValue >>= aTimeIncrement;
310             aScaleData.TimeIncrement = aTimeIncrement;
311             bSetScaleData = true;
312             break;
313         }
314         case SCALE_PROP_EXPLICIT_DATE_INCREMENT:
315             //read only property
316             break;
317         case SCALE_PROP_LOGARITHMIC:
318         {
319             if( rOuterValue >>= bBool )
320             {
321                 bool bWasLogarithm = AxisHelper::isLogarithmic( aScaleData.Scaling );
322 
323                 // safe comparison between sal_Bool and bool
324                 if( (!bBool) != (!bWasLogarithm) )
325                 {
326                     if( bBool )
327                         aScaleData.Scaling = AxisHelper::createLogarithmicScaling( 10.0 );
328                     else
329                         aScaleData.Scaling = 0;
330                     bSetScaleData = true;
331                 }
332             }
333             break;
334         }
335         case SCALE_PROP_REVERSEDIRECTION:
336         {
337             if( rOuterValue >>= bBool )
338             {
339                 bool bWasReverse = ( AxisOrientation_REVERSE == aScaleData.Orientation );
340                 if( (!bBool) != (!bWasReverse) ) // safe comparison between sal_Bool and bool
341                 {
342                     aScaleData.Orientation = bBool ? AxisOrientation_REVERSE : AxisOrientation_MATHEMATICAL;
343                     bSetScaleData = true;
344                 }
345             }
346             break;
347         }
348         default:
349         {
350             OSL_ENSURE(false,"unknown scale property");
351             break;
352         }
353     }
354 
355     if( bSetScaleData )
356         xAxis->setScaleData( aScaleData );
357 }
358 
359 Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
360                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
361 {
362     Any aRet( m_aOuterValue );
363 
364     Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
365     OSL_ENSURE(xAxis.is(),"need an XAxis");
366     if(!xAxis.is())
367         return aRet;
368 
369     chart2::ScaleData aScaleData( xAxis->getScaleData() );
370 
371     ExplicitScaleData aExplicitScale;
372     ExplicitIncrementData aExplicitIncrement;
373 
374     switch( eScaleProperty )
375     {
376         case SCALE_PROP_MAX:
377         {
378             aRet = aScaleData.Maximum;
379             if( !aRet.hasValue() )
380             {
381                 m_spChart2ModelContact->getExplicitValuesForAxis(
382                     xAxis, aExplicitScale, aExplicitIncrement );
383                 aRet <<= aExplicitScale.Maximum;
384             }
385             break;
386         }
387         case SCALE_PROP_MIN:
388         {
389             aRet = aScaleData.Minimum;
390             if( !aRet.hasValue() )
391             {
392                 m_spChart2ModelContact->getExplicitValuesForAxis(
393                     xAxis, aExplicitScale, aExplicitIncrement );
394                 aRet <<= aExplicitScale.Minimum;
395             }
396             break;
397         }
398 
399         case SCALE_PROP_STEPMAIN:
400         {
401             aRet = aScaleData.IncrementData.Distance;
402             if( !aRet.hasValue() )
403             {
404                 m_spChart2ModelContact->getExplicitValuesForAxis(
405                     xAxis, aExplicitScale, aExplicitIncrement );
406                 aRet <<= aExplicitIncrement.Distance;
407             }
408             break;
409         }
410         case SCALE_PROP_STEPHELP:
411         {
412             // todo: evaluate PostEquidistant
413             bool bNeedToCalculateExplicitValues = true;
414 
415             bool bLogarithmic( AxisHelper::isLogarithmic(aScaleData.Scaling) );
416             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
417             if( bLogarithmic )
418             {
419                 if( rSubIncrements.getLength() > 0 )
420                 {
421                     sal_Int32 nIntervalCount = 0;
422                     rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount;
423                     aRet = uno::makeAny( double(nIntervalCount) );
424                     bNeedToCalculateExplicitValues = false;
425                 }
426             }
427             else if( aScaleData.IncrementData.Distance.hasValue() )
428             {
429                 if( rSubIncrements.getLength() > 0 )
430                 {
431                     double fStepMain = 0;
432                     sal_Int32 nIntervalCount = 0;
433                     if( (aScaleData.IncrementData.Distance >>= fStepMain) &&
434                         (rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount) &&
435                         nIntervalCount > 0 )
436                     {
437                         aRet <<= ( fStepMain / static_cast< double >( nIntervalCount ) );
438                         bNeedToCalculateExplicitValues = false;
439                     }
440                 }
441                 else
442                 {
443                     aRet = aScaleData.IncrementData.Distance;
444                     bNeedToCalculateExplicitValues = false;
445                 }
446             }
447 
448             if( bNeedToCalculateExplicitValues )
449             {
450                 m_spChart2ModelContact->getExplicitValuesForAxis(
451                     xAxis, aExplicitScale, aExplicitIncrement );
452 
453                 if( !aExplicitIncrement.SubIncrements.empty() &&
454                      aExplicitIncrement.SubIncrements[ 0 ].IntervalCount > 0 )
455                 {
456                     if( bLogarithmic )
457                     {
458                         if( rSubIncrements.getLength() > 0 )
459                         {
460                             sal_Int32 nIntervalCount = aExplicitIncrement.SubIncrements[ 0 ].IntervalCount;
461                             aRet = uno::makeAny( double(nIntervalCount) );
462                         }
463                     }
464                     else
465                         aRet <<= ( aExplicitIncrement.Distance /
466                                 static_cast< double >(
467                                     aExplicitIncrement.SubIncrements[ 0 ].IntervalCount ));
468                 }
469                 else
470                 {
471                     if( bLogarithmic )
472                         aRet <<= 5.0;
473                     else
474                         aRet <<= aExplicitIncrement.Distance;
475                 }
476             }
477             break;
478         }
479         case SCALE_PROP_STEPHELP_COUNT:
480         {
481             sal_Int32 nIntervalCount = 0;
482             bool bNeedToCalculateExplicitValues = true;
483             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
484             if( rSubIncrements.getLength() > 0 )
485             {
486                 if( (rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount) && (nIntervalCount > 0) )
487                     bNeedToCalculateExplicitValues = false;
488             }
489             if( bNeedToCalculateExplicitValues )
490             {
491                 m_spChart2ModelContact->getExplicitValuesForAxis( xAxis, aExplicitScale, aExplicitIncrement );
492                 if( !aExplicitIncrement.SubIncrements.empty() )
493                     nIntervalCount = aExplicitIncrement.SubIncrements[ 0 ].IntervalCount;
494             }
495             aRet = uno::makeAny( nIntervalCount );
496             break;
497         }
498         case SCALE_PROP_AUTO_MAX:
499         {
500             aRet <<= (sal_Bool)( !aScaleData.Maximum.hasValue() );
501             break;
502         }
503         case SCALE_PROP_AUTO_MIN:
504         {
505             aRet <<= (sal_Bool)( !aScaleData.Minimum.hasValue() );
506             break;
507         }
508         case SCALE_PROP_AUTO_STEPMAIN:
509         {
510             aRet <<= (sal_Bool)( !aScaleData.IncrementData.Distance.hasValue() );
511             break;
512         }
513         case SCALE_PROP_AUTO_STEPHELP:
514         {
515             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
516             if( rSubIncrements.getLength() > 0 )
517                 aRet <<= (sal_Bool)( !rSubIncrements[ 0 ].IntervalCount.hasValue() );
518             else
519                 aRet <<= sal_True;
520             break;
521         }
522         case SCALE_PROP_ORIGIN:
523         {
524             aRet = aScaleData.Origin;
525             if( !aRet.hasValue() )
526             {
527                 m_spChart2ModelContact->getExplicitValuesForAxis(
528                     xAxis, aExplicitScale, aExplicitIncrement );
529                 aRet <<= aExplicitScale.Origin;
530             }
531             break;
532         }
533         case SCALE_PROP_AUTO_ORIGIN:
534         {
535             aRet <<= !hasDoubleValue(aScaleData.Origin);
536             break;
537         }
538         case SCALE_PROP_AXIS_TYPE:
539         {
540             sal_Int32 nType = ::com::sun::star::chart::ChartAxisType::AUTOMATIC;
541             if( aScaleData.AxisType == AxisType::DATE )
542             {
543                 nType = ::com::sun::star::chart::ChartAxisType::DATE;
544             }
545             else if( aScaleData.AxisType == AxisType::CATEGORY )
546             {
547                 if( !aScaleData.AutoDateAxis )
548                     nType = ::com::sun::star::chart::ChartAxisType::CATEGORY;
549             }
550             aRet = uno::makeAny( nType );
551             break;
552         }
553         case SCALE_PROP_DATE_INCREMENT:
554         {
555             if( aScaleData.AxisType == AxisType::DATE || aScaleData.AutoDateAxis )
556                 aRet = uno::makeAny( aScaleData.TimeIncrement );
557             break;
558         }
559         case SCALE_PROP_EXPLICIT_DATE_INCREMENT:
560         {
561             if( aScaleData.AxisType == AxisType::DATE || aScaleData.AutoDateAxis )
562             {
563                 m_spChart2ModelContact->getExplicitValuesForAxis( xAxis, aExplicitScale, aExplicitIncrement );
564                 if( aExplicitScale.AxisType == AxisType::DATE )
565                 {
566                     TimeIncrement aTimeIncrement;
567                     aTimeIncrement.MajorTimeInterval = uno::makeAny( aExplicitIncrement.MajorTimeInterval );
568                     aTimeIncrement.MinorTimeInterval = uno::makeAny( aExplicitIncrement.MinorTimeInterval );
569                     aTimeIncrement.TimeResolution = uno::makeAny( aExplicitScale.TimeResolution );
570                     aRet = uno::makeAny(aTimeIncrement);
571                 }
572             }
573 
574             if( aScaleData.AxisType == AxisType::DATE || aScaleData.AutoDateAxis )
575                 aRet = uno::makeAny( aScaleData.TimeIncrement );
576             break;
577         }
578         case SCALE_PROP_LOGARITHMIC:
579         {
580             aRet <<= static_cast< sal_Bool >( AxisHelper::isLogarithmic(aScaleData.Scaling) );
581             break;
582         }
583         case SCALE_PROP_REVERSEDIRECTION:
584         {
585             aRet <<= static_cast< sal_Bool >( AxisOrientation_REVERSE == aScaleData.Orientation );
586             break;
587         }
588         default:
589         {
590             OSL_ENSURE(false,"unknown scale property");
591             break;
592         }
593     }
594 
595     return aRet;
596 }
597 
598 } //  namespace wrapper
599 } //  namespace chart
600 //.............................................................................
601