bump product version to 4.1.6.2
[LibreOffice.git] / chart2 / source / model / main / PolarCoordinateSystem.cxx
blobf50c7b31cd7f61f28c6527b9a00d367cfb2e33b1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include "PolarCoordinateSystem.hxx"
21 #include "macros.hxx"
22 #include "servicenames_coosystems.hxx"
24 using namespace ::com::sun::star;
26 using ::com::sun::star::uno::RuntimeException;
27 using ::com::sun::star::uno::Reference;
28 using ::com::sun::star::uno::Sequence;
30 namespace
33 static const OUString lcl_aServiceNamePolar2d( "com.sun.star.chart2.PolarCoordinateSystem2d" );
34 static const OUString lcl_aServiceNamePolar3d( "com.sun.star.chart2.PolarCoordinateSystem3d" );
36 static const OUString lcl_aImplementationNamePolar2d( "com.sun.star.comp.chart2.PolarCoordinateSystem2d" );
37 static const OUString lcl_aImplementationNamePolar3d( "com.sun.star.comp.chart2.PolarCoordinateSystem3d" );
40 namespace chart
43 // explicit
44 PolarCoordinateSystem::PolarCoordinateSystem(
45 const uno::Reference< uno::XComponentContext > & xContext,
46 sal_Int32 nDimensionCount /* = 2 */,
47 sal_Bool bSwapXAndYAxis /* = sal_False */ ) :
48 BaseCoordinateSystem( xContext, nDimensionCount, bSwapXAndYAxis )
51 PolarCoordinateSystem::PolarCoordinateSystem(
52 const PolarCoordinateSystem & rSource ) :
53 BaseCoordinateSystem( rSource )
56 PolarCoordinateSystem::~PolarCoordinateSystem()
59 // ____ XCoordinateSystem ____
60 OUString SAL_CALL PolarCoordinateSystem::getCoordinateSystemType()
61 throw (RuntimeException)
63 return CHART2_COOSYSTEM_POLAR_SERVICE_NAME;
66 OUString SAL_CALL PolarCoordinateSystem::getViewServiceName()
67 throw (RuntimeException)
69 return CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME;
72 // ____ XCloneable ____
73 uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone()
74 throw (RuntimeException)
76 return Reference< util::XCloneable >( new PolarCoordinateSystem( *this ));
79 // ____ XServiceInfo ____
80 Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static()
82 Sequence< OUString > aServices( 1 );
83 aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME;
84 return aServices;
87 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
88 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem,
89 OUString("com.sun.star.comp.chart.PolarCoordinateSystem") )
92 // =================================
93 // ==== PolarCoordinateSystem2d ====
94 // =================================
96 PolarCoordinateSystem2d::PolarCoordinateSystem2d(
97 const uno::Reference< uno::XComponentContext > & xContext ) :
98 PolarCoordinateSystem( xContext, 2, sal_False )
101 PolarCoordinateSystem2d::~PolarCoordinateSystem2d()
104 // ____ XServiceInfo ____
105 Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static()
107 Sequence< OUString > aServices( 2 );
108 aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME;
109 aServices[ 1 ] = lcl_aServiceNamePolar2d;
110 return aServices;
113 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
114 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, lcl_aImplementationNamePolar2d )
116 // =================================
117 // ==== PolarCoordinateSystem3d ====
118 // =================================
120 PolarCoordinateSystem3d::PolarCoordinateSystem3d(
121 const uno::Reference< uno::XComponentContext > & xContext ) :
122 PolarCoordinateSystem( xContext, 3, sal_False )
125 PolarCoordinateSystem3d::~PolarCoordinateSystem3d()
128 // ____ XServiceInfo ____
129 Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static()
131 Sequence< OUString > aServices( 2 );
132 aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME;
133 aServices[ 1 ] = lcl_aServiceNamePolar3d;
134 return aServices;
137 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
138 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, lcl_aImplementationNamePolar3d )
140 } // namespace chart
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */