/src/libreoffice/chart2/source/model/main/PolarCoordinateSystem.cxx
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #include <PolarCoordinateSystem.hxx> |
21 | | #include <servicenames_coosystems.hxx> |
22 | | #include <cppuhelper/supportsservice.hxx> |
23 | | |
24 | | namespace com::sun::star::uno { class XComponentContext; } |
25 | | |
26 | | using namespace ::com::sun::star; |
27 | | |
28 | | using ::com::sun::star::uno::Reference; |
29 | | using ::com::sun::star::uno::Sequence; |
30 | | |
31 | | namespace |
32 | | { |
33 | | |
34 | | constexpr OUString CHART2_COOSYSTEM_POLAR_SERVICE_NAME |
35 | | = u"com.sun.star.chart2.CoordinateSystems.Polar"_ustr; |
36 | | |
37 | | } |
38 | | |
39 | | namespace chart |
40 | | { |
41 | | |
42 | | // explicit |
43 | | PolarCoordinateSystem::PolarCoordinateSystem( sal_Int32 nDimensionCount /* = 2 */ ) : |
44 | 0 | BaseCoordinateSystem( nDimensionCount ) |
45 | 0 | {} |
46 | | |
47 | | PolarCoordinateSystem::PolarCoordinateSystem( |
48 | | const PolarCoordinateSystem & rSource ) : |
49 | 0 | BaseCoordinateSystem( rSource ) |
50 | 0 | {} |
51 | | |
52 | | PolarCoordinateSystem::~PolarCoordinateSystem() |
53 | 0 | {} |
54 | | |
55 | | // ____ XCoordinateSystem ____ |
56 | | OUString SAL_CALL PolarCoordinateSystem::getCoordinateSystemType() |
57 | 0 | { |
58 | 0 | return CHART2_COOSYSTEM_POLAR_SERVICE_NAME; |
59 | 0 | } |
60 | | |
61 | | OUString SAL_CALL PolarCoordinateSystem::getViewServiceName() |
62 | 0 | { |
63 | 0 | return CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME; |
64 | 0 | } |
65 | | |
66 | | // ____ XCloneable ____ |
67 | | uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone() |
68 | 0 | { |
69 | 0 | return Reference< util::XCloneable >( new PolarCoordinateSystem( *this )); |
70 | 0 | } |
71 | | |
72 | | // ____ XServiceInfo ____ |
73 | | OUString SAL_CALL PolarCoordinateSystem::getImplementationName() |
74 | 0 | { |
75 | 0 | return u"com.sun.star.comp.chart.PolarCoordinateSystem"_ustr; |
76 | 0 | } |
77 | | |
78 | | sal_Bool SAL_CALL PolarCoordinateSystem::supportsService( const OUString& rServiceName ) |
79 | 0 | { |
80 | 0 | return cppu::supportsService(this, rServiceName); |
81 | 0 | } |
82 | | |
83 | | css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem::getSupportedServiceNames() |
84 | 0 | { |
85 | 0 | return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME }; |
86 | 0 | } |
87 | | |
88 | | // ==== PolarCoordinateSystem2d ==== |
89 | | |
90 | | PolarCoordinateSystem2d::PolarCoordinateSystem2d() : |
91 | 0 | PolarCoordinateSystem( 2 ) |
92 | 0 | {} |
93 | | |
94 | | PolarCoordinateSystem2d::~PolarCoordinateSystem2d() |
95 | | {} |
96 | | |
97 | | // ____ XServiceInfo ____ |
98 | | OUString SAL_CALL PolarCoordinateSystem2d::getImplementationName() |
99 | 0 | { |
100 | 0 | return u"com.sun.star.comp.chart2.PolarCoordinateSystem2d"_ustr ; |
101 | 0 | } |
102 | | |
103 | | sal_Bool SAL_CALL PolarCoordinateSystem2d::supportsService( const OUString& rServiceName ) |
104 | 0 | { |
105 | 0 | return cppu::supportsService(this, rServiceName); |
106 | 0 | } |
107 | | |
108 | | css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem2d::getSupportedServiceNames() |
109 | 0 | { |
110 | 0 | return { |
111 | 0 | CHART2_COOSYSTEM_POLAR_SERVICE_NAME, |
112 | 0 | u"com.sun.star.chart2.PolarCoordinateSystem2d"_ustr }; |
113 | 0 | } |
114 | | |
115 | | // ==== PolarCoordinateSystem3d ==== |
116 | | |
117 | | PolarCoordinateSystem3d::PolarCoordinateSystem3d() : |
118 | 0 | PolarCoordinateSystem( 3 ) |
119 | 0 | {} |
120 | | |
121 | | PolarCoordinateSystem3d::~PolarCoordinateSystem3d() |
122 | | {} |
123 | | |
124 | | // ____ XServiceInfo ____ |
125 | | OUString SAL_CALL PolarCoordinateSystem3d::getImplementationName() |
126 | 0 | { |
127 | 0 | return u"com.sun.star.comp.chart2.PolarCoordinateSystem3d"_ustr; |
128 | 0 | } |
129 | | |
130 | | sal_Bool SAL_CALL PolarCoordinateSystem3d::supportsService( const OUString& rServiceName ) |
131 | 0 | { |
132 | 0 | return cppu::supportsService(this, rServiceName); |
133 | 0 | } |
134 | | |
135 | | css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem3d::getSupportedServiceNames() |
136 | 0 | { |
137 | 0 | return { |
138 | 0 | CHART2_COOSYSTEM_POLAR_SERVICE_NAME, |
139 | 0 | u"com.sun.star.chart2.PolarCoordinateSystem3d"_ustr }; |
140 | 0 | } |
141 | | |
142 | | } // namespace chart |
143 | | |
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 &) |
147 | 0 | { |
148 | 0 | return cppu::acquire(new ::chart::PolarCoordinateSystem2d); |
149 | 0 | } |
150 | | |
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 &) |
154 | 0 | { |
155 | 0 | return cppu::acquire(new ::chart::PolarCoordinateSystem3d); |
156 | 0 | } |
157 | | |
158 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |