nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / model / main / PolarCoordinateSystem.cxx
blob5ec3252ae5820ccde8914c65b7692a295f67d505
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 <servicenames_coosystems.hxx>
22 #include <cppuhelper/supportsservice.hxx>
24 namespace com::sun::star::uno { class XComponentContext; }
26 using namespace ::com::sun::star;
28 using ::com::sun::star::uno::Reference;
29 using ::com::sun::star::uno::Sequence;
31 namespace
34 const char CHART2_COOSYSTEM_POLAR_SERVICE_NAME[] = "com.sun.star.chart2.CoordinateSystems.Polar";
38 namespace chart
41 // explicit
42 PolarCoordinateSystem::PolarCoordinateSystem( sal_Int32 nDimensionCount /* = 2 */ ) :
43 BaseCoordinateSystem( nDimensionCount )
46 PolarCoordinateSystem::PolarCoordinateSystem(
47 const PolarCoordinateSystem & rSource ) :
48 BaseCoordinateSystem( rSource )
51 PolarCoordinateSystem::~PolarCoordinateSystem()
54 // ____ XCoordinateSystem ____
55 OUString SAL_CALL PolarCoordinateSystem::getCoordinateSystemType()
57 return CHART2_COOSYSTEM_POLAR_SERVICE_NAME;
60 OUString SAL_CALL PolarCoordinateSystem::getViewServiceName()
62 return CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME;
65 // ____ XCloneable ____
66 uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone()
68 return Reference< util::XCloneable >( new PolarCoordinateSystem( *this ));
71 // ____ XServiceInfo ____
72 OUString SAL_CALL PolarCoordinateSystem::getImplementationName()
74 return "com.sun.star.comp.chart.PolarCoordinateSystem";
77 sal_Bool SAL_CALL PolarCoordinateSystem::supportsService( const OUString& rServiceName )
79 return cppu::supportsService(this, rServiceName);
82 css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem::getSupportedServiceNames()
84 return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME };
87 // ==== PolarCoordinateSystem2d ====
89 PolarCoordinateSystem2d::PolarCoordinateSystem2d() :
90 PolarCoordinateSystem( 2 )
93 PolarCoordinateSystem2d::~PolarCoordinateSystem2d()
96 // ____ XServiceInfo ____
97 OUString SAL_CALL PolarCoordinateSystem2d::getImplementationName()
99 return "com.sun.star.comp.chart2.PolarCoordinateSystem2d" ;
102 sal_Bool SAL_CALL PolarCoordinateSystem2d::supportsService( const OUString& rServiceName )
104 return cppu::supportsService(this, rServiceName);
107 css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem2d::getSupportedServiceNames()
109 return {
110 CHART2_COOSYSTEM_POLAR_SERVICE_NAME,
111 "com.sun.star.chart2.PolarCoordinateSystem2d" };
114 // ==== PolarCoordinateSystem3d ====
116 PolarCoordinateSystem3d::PolarCoordinateSystem3d() :
117 PolarCoordinateSystem( 3 )
120 PolarCoordinateSystem3d::~PolarCoordinateSystem3d()
123 // ____ XServiceInfo ____
124 OUString SAL_CALL PolarCoordinateSystem3d::getImplementationName()
126 return "com.sun.star.comp.chart2.PolarCoordinateSystem3d";
129 sal_Bool SAL_CALL PolarCoordinateSystem3d::supportsService( const OUString& rServiceName )
131 return cppu::supportsService(this, rServiceName);
134 css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem3d::getSupportedServiceNames()
136 return {
137 CHART2_COOSYSTEM_POLAR_SERVICE_NAME,
138 "com.sun.star.chart2.PolarCoordinateSystem3d" };
141 } // namespace chart
143 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
144 com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation(css::uno::XComponentContext *,
145 css::uno::Sequence<css::uno::Any> const &)
147 return cppu::acquire(new ::chart::PolarCoordinateSystem2d);
150 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
151 com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation(css::uno::XComponentContext *,
152 css::uno::Sequence<css::uno::Any> const &)
154 return cppu::acquire(new ::chart::PolarCoordinateSystem3d);
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */