summaryrefslogtreecommitdiffstats
path: root/chart2/source/model/template/NetChartType.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model/template/NetChartType.cxx')
-rw-r--r--chart2/source/model/template/NetChartType.cxx50
1 files changed, 21 insertions, 29 deletions
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index 8aecbec7b60c..cb4512c74884 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -22,6 +22,7 @@
#include <servicenames_charttypes.hxx>
#include <AxisIndexDefines.hxx>
#include <AxisHelper.hxx>
+#include <Axis.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -47,8 +48,8 @@ NetChartType_Base::NetChartType_Base( const NetChartType_Base & rOther ) :
NetChartType_Base::~NetChartType_Base()
{}
-Reference< XCoordinateSystem > SAL_CALL
- NetChartType_Base::createCoordinateSystem( ::sal_Int32 DimensionCount )
+rtl::Reference< ::chart::BaseCoordinateSystem >
+ NetChartType_Base::createCoordinateSystem2( sal_Int32 DimensionCount )
{
if( DimensionCount != 2 )
throw lang::IllegalArgumentException(
@@ -58,7 +59,7 @@ Reference< XCoordinateSystem > SAL_CALL
rtl::Reference< PolarCoordinateSystem > xResult =
new PolarCoordinateSystem( DimensionCount );
- Reference< XAxis > xAxis( xResult->getAxisByDimension( 0, MAIN_AXIS_INDEX ) );
+ rtl::Reference< Axis > xAxis = xResult->getAxisByDimension2( 0, MAIN_AXIS_INDEX );
if( xAxis.is() )
{
ScaleData aScaleData = xAxis->getScaleData();
@@ -68,7 +69,7 @@ Reference< XCoordinateSystem > SAL_CALL
xAxis->setScaleData( aScaleData );
}
- xAxis = xResult->getAxisByDimension( 1, MAIN_AXIS_INDEX );
+ xAxis = xResult->getAxisByDimension2( 1, MAIN_AXIS_INDEX );
if( xAxis.is() )
{
ScaleData aScaleData = xAxis->getScaleData();
@@ -89,45 +90,31 @@ void NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/, uno::Any& rAny )
namespace
{
-struct StaticNetChartTypeInfoHelper_Initializer
+::cppu::OPropertyArrayHelper& StaticNetChartTypeInfoHelper()
{
- ::cppu::OPropertyArrayHelper* operator()()
- {
- static ::cppu::OPropertyArrayHelper aPropHelper(Sequence< beans::Property >{});
- return &aPropHelper;
- }
-};
-
-struct StaticNetChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticNetChartTypeInfoHelper_Initializer >
-{
-};
-
-struct StaticNetChartTypeInfo_Initializer
-{
- uno::Reference< beans::XPropertySetInfo >* operator()()
- {
- static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
- ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticNetChartTypeInfoHelper::get() ) );
- return &xPropertySetInfo;
- }
-};
+ static ::cppu::OPropertyArrayHelper aPropHelper(Sequence< beans::Property >{});
+ return aPropHelper;
+}
-struct StaticNetChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticNetChartTypeInfo_Initializer >
+uno::Reference< beans::XPropertySetInfo >& StaticNetChartTypeInfo()
{
-};
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(StaticNetChartTypeInfoHelper() ) );
+ return xPropertySetInfo;
+}
}
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL NetChartType_Base::getInfoHelper()
{
- return *StaticNetChartTypeInfoHelper::get();
+ return StaticNetChartTypeInfoHelper();
}
// ____ XPropertySet ____
uno::Reference< beans::XPropertySetInfo > SAL_CALL NetChartType_Base::getPropertySetInfo()
{
- return *StaticNetChartTypeInfo::get();
+ return StaticNetChartTypeInfo();
}
NetChartType::NetChartType()
@@ -147,6 +134,11 @@ uno::Reference< util::XCloneable > SAL_CALL NetChartType::createClone()
return uno::Reference< util::XCloneable >( new NetChartType( *this ));
}
+rtl::Reference< ChartType > NetChartType::cloneChartType() const
+{
+ return new NetChartType( *this );
+}
+
// ____ XChartType ____
OUString SAL_CALL NetChartType::getChartType()
{