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 <CartesianCoordinateSystem.hxx>
21 #include <servicenames_coosystems.hxx>
22 #include <cppuhelper/supportsservice.hxx>
24 using namespace ::com::sun::star
;
26 using ::com::sun::star::uno::Reference
;
27 using ::com::sun::star::uno::Sequence
;
29 namespace com::sun::star::uno
{ class XComponentContext
; }
34 constexpr OUString CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME
= u
"com.sun.star.chart2.CoordinateSystems.Cartesian"_ustr
;
42 CartesianCoordinateSystem::CartesianCoordinateSystem(
43 sal_Int32 nDimensionCount
/* = 2 */ ) :
44 BaseCoordinateSystem( nDimensionCount
)
47 CartesianCoordinateSystem::CartesianCoordinateSystem(
48 const CartesianCoordinateSystem
& rSource
) :
49 BaseCoordinateSystem( rSource
)
52 CartesianCoordinateSystem::~CartesianCoordinateSystem()
55 // ____ XCoordinateSystem ____
56 OUString SAL_CALL
CartesianCoordinateSystem::getCoordinateSystemType()
58 return CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME
;
61 OUString SAL_CALL
CartesianCoordinateSystem::getViewServiceName()
63 return CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME
;
66 // ____ XCloneable ____
67 uno::Reference
< util::XCloneable
> SAL_CALL
CartesianCoordinateSystem::createClone()
69 return Reference
< util::XCloneable
>( new CartesianCoordinateSystem( *this ));
72 // ____ XServiceInfo ____
73 OUString SAL_CALL
CartesianCoordinateSystem::getImplementationName()
75 return u
"com.sun.star.comp.chart.CartesianCoordinateSystem"_ustr
;
78 sal_Bool SAL_CALL
CartesianCoordinateSystem::supportsService( const OUString
& rServiceName
)
80 return cppu::supportsService(this, rServiceName
);
83 css::uno::Sequence
< OUString
> SAL_CALL
CartesianCoordinateSystem::getSupportedServiceNames()
85 return { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME
};
88 // ==== CartesianCoordinateSystem2d ====
90 CartesianCoordinateSystem2d::CartesianCoordinateSystem2d() :
91 CartesianCoordinateSystem( 2 )
94 CartesianCoordinateSystem2d::~CartesianCoordinateSystem2d()
97 // ____ XServiceInfo ____
98 OUString SAL_CALL
CartesianCoordinateSystem2d::getImplementationName()
100 return u
"com.sun.star.comp.chart2.CartesianCoordinateSystem2d"_ustr
;
103 sal_Bool SAL_CALL
CartesianCoordinateSystem2d::supportsService( const OUString
& rServiceName
)
105 return cppu::supportsService(this, rServiceName
);
108 css::uno::Sequence
< OUString
> SAL_CALL
CartesianCoordinateSystem2d::getSupportedServiceNames()
111 CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME
,
112 u
"com.sun.star.chart2.CartesianCoordinateSystem2d"_ustr
116 // ==== CartesianCoordinateSystem3d ====
118 CartesianCoordinateSystem3d::CartesianCoordinateSystem3d() :
119 CartesianCoordinateSystem( 3 )
122 CartesianCoordinateSystem3d::~CartesianCoordinateSystem3d()
125 // ____ XServiceInfo ____
126 OUString SAL_CALL
CartesianCoordinateSystem3d::getImplementationName()
128 return u
"com.sun.star.comp.chart2.CartesianCoordinateSystem3d"_ustr
;
131 sal_Bool SAL_CALL
CartesianCoordinateSystem3d::supportsService( const OUString
& rServiceName
)
133 return cppu::supportsService(this, rServiceName
);
136 css::uno::Sequence
< OUString
> SAL_CALL
CartesianCoordinateSystem3d::getSupportedServiceNames()
139 CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME
,
140 u
"com.sun.star.chart2.CartesianCoordinateSystem3d"_ustr
146 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
147 com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation(css::uno::XComponentContext
*,
148 css::uno::Sequence
<css::uno::Any
> const &)
150 return cppu::acquire(new ::chart::CartesianCoordinateSystem2d
);
153 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
154 com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation(css::uno::XComponentContext
*,
155 css::uno::Sequence
<css::uno::Any
> const &)
157 return cppu::acquire(new ::chart::CartesianCoordinateSystem3d
);
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */