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 .
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
;
34 constexpr OUString CHART2_COOSYSTEM_POLAR_SERVICE_NAME
35 = u
"com.sun.star.chart2.CoordinateSystems.Polar"_ustr
;
43 PolarCoordinateSystem::PolarCoordinateSystem( sal_Int32 nDimensionCount
/* = 2 */ ) :
44 BaseCoordinateSystem( nDimensionCount
)
47 PolarCoordinateSystem::PolarCoordinateSystem(
48 const PolarCoordinateSystem
& rSource
) :
49 BaseCoordinateSystem( rSource
)
52 PolarCoordinateSystem::~PolarCoordinateSystem()
55 // ____ XCoordinateSystem ____
56 OUString SAL_CALL
PolarCoordinateSystem::getCoordinateSystemType()
58 return CHART2_COOSYSTEM_POLAR_SERVICE_NAME
;
61 OUString SAL_CALL
PolarCoordinateSystem::getViewServiceName()
63 return CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME
;
66 // ____ XCloneable ____
67 uno::Reference
< util::XCloneable
> SAL_CALL
PolarCoordinateSystem::createClone()
69 return Reference
< util::XCloneable
>( new PolarCoordinateSystem( *this ));
72 // ____ XServiceInfo ____
73 OUString SAL_CALL
PolarCoordinateSystem::getImplementationName()
75 return u
"com.sun.star.comp.chart.PolarCoordinateSystem"_ustr
;
78 sal_Bool SAL_CALL
PolarCoordinateSystem::supportsService( const OUString
& rServiceName
)
80 return cppu::supportsService(this, rServiceName
);
83 css::uno::Sequence
< OUString
> SAL_CALL
PolarCoordinateSystem::getSupportedServiceNames()
85 return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME
};
88 // ==== PolarCoordinateSystem2d ====
90 PolarCoordinateSystem2d::PolarCoordinateSystem2d() :
91 PolarCoordinateSystem( 2 )
94 PolarCoordinateSystem2d::~PolarCoordinateSystem2d()
97 // ____ XServiceInfo ____
98 OUString SAL_CALL
PolarCoordinateSystem2d::getImplementationName()
100 return u
"com.sun.star.comp.chart2.PolarCoordinateSystem2d"_ustr
;
103 sal_Bool SAL_CALL
PolarCoordinateSystem2d::supportsService( const OUString
& rServiceName
)
105 return cppu::supportsService(this, rServiceName
);
108 css::uno::Sequence
< OUString
> SAL_CALL
PolarCoordinateSystem2d::getSupportedServiceNames()
111 CHART2_COOSYSTEM_POLAR_SERVICE_NAME
,
112 u
"com.sun.star.chart2.PolarCoordinateSystem2d"_ustr
};
115 // ==== PolarCoordinateSystem3d ====
117 PolarCoordinateSystem3d::PolarCoordinateSystem3d() :
118 PolarCoordinateSystem( 3 )
121 PolarCoordinateSystem3d::~PolarCoordinateSystem3d()
124 // ____ XServiceInfo ____
125 OUString SAL_CALL
PolarCoordinateSystem3d::getImplementationName()
127 return u
"com.sun.star.comp.chart2.PolarCoordinateSystem3d"_ustr
;
130 sal_Bool SAL_CALL
PolarCoordinateSystem3d::supportsService( const OUString
& rServiceName
)
132 return cppu::supportsService(this, rServiceName
);
135 css::uno::Sequence
< OUString
> SAL_CALL
PolarCoordinateSystem3d::getSupportedServiceNames()
138 CHART2_COOSYSTEM_POLAR_SERVICE_NAME
,
139 u
"com.sun.star.chart2.PolarCoordinateSystem3d"_ustr
};
144 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
145 com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation(css::uno::XComponentContext
*,
146 css::uno::Sequence
<css::uno::Any
> const &)
148 return cppu::acquire(new ::chart::PolarCoordinateSystem2d
);
151 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
152 com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation(css::uno::XComponentContext
*,
153 css::uno::Sequence
<css::uno::Any
> const &)
155 return cppu::acquire(new ::chart::PolarCoordinateSystem3d
);
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */