1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <GridProperties.hxx>
22 #include <CharacterProperties.hxx>
23 #include <LinePropertiesHelper.hxx>
24 #include <UserDefinedProperties.hxx>
25 #include <PropertyHelper.hxx>
26 #include <AxisHelper.hxx>
27 #include <EventListenerHelper.hxx>
28 #include <ModifyListenerHelper.hxx>
30 #include <unonames.hxx>
32 #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
33 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
34 #include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
35 #include <com/sun/star/chart/ChartAxisPosition.hpp>
36 #include <com/sun/star/beans/PropertyAttribute.hpp>
37 #include <com/sun/star/awt/Size.hpp>
38 #include <cppuhelper/supportsservice.hxx>
39 #include <comphelper/diagnose_ex.hxx>
40 #include <rtl/ref.hxx>
45 using namespace ::com::sun::star
;
46 using namespace ::com::sun::star::beans::PropertyAttribute
;
48 using ::com::sun::star::uno::Sequence
;
49 using ::com::sun::star::uno::Reference
;
50 using ::com::sun::star::beans::Property
;
51 using ::osl::MutexGuard
;
59 PROP_AXIS_CROSSOVER_POSITION
,
60 PROP_AXIS_CROSSOVER_VALUE
,
61 PROP_AXIS_DISPLAY_LABELS
,
62 PROP_AXIS_NUMBERFORMAT
,
63 PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE
,
64 PROP_AXIS_LABEL_POSITION
,
65 PROP_AXIS_TEXT_ROTATION
,
67 PROP_AXIS_TEXT_OVERLAP
,
68 PROP_AXIS_TEXT_STACKED
,
69 PROP_AXIS_TEXT_ARRANGE_ORDER
,
70 PROP_AXIS_REFERENCE_DIAGRAM_SIZE
,
72 PROP_AXIS_MAJOR_TICKMARKS
,
73 PROP_AXIS_MINOR_TICKMARKS
,
74 PROP_AXIS_MARK_POSITION
,
76 PROP_AXIS_DISPLAY_UNITS
,
77 PROP_AXIS_BUILTINUNIT
,
79 PROP_AXIS_TRY_STAGGERING_FIRST
,
80 PROP_AXIS_MAJOR_ORIGIN
83 void lcl_AddPropertiesToVector(
84 std::vector
< Property
> & rOutProperties
)
86 rOutProperties
.emplace_back( "Show",
88 cppu::UnoType
<bool>::get(),
89 beans::PropertyAttribute::BOUND
90 | beans::PropertyAttribute::MAYBEDEFAULT
);
92 rOutProperties
.emplace_back( "CrossoverPosition",
93 PROP_AXIS_CROSSOVER_POSITION
,
94 cppu::UnoType
<css::chart::ChartAxisPosition
>::get(),
95 beans::PropertyAttribute::MAYBEDEFAULT
);
97 rOutProperties
.emplace_back( "CrossoverValue",
98 PROP_AXIS_CROSSOVER_VALUE
,
99 cppu::UnoType
<double>::get(),
100 beans::PropertyAttribute::MAYBEVOID
);
102 rOutProperties
.emplace_back( "DisplayLabels",
103 PROP_AXIS_DISPLAY_LABELS
,
104 cppu::UnoType
<bool>::get(),
105 beans::PropertyAttribute::BOUND
106 | beans::PropertyAttribute::MAYBEDEFAULT
);
108 rOutProperties
.emplace_back( CHART_UNONAME_NUMFMT
,
109 PROP_AXIS_NUMBERFORMAT
,
110 cppu::UnoType
<sal_Int32
>::get(),
111 beans::PropertyAttribute::BOUND
112 | beans::PropertyAttribute::MAYBEDEFAULT
);
114 rOutProperties
.emplace_back( CHART_UNONAME_LINK_TO_SRC_NUMFMT
,
115 PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE
,
116 cppu::UnoType
<bool>::get(),
117 beans::PropertyAttribute::BOUND
118 | beans::PropertyAttribute::MAYBEDEFAULT
);
120 rOutProperties
.emplace_back( "LabelPosition",
121 PROP_AXIS_LABEL_POSITION
,
122 cppu::UnoType
<css::chart::ChartAxisLabelPosition
>::get(),
123 beans::PropertyAttribute::MAYBEDEFAULT
);
125 rOutProperties
.emplace_back( "TextRotation",
126 PROP_AXIS_TEXT_ROTATION
,
127 cppu::UnoType
<double>::get(),
128 beans::PropertyAttribute::BOUND
129 | beans::PropertyAttribute::MAYBEDEFAULT
);
131 rOutProperties
.emplace_back( "TextBreak",
132 PROP_AXIS_TEXT_BREAK
,
133 cppu::UnoType
<bool>::get(),
134 beans::PropertyAttribute::BOUND
135 | beans::PropertyAttribute::MAYBEDEFAULT
);
137 rOutProperties
.emplace_back( "TextOverlap",
138 PROP_AXIS_TEXT_OVERLAP
,
139 cppu::UnoType
<bool>::get(),
140 beans::PropertyAttribute::BOUND
141 | beans::PropertyAttribute::MAYBEDEFAULT
);
143 rOutProperties
.emplace_back( "StackCharacters",
144 PROP_AXIS_TEXT_STACKED
,
145 cppu::UnoType
<bool>::get(),
146 beans::PropertyAttribute::BOUND
147 | beans::PropertyAttribute::MAYBEDEFAULT
);
149 rOutProperties
.emplace_back( "ArrangeOrder",
150 PROP_AXIS_TEXT_ARRANGE_ORDER
,
151 cppu::UnoType
<css::chart::ChartAxisArrangeOrderType
>::get(),
152 beans::PropertyAttribute::BOUND
153 | beans::PropertyAttribute::MAYBEDEFAULT
);
155 rOutProperties
.emplace_back( "ReferencePageSize",
156 PROP_AXIS_REFERENCE_DIAGRAM_SIZE
,
157 cppu::UnoType
<awt::Size
>::get(),
158 beans::PropertyAttribute::BOUND
159 | beans::PropertyAttribute::MAYBEVOID
);
161 rOutProperties
.emplace_back( "MajorTickmarks",
162 PROP_AXIS_MAJOR_TICKMARKS
,
163 cppu::UnoType
<sal_Int32
>::get(),
164 beans::PropertyAttribute::BOUND
165 | beans::PropertyAttribute::MAYBEDEFAULT
);
167 rOutProperties
.emplace_back( "MinorTickmarks",
168 PROP_AXIS_MINOR_TICKMARKS
,
169 cppu::UnoType
<sal_Int32
>::get(),
170 beans::PropertyAttribute::BOUND
171 | beans::PropertyAttribute::MAYBEDEFAULT
);
173 rOutProperties
.emplace_back( "MarkPosition",
174 PROP_AXIS_MARK_POSITION
,
175 cppu::UnoType
<css::chart::ChartAxisMarkPosition
>::get(),
176 beans::PropertyAttribute::MAYBEDEFAULT
);
178 //Properties for display units:
179 rOutProperties
.emplace_back( "DisplayUnits",
180 PROP_AXIS_DISPLAY_UNITS
,
181 cppu::UnoType
<bool>::get(),
182 beans::PropertyAttribute::BOUND
183 | beans::PropertyAttribute::MAYBEDEFAULT
);
185 //Properties for labels:
186 rOutProperties
.emplace_back( "BuiltInUnit",
187 PROP_AXIS_BUILTINUNIT
,
188 cppu::UnoType
<OUString
>::get(),
189 beans::PropertyAttribute::BOUND
190 | beans::PropertyAttribute::MAYBEDEFAULT
);
192 // Compatibility option: starting from LibreOffice 5.1 the rotated
193 // layout is preferred to staggering for axis labels.
194 rOutProperties
.emplace_back( "TryStaggeringFirst",
195 PROP_AXIS_TRY_STAGGERING_FIRST
,
196 cppu::UnoType
<bool>::get(),
197 beans::PropertyAttribute::BOUND
198 | beans::PropertyAttribute::MAYBEDEFAULT
);
200 rOutProperties
.emplace_back( "MajorOrigin",
201 PROP_AXIS_MAJOR_ORIGIN
,
202 cppu::UnoType
<double>::get(),
203 beans::PropertyAttribute::BOUND
204 | beans::PropertyAttribute::MAYBEVOID
);
211 const ::chart::tPropertyValueMap
& StaticAxisDefaults()
213 static ::chart::tPropertyValueMap aStaticDefaults
= []()
215 ::chart::tPropertyValueMap aMap
;
216 ::chart::CharacterProperties::AddDefaultsToMap( aMap
);
217 ::chart::LinePropertiesHelper::AddDefaultsToMap( aMap
);
219 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_SHOW
, true );
220 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_CROSSOVER_POSITION
, css::chart::ChartAxisPosition_ZERO
);
221 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_DISPLAY_LABELS
, true );
222 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_LINK_NUMBERFORMAT_TO_SOURCE
, true );
223 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_LABEL_POSITION
, css::chart::ChartAxisLabelPosition_NEAR_AXIS
);
224 ::chart::PropertyHelper::setPropertyValueDefault
< double >( aMap
, PROP_AXIS_TEXT_ROTATION
, 0.0 );
225 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_TEXT_BREAK
, false );
226 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_TEXT_OVERLAP
, false );
227 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_TEXT_STACKED
, false );
228 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_TEXT_ARRANGE_ORDER
, css::chart::ChartAxisArrangeOrderType_AUTO
);
230 float fDefaultCharHeight
= 10.0;
231 ::chart::PropertyHelper::setPropertyValue( aMap
, ::chart::CharacterProperties::PROP_CHAR_CHAR_HEIGHT
, fDefaultCharHeight
);
232 ::chart::PropertyHelper::setPropertyValue( aMap
, ::chart::CharacterProperties::PROP_CHAR_ASIAN_CHAR_HEIGHT
, fDefaultCharHeight
);
233 ::chart::PropertyHelper::setPropertyValue( aMap
, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT
, fDefaultCharHeight
);
235 ::chart::PropertyHelper::setPropertyValueDefault
< sal_Int32
>( aMap
, PROP_AXIS_MAJOR_TICKMARKS
, 2 /* CHAXIS_MARK_OUTER */ );
236 ::chart::PropertyHelper::setPropertyValueDefault
< sal_Int32
>( aMap
, PROP_AXIS_MINOR_TICKMARKS
, 0 /* CHAXIS_MARK_NONE */ );
237 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_MARK_POSITION
, css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS
);
238 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_DISPLAY_UNITS
, false );
239 ::chart::PropertyHelper::setPropertyValueDefault( aMap
, PROP_AXIS_TRY_STAGGERING_FIRST
, false );
242 return aStaticDefaults
;
248 ::cppu::OPropertyArrayHelper
& StaticAxisInfoHelper()
250 static ::cppu::OPropertyArrayHelper aPropHelper
= []()
252 std::vector
< css::beans::Property
> aProperties
;
253 lcl_AddPropertiesToVector( aProperties
);
254 ::chart::CharacterProperties::AddPropertiesToVector( aProperties
);
255 ::chart::LinePropertiesHelper::AddPropertiesToVector( aProperties
);
256 ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties
);
258 std::sort( aProperties
.begin(), aProperties
.end(),
259 ::chart::PropertyNameLess() );
261 return comphelper::containerToSequence( aProperties
);
266 std::vector
< rtl::Reference
< ::chart::GridProperties
> > lcl_CloneSubGrids(
267 const std::vector
< rtl::Reference
< ::chart::GridProperties
> > & rSource
)
269 std::vector
< rtl::Reference
< ::chart::GridProperties
> > aDestination
;
270 aDestination
.reserve( rSource
.size());
271 for( rtl::Reference
< ::chart::GridProperties
> const & i
: rSource
)
273 aDestination
.push_back(new ::chart::GridProperties(*i
));
278 } // anonymous namespace
284 m_xModifyEventForwarder( new ModifyEventForwarder() ),
285 m_aScaleData( AxisHelper::createDefaultScale() ),
286 m_xGrid( new GridProperties() )
288 osl_atomic_increment(&m_refCount
);
289 setFastPropertyValue_NoBroadcast(
290 ::chart::LinePropertiesHelper::PROP_LINE_COLOR
, uno::Any( static_cast< sal_Int32
>( 0xb3b3b3 ) ) ); // gray30
293 ModifyListenerHelper::addListener( m_xGrid
, m_xModifyEventForwarder
);
294 if( m_aScaleData
.Categories
.is())
295 ModifyListenerHelper::addListener( m_aScaleData
.Categories
, m_xModifyEventForwarder
);
298 osl_atomic_decrement(&m_refCount
);
301 Axis::Axis( const Axis
& rOther
) :
302 impl::Axis_Base(rOther
),
303 ::property::OPropertySet( rOther
),
304 m_xModifyEventForwarder( new ModifyEventForwarder() ),
305 m_aScaleData( rOther
.m_aScaleData
)
308 m_xGrid
= new ::chart::GridProperties(*rOther
.m_xGrid
);
310 ModifyListenerHelper::addListener( m_xGrid
, m_xModifyEventForwarder
);
312 if( m_aScaleData
.Categories
.is())
313 ModifyListenerHelper::addListener( m_aScaleData
.Categories
, m_xModifyEventForwarder
);
315 if( !rOther
.m_aSubGridProperties
.empty() )
316 m_aSubGridProperties
= lcl_CloneSubGrids( rOther
.m_aSubGridProperties
);
317 ModifyListenerHelper::addListenerToAllElements( m_aSubGridProperties
, m_xModifyEventForwarder
);
319 if ( rOther
.m_xTitle
)
320 m_xTitle
= new Title( *rOther
.m_xTitle
);
322 ModifyListenerHelper::addListener( m_xTitle
, m_xModifyEventForwarder
);
325 // late initialization to call after copy-constructing
328 if( m_aScaleData
.Categories
.is())
329 EventListenerHelper::addListener( m_aScaleData
.Categories
, this );
336 ModifyListenerHelper::removeListener( m_xGrid
, m_xModifyEventForwarder
);
337 ModifyListenerHelper::removeListenerFromAllElements( m_aSubGridProperties
, m_xModifyEventForwarder
);
338 ModifyListenerHelper::removeListener( m_xTitle
, m_xModifyEventForwarder
);
339 if( m_aScaleData
.Categories
.is())
341 ModifyListenerHelper::removeListener( m_aScaleData
.Categories
, m_xModifyEventForwarder
);
342 m_aScaleData
.Categories
.clear();
345 catch( const uno::Exception
& )
347 DBG_UNHANDLED_EXCEPTION("chart2");
350 m_aSubGridProperties
.clear();
355 void Axis::AllocateSubGrids()
357 Reference
< util::XModifyListener
> xModifyEventForwarder
;
358 Reference
< lang::XEventListener
> xEventListener
;
359 std::vector
< rtl::Reference
< GridProperties
> > aOldBroadcasters
;
360 std::vector
< rtl::Reference
< GridProperties
> > aNewBroadcasters
;
362 MutexGuard
aGuard( m_aMutex
);
363 xModifyEventForwarder
= m_xModifyEventForwarder
;
364 xEventListener
= this;
366 sal_Int32 nNewSubIncCount
= m_aScaleData
.IncrementData
.SubIncrements
.getLength();
367 sal_Int32 nOldSubIncCount
= m_aSubGridProperties
.size();
369 if( nOldSubIncCount
> nNewSubIncCount
)
371 // remove superfluous entries
372 for( sal_Int32 i
= nNewSubIncCount
; i
< nOldSubIncCount
; ++i
)
373 aOldBroadcasters
.push_back( m_aSubGridProperties
[ i
] );
374 m_aSubGridProperties
.resize( nNewSubIncCount
);
376 else if( nOldSubIncCount
< nNewSubIncCount
)
378 m_aSubGridProperties
.resize( nNewSubIncCount
);
380 // allocate new entries
381 for( sal_Int32 i
= nOldSubIncCount
; i
< nNewSubIncCount
; ++i
)
383 m_aSubGridProperties
[ i
] = new GridProperties();
384 LinePropertiesHelper::SetLineInvisible( m_aSubGridProperties
[ i
] );
385 LinePropertiesHelper::SetLineColor( m_aSubGridProperties
[ i
], static_cast<sal_Int32
>(0xdddddd) ); //gray2
386 aNewBroadcasters
.push_back( m_aSubGridProperties
[ i
] );
390 //don't keep the mutex locked while calling out
391 for (auto const& oldBroadcaster
: aOldBroadcasters
)
392 ModifyListenerHelper::removeListener(oldBroadcaster
, xModifyEventForwarder
);
393 for (auto const& newBroadcaster
: aNewBroadcasters
)
394 ModifyListenerHelper::addListener( newBroadcaster
, xModifyEventForwarder
);
398 void SAL_CALL
Axis::setScaleData( const chart2::ScaleData
& rScaleData
)
400 Reference
< util::XModifyListener
> xModifyEventForwarder
;
401 Reference
< lang::XEventListener
> xEventListener
;
402 Reference
< chart2::data::XLabeledDataSequence
> xOldCategories
;
403 Reference
< chart2::data::XLabeledDataSequence
> xNewCategories
= rScaleData
.Categories
;
405 MutexGuard
aGuard( m_aMutex
);
406 xModifyEventForwarder
= m_xModifyEventForwarder
;
407 xEventListener
= this;
408 xOldCategories
= m_aScaleData
.Categories
;
409 m_aScaleData
= rScaleData
;
413 //don't keep the mutex locked while calling out
414 if( xOldCategories
.is() && xOldCategories
!= xNewCategories
)
416 ModifyListenerHelper::removeListener( xOldCategories
, xModifyEventForwarder
);
417 EventListenerHelper::removeListener( xOldCategories
, xEventListener
);
419 if( xNewCategories
.is() && xOldCategories
!= xNewCategories
)
421 ModifyListenerHelper::addListener( xNewCategories
, m_xModifyEventForwarder
);
422 EventListenerHelper::addListener( xNewCategories
, xEventListener
);
427 chart2::ScaleData SAL_CALL
Axis::getScaleData()
429 MutexGuard
aGuard( m_aMutex
);
433 Reference
< beans::XPropertySet
> SAL_CALL
Axis::getGridProperties()
435 MutexGuard
aGuard( m_aMutex
);
438 rtl::Reference
< ::chart::GridProperties
> Axis::getGridProperties2()
440 MutexGuard
aGuard( m_aMutex
);
443 Sequence
< Reference
< beans::XPropertySet
> > SAL_CALL
Axis::getSubGridProperties()
445 MutexGuard
aGuard( m_aMutex
);
446 return comphelper::containerToSequence
<Reference
< beans::XPropertySet
>>(m_aSubGridProperties
);
449 std::vector
< rtl::Reference
< GridProperties
> > Axis::getSubGridProperties2()
451 MutexGuard
aGuard( m_aMutex
);
452 return m_aSubGridProperties
;
455 Sequence
< Reference
< beans::XPropertySet
> > SAL_CALL
Axis::getSubTickProperties()
457 OSL_FAIL( "Not implemented yet" );
458 return Sequence
< Reference
< beans::XPropertySet
> >();
462 Reference
< chart2::XTitle
> SAL_CALL
Axis::getTitleObject()
464 MutexGuard
aGuard( m_aMutex
);
468 rtl::Reference
< Title
> Axis::getTitleObject2() const
470 MutexGuard
aGuard( m_aMutex
);
474 void SAL_CALL
Axis::setTitleObject( const Reference
< chart2::XTitle
>& xNewTitle
)
476 rtl::Reference
<Title
> xTitle
= dynamic_cast<Title
*>(xNewTitle
.get());
477 assert(!xNewTitle
|| xTitle
);
478 setTitleObject(xTitle
);
481 void Axis::setTitleObject( const rtl::Reference
< Title
>& xNewTitle
)
483 Reference
< util::XModifyListener
> xModifyEventForwarder
;
484 rtl::Reference
< Title
> xOldTitle
;
486 MutexGuard
aGuard( m_aMutex
);
487 xOldTitle
= m_xTitle
;
488 xModifyEventForwarder
= m_xModifyEventForwarder
;
489 m_xTitle
= xNewTitle
;
492 //don't keep the mutex locked while calling out
493 if( xOldTitle
.is() && xOldTitle
!= xNewTitle
)
494 ModifyListenerHelper::removeListener( xOldTitle
, xModifyEventForwarder
);
495 if( xNewTitle
.is() && xOldTitle
!= xNewTitle
)
496 ModifyListenerHelper::addListener( xNewTitle
, xModifyEventForwarder
);
500 // ____ XCloneable ____
501 Reference
< util::XCloneable
> SAL_CALL
Axis::createClone()
503 rtl::Reference
<Axis
> pNewAxis( new Axis( *this ));
504 // do initialization that uses uno references to the clone
509 // ____ XModifyBroadcaster ____
510 void SAL_CALL
Axis::addModifyListener( const Reference
< util::XModifyListener
>& aListener
)
512 m_xModifyEventForwarder
->addModifyListener( aListener
);
515 void SAL_CALL
Axis::removeModifyListener( const Reference
< util::XModifyListener
>& aListener
)
517 m_xModifyEventForwarder
->removeModifyListener( aListener
);
520 // ____ XModifyListener ____
521 void SAL_CALL
Axis::modified( const lang::EventObject
& aEvent
)
523 m_xModifyEventForwarder
->modified( aEvent
);
526 // ____ XEventListener (base of XModifyListener) ____
527 void SAL_CALL
Axis::disposing( const lang::EventObject
& Source
)
529 if( Source
.Source
== m_aScaleData
.Categories
)
530 m_aScaleData
.Categories
= nullptr;
533 // ____ OPropertySet ____
534 void Axis::firePropertyChangeEvent()
539 void Axis::fireModifyEvent()
541 m_xModifyEventForwarder
->modified( lang::EventObject( static_cast< uno::XWeak
* >( this )));
544 // ____ OPropertySet ____
545 void Axis::GetDefaultValue( sal_Int32 nHandle
, uno::Any
& rAny
) const
547 const tPropertyValueMap
& rStaticDefaults
= StaticAxisDefaults();
548 tPropertyValueMap::const_iterator
aFound( rStaticDefaults
.find( nHandle
) );
549 if( aFound
== rStaticDefaults
.end() )
552 rAny
= (*aFound
).second
;
555 ::cppu::IPropertyArrayHelper
& SAL_CALL
Axis::getInfoHelper()
557 return StaticAxisInfoHelper();
560 // ____ XPropertySet ____
561 Reference
< beans::XPropertySetInfo
> SAL_CALL
Axis::getPropertySetInfo()
563 static uno::Reference
< beans::XPropertySetInfo
> xPropertySetInfo(
564 ::cppu::OPropertySetHelper::createPropertySetInfo(StaticAxisInfoHelper() ) );
565 return xPropertySetInfo
;
568 using impl::Axis_Base
;
570 IMPLEMENT_FORWARD_XINTERFACE2( Axis
, Axis_Base
, ::property::OPropertySet
)
571 IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis
, Axis_Base
, ::property::OPropertySet
)
573 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
574 OUString SAL_CALL
Axis::getImplementationName()
576 return u
"com.sun.star.comp.chart2.Axis"_ustr
;
579 sal_Bool SAL_CALL
Axis::supportsService( const OUString
& rServiceName
)
581 return cppu::supportsService(this, rServiceName
);
584 css::uno::Sequence
< OUString
> SAL_CALL
Axis::getSupportedServiceNames()
587 u
"com.sun.star.chart2.Axis"_ustr
,
588 u
"com.sun.star.beans.PropertySet"_ustr
};
593 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
594 com_sun_star_comp_chart2_Axis_get_implementation(css::uno::XComponentContext
*,
595 css::uno::Sequence
<css::uno::Any
> const &)
597 return cppu::acquire(new ::chart::Axis
);
600 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */