merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / model / main / Axis.cxx
blob1c0800d11e1273ba90e38107cc5f44316c6b30c4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Axis.cxx,v $
10 * $Revision: 1.15.44.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_chart2.hxx"
33 #include "Axis.hxx"
34 #include "GridProperties.hxx"
35 #include "macros.hxx"
36 #include "CharacterProperties.hxx"
37 #include "LineProperties.hxx"
38 #include "UserDefinedProperties.hxx"
39 #include "PropertyHelper.hxx"
40 #include "ContainerHelper.hxx"
41 #include "CloneHelper.hxx"
42 #include "AxisHelper.hxx"
43 #include "EventListenerHelper.hxx"
44 #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
45 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
46 #include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
47 #include <com/sun/star/chart/ChartAxisPosition.hpp>
48 #include <com/sun/star/chart2/AxisType.hpp>
49 #include <com/sun/star/beans/PropertyAttribute.hpp>
50 #include <com/sun/star/lang/Locale.hpp>
51 #include <com/sun/star/drawing/LineStyle.hpp>
52 #include <com/sun/star/drawing/LineDash.hpp>
53 #include <com/sun/star/drawing/LineJoint.hpp>
54 #include <com/sun/star/awt/Size.hpp>
55 #include <rtl/uuid.h>
56 #include <cppuhelper/queryinterface.hxx>
58 #include <vector>
59 #include <algorithm>
61 using namespace ::com::sun::star;
62 using namespace ::com::sun::star::beans::PropertyAttribute;
64 using ::rtl::OUString;
65 using ::com::sun::star::uno::Sequence;
66 using ::com::sun::star::uno::Reference;
67 using ::com::sun::star::uno::Any;
68 using ::com::sun::star::beans::Property;
69 using ::osl::MutexGuard;
71 namespace
74 static const OUString lcl_aServiceName(
75 RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.Axis" ));
77 enum
79 PROP_AXIS_SHOW,
80 PROP_AXIS_CROSSOVER_POSITION,
81 PROP_AXIS_CROSSOVER_VALUE,
82 PROP_AXIS_DISPLAY_LABELS,
83 PROP_AXIS_NUMBER_FORMAT,
84 PROP_AXIS_LABEL_POSITION,
85 PROP_AXIS_TEXT_ROTATION,
86 PROP_AXIS_TEXT_BREAK,
87 PROP_AXIS_TEXT_OVERLAP,
88 PROP_AXIS_TEXT_STACKED,
89 PROP_AXIS_TEXT_ARRANGE_ORDER,
90 PROP_AXIS_REFERENCE_DIAGRAM_SIZE,
92 PROP_AXIS_MAJOR_TICKMARKS,
93 PROP_AXIS_MINOR_TICKMARKS,
94 PROP_AXIS_MARK_POSITION
97 void lcl_AddPropertiesToVector(
98 ::std::vector< Property > & rOutProperties )
100 rOutProperties.push_back(
101 Property( C2U( "Show" ),
102 PROP_AXIS_SHOW,
103 ::getBooleanCppuType(),
104 beans::PropertyAttribute::BOUND
105 | beans::PropertyAttribute::MAYBEDEFAULT ));
107 rOutProperties.push_back(
108 Property( C2U( "CrossoverPosition" ),
109 PROP_AXIS_CROSSOVER_POSITION,
110 ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisPosition * >(0)),
111 beans::PropertyAttribute::MAYBEDEFAULT ));
113 rOutProperties.push_back(
114 Property( C2U( "CrossoverValue" ),
115 PROP_AXIS_CROSSOVER_VALUE,
116 ::getCppuType( reinterpret_cast< const double * >(0)),
117 beans::PropertyAttribute::MAYBEVOID ));
119 rOutProperties.push_back(
120 Property( C2U( "DisplayLabels" ),
121 PROP_AXIS_DISPLAY_LABELS,
122 ::getBooleanCppuType(),
123 beans::PropertyAttribute::BOUND
124 | beans::PropertyAttribute::MAYBEDEFAULT ));
126 rOutProperties.push_back(
127 Property( C2U( "NumberFormat" ),
128 PROP_AXIS_NUMBER_FORMAT,
129 ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
130 beans::PropertyAttribute::BOUND
131 | beans::PropertyAttribute::MAYBEVOID ));
133 rOutProperties.push_back(
134 Property( C2U( "LabelPosition" ),
135 PROP_AXIS_LABEL_POSITION,
136 ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisLabelPosition * >(0)),
137 beans::PropertyAttribute::MAYBEDEFAULT ));
139 rOutProperties.push_back(
140 Property( C2U( "TextRotation" ),
141 PROP_AXIS_TEXT_ROTATION,
142 ::getCppuType( reinterpret_cast< const double * >(0)),
143 beans::PropertyAttribute::BOUND
144 | beans::PropertyAttribute::MAYBEDEFAULT ));
146 rOutProperties.push_back(
147 Property( C2U( "TextBreak" ),
148 PROP_AXIS_TEXT_BREAK,
149 ::getBooleanCppuType(),
150 beans::PropertyAttribute::BOUND
151 | beans::PropertyAttribute::MAYBEDEFAULT ));
153 rOutProperties.push_back(
154 Property( C2U( "TextOverlap" ),
155 PROP_AXIS_TEXT_OVERLAP,
156 ::getBooleanCppuType(),
157 beans::PropertyAttribute::BOUND
158 | beans::PropertyAttribute::MAYBEDEFAULT ));
160 rOutProperties.push_back(
161 Property( C2U( "StackCharacters" ),
162 PROP_AXIS_TEXT_STACKED,
163 ::getBooleanCppuType(),
164 beans::PropertyAttribute::BOUND
165 | beans::PropertyAttribute::MAYBEDEFAULT ));
167 rOutProperties.push_back(
168 Property( C2U( "ArrangeOrder" ),
169 PROP_AXIS_TEXT_ARRANGE_ORDER,
170 ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisArrangeOrderType * >(0)),
171 beans::PropertyAttribute::BOUND
172 | beans::PropertyAttribute::MAYBEDEFAULT ));
174 rOutProperties.push_back(
175 Property( C2U( "ReferencePageSize" ),
176 PROP_AXIS_REFERENCE_DIAGRAM_SIZE,
177 ::getCppuType( reinterpret_cast< const awt::Size * >(0)),
178 beans::PropertyAttribute::BOUND
179 | beans::PropertyAttribute::MAYBEVOID ));
181 rOutProperties.push_back(
182 Property( C2U( "MajorTickmarks" ),
183 PROP_AXIS_MAJOR_TICKMARKS,
184 ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
185 beans::PropertyAttribute::BOUND
186 | beans::PropertyAttribute::MAYBEDEFAULT ));
187 rOutProperties.push_back(
188 Property( C2U( "MinorTickmarks" ),
189 PROP_AXIS_MINOR_TICKMARKS,
190 ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
191 beans::PropertyAttribute::BOUND
192 | beans::PropertyAttribute::MAYBEDEFAULT ));
193 rOutProperties.push_back(
194 Property( C2U( "MarkPosition" ),
195 PROP_AXIS_MARK_POSITION,
196 ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisMarkPosition * >(0)),
197 beans::PropertyAttribute::MAYBEDEFAULT ));
200 void lcl_AddDefaultsToMap(
201 ::chart::tPropertyValueMap & rOutMap )
203 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_SHOW, true );
204 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_CROSSOVER_POSITION, ::com::sun::star::chart::ChartAxisPosition_ZERO );
205 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_LABELS, true );
206 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_LABEL_POSITION, ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS );
207 ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_AXIS_TEXT_ROTATION, 0.0 );
208 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_BREAK, false );
209 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_OVERLAP, false );
210 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_STACKED, false );
211 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TEXT_ARRANGE_ORDER, ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO );
213 float fDefaultCharHeight = 8.0;
214 ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT, fDefaultCharHeight );
215 ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultCharHeight );
216 ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight );
218 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MAJOR_TICKMARKS, 2 /* CHAXIS_MARK_OUTER */ );
219 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ );
220 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_MARK_POSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
223 const Sequence< Property > & lcl_GetPropertySequence()
225 static Sequence< Property > aPropSeq;
227 // /--
228 MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
229 if( 0 == aPropSeq.getLength() )
231 // get properties
232 ::std::vector< ::com::sun::star::beans::Property > aProperties;
233 lcl_AddPropertiesToVector( aProperties );
234 ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
235 ::chart::LineProperties::AddPropertiesToVector( aProperties );
236 ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
238 // and sort them for access via bsearch
239 ::std::sort( aProperties.begin(), aProperties.end(),
240 ::chart::PropertyNameLess() );
242 // transfer result to static Sequence
243 aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
246 return aPropSeq;
249 ::cppu::IPropertyArrayHelper & lcl_getInfoHelper()
251 static ::cppu::OPropertyArrayHelper aArrayHelper(
252 lcl_GetPropertySequence(),
253 /* bSorted = */ sal_True );
255 return aArrayHelper;
258 typedef uno::Reference< beans::XPropertySet > lcl_tSubGridType;
259 typedef uno::Sequence< lcl_tSubGridType > lcl_tSubGridSeq;
261 void lcl_CloneSubGrids(
262 const lcl_tSubGridSeq & rSource, lcl_tSubGridSeq & rDestination )
264 const lcl_tSubGridType * pBegin = rSource.getConstArray();
265 const lcl_tSubGridType * pEnd = pBegin + rSource.getLength();
267 rDestination.realloc( rSource.getLength());
268 lcl_tSubGridType * pDestBegin = rDestination.getArray();
269 lcl_tSubGridType * pDestEnd = pDestBegin + rDestination.getLength();
270 lcl_tSubGridType * pDestIt = pDestBegin;
272 for( const lcl_tSubGridType * pIt = pBegin; pIt != pEnd; ++pIt )
274 Reference< beans::XPropertySet > xSubGrid( *pIt );
275 if( xSubGrid.is())
277 Reference< util::XCloneable > xCloneable( xSubGrid, uno::UNO_QUERY );
278 if( xCloneable.is())
279 xSubGrid.set( xCloneable->createClone(), uno::UNO_QUERY );
282 (*pDestIt) = xSubGrid;
283 OSL_ASSERT( pDestIt != pDestEnd );
284 ++pDestIt;
286 OSL_ASSERT( pDestIt == pDestEnd );
287 (void)(pDestEnd); // avoid warning
290 } // anonymous namespace
292 // ================================================================================
294 namespace chart
297 Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
298 ::property::OPropertySet( m_aMutex ),
299 m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
300 m_aScaleData( AxisHelper::createDefaultScale() ),
301 m_xGrid( new GridProperties() ),
302 m_aSubGridProperties(),
303 m_xTitle()
305 setFastPropertyValue_NoBroadcast(
306 ::chart::LineProperties::PROP_LINE_COLOR, uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
308 if( m_xGrid.is())
309 ModifyListenerHelper::addListener( m_xGrid, m_xModifyEventForwarder );
310 if( m_aScaleData.Categories.is())
311 ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
313 AllocateSubGrids();
316 Axis::Axis( const Axis & rOther ) :
317 MutexContainer(),
318 impl::Axis_Base(),
319 ::property::OPropertySet( rOther, m_aMutex ),
320 m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
321 m_aScaleData( rOther.m_aScaleData )
323 m_xGrid.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xGrid ));
324 if( m_xGrid.is())
325 ModifyListenerHelper::addListener( m_xGrid, m_xModifyEventForwarder );
327 if( m_aScaleData.Categories.is())
328 ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
330 if( rOther.m_aSubGridProperties.getLength() != 0 )
331 lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties );
332 ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
334 m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
335 if( m_xTitle.is())
336 ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
339 // late initialization to call after copy-constructing
340 void Axis::Init( const Axis & /* rOther */ )
342 if( m_aScaleData.Categories.is())
343 EventListenerHelper::addListener( m_aScaleData.Categories, this );
346 Axis::~Axis()
350 ModifyListenerHelper::removeListener( m_xGrid, m_xModifyEventForwarder );
351 ModifyListenerHelper::removeListenerFromAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
352 ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder );
353 if( m_aScaleData.Categories.is())
355 ModifyListenerHelper::removeListener( m_aScaleData.Categories, m_xModifyEventForwarder );
356 m_aScaleData.Categories.set(0);
359 catch( const uno::Exception & ex )
361 ASSERT_EXCEPTION( ex );
364 m_aSubGridProperties.realloc(0);
365 m_xGrid = 0;
366 m_xTitle = 0;
369 void Axis::AllocateSubGrids()
371 sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength();
372 sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength();
374 if( nOldSubIncCount > nNewSubIncCount )
376 // remove superfluous entries
377 for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i )
378 ModifyListenerHelper::removeListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder );
379 m_aSubGridProperties.realloc( nNewSubIncCount );
381 else if( nOldSubIncCount < nNewSubIncCount )
383 m_aSubGridProperties.realloc( nNewSubIncCount );
385 // allocate new entries
386 for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i )
388 m_aSubGridProperties[ i ] = new GridProperties();
389 LineProperties::SetLineInvisible( m_aSubGridProperties[ i ] );
390 ModifyListenerHelper::addListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder );
395 // --------------------------------------------------------------------------------
397 // ____ XAxis ____
398 void SAL_CALL Axis::setScaleData( const chart2::ScaleData& rScaleData )
399 throw (uno::RuntimeException)
402 // /--
403 MutexGuard aGuard( m_aMutex );
404 if( m_aScaleData.Categories.is())
406 ModifyListenerHelper::removeListener( m_aScaleData.Categories, m_xModifyEventForwarder );
407 EventListenerHelper::removeListener( m_aScaleData.Categories, this );
409 m_aScaleData = rScaleData;
410 ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
411 EventListenerHelper::addListener( m_aScaleData.Categories, this );
413 AllocateSubGrids();
414 // \--
416 fireModifyEvent();
419 chart2::ScaleData SAL_CALL Axis::getScaleData()
420 throw (uno::RuntimeException)
422 // /--
423 MutexGuard aGuard( m_aMutex );
424 return m_aScaleData;
425 // \--
428 Reference< beans::XPropertySet > SAL_CALL Axis::getGridProperties()
429 throw (uno::RuntimeException)
431 // /--
432 MutexGuard aGuard( m_aMutex );
433 return m_xGrid;
434 // \--
436 Sequence< Reference< beans::XPropertySet > > SAL_CALL Axis::getSubGridProperties()
437 throw (uno::RuntimeException)
439 // /--
440 MutexGuard aGuard( m_aMutex );
441 return m_aSubGridProperties;
442 // \--
445 Sequence< Reference< beans::XPropertySet > > SAL_CALL Axis::getSubTickProperties()
446 throw (uno::RuntimeException)
448 OSL_ENSURE( false, "Not implemented yet" );
449 return Sequence< Reference< beans::XPropertySet > >();
453 // ____ XTitled ____
454 Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject()
455 throw (uno::RuntimeException)
457 // /--
458 MutexGuard aGuard( GetMutex() );
459 return m_xTitle;
460 // \--
463 void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& Title )
464 throw (uno::RuntimeException)
467 // /--
468 MutexGuard aGuard( GetMutex() );
469 if( m_xTitle.is())
470 ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder );
471 m_xTitle = Title;
472 if( m_xTitle.is())
473 ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
474 // \--
476 fireModifyEvent();
479 // ____ XCloneable ____
480 Reference< util::XCloneable > SAL_CALL Axis::createClone()
481 throw (uno::RuntimeException)
483 Axis * pNewAxis( new Axis( *this ));
484 // hold a reference to the clone
485 Reference< util::XCloneable > xResult( pNewAxis );
486 // do initialization that uses uno references to the clone
487 pNewAxis->Init( *this );
488 return xResult;
491 // ____ XModifyBroadcaster ____
492 void SAL_CALL Axis::addModifyListener( const Reference< util::XModifyListener >& aListener )
493 throw (uno::RuntimeException)
497 Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
498 xBroadcaster->addModifyListener( aListener );
500 catch( const uno::Exception & ex )
502 ASSERT_EXCEPTION( ex );
506 void SAL_CALL Axis::removeModifyListener( const Reference< util::XModifyListener >& aListener )
507 throw (uno::RuntimeException)
511 Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
512 xBroadcaster->removeModifyListener( aListener );
514 catch( const uno::Exception & ex )
516 ASSERT_EXCEPTION( ex );
520 // ____ XModifyListener ____
521 void SAL_CALL Axis::modified( const lang::EventObject& aEvent )
522 throw (uno::RuntimeException)
524 m_xModifyEventForwarder->modified( aEvent );
527 // ____ XEventListener (base of XModifyListener) ____
528 void SAL_CALL Axis::disposing( const lang::EventObject& Source )
529 throw (uno::RuntimeException)
531 if( Source.Source == m_aScaleData.Categories )
532 m_aScaleData.Categories = 0;
535 // ____ OPropertySet ____
536 void Axis::firePropertyChangeEvent()
538 fireModifyEvent();
541 void Axis::fireModifyEvent()
543 m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this )));
546 // ================================================================================
548 // ____ OPropertySet ____
549 uno::Any Axis::GetDefaultValue( sal_Int32 nHandle ) const
550 throw(beans::UnknownPropertyException)
552 static tPropertyValueMap aStaticDefaults;
554 // /--
555 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
556 if( 0 == aStaticDefaults.size() )
558 CharacterProperties::AddDefaultsToMap( aStaticDefaults );
559 LineProperties::AddDefaultsToMap( aStaticDefaults );
561 // initialize defaults
562 lcl_AddDefaultsToMap( aStaticDefaults );
565 tPropertyValueMap::const_iterator aFound(
566 aStaticDefaults.find( nHandle ));
568 if( aFound == aStaticDefaults.end())
569 return uno::Any();
571 return (*aFound).second;
572 // \--
575 ::cppu::IPropertyArrayHelper & SAL_CALL Axis::getInfoHelper()
577 return lcl_getInfoHelper();
581 // ____ XPropertySet ____
582 Reference< beans::XPropertySetInfo > SAL_CALL
583 Axis::getPropertySetInfo()
584 throw (uno::RuntimeException)
586 static Reference< beans::XPropertySetInfo > xInfo;
588 // /--
589 MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
590 if( !xInfo.is())
592 xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
593 getInfoHelper());
596 return xInfo;
597 // \--
600 // ================================================================================
602 Sequence< OUString > Axis::getSupportedServiceNames_Static()
604 Sequence< OUString > aServices( 2 );
605 aServices[ 0 ] = C2U( "com.sun.star.chart2.Axis" );
606 aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" );
607 return aServices;
610 using impl::Axis_Base;
612 IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet )
613 IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet )
615 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
616 APPHELPER_XSERVICEINFO_IMPL( Axis, lcl_aServiceName );
618 } // namespace chart