LibreOffice Module chart2 (master) 1
CartesianCoordinateSystem.cxx
Go to the documentation of this file.
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
23
24using namespace ::com::sun::star;
25
26using ::com::sun::star::uno::Reference;
27using ::com::sun::star::uno::Sequence;
28
29namespace com::sun::star::uno { class XComponentContext; }
30
31namespace
32{
33
34constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
35
36}
37
38namespace chart
39{
40
41// explicit
43 sal_Int32 nDimensionCount /* = 2 */ ) :
44 BaseCoordinateSystem( nDimensionCount )
45{}
46
48 const CartesianCoordinateSystem & rSource ) :
49 BaseCoordinateSystem( rSource )
50{}
51
53{}
54
55// ____ XCoordinateSystem ____
57{
58 return CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME;
59}
60
62{
64}
65
66// ____ XCloneable ____
68{
70}
71
72// ____ XServiceInfo ____
74{
75 return "com.sun.star.comp.chart.CartesianCoordinateSystem";
76}
77
78sal_Bool SAL_CALL CartesianCoordinateSystem::supportsService( const OUString& rServiceName )
79{
80 return cppu::supportsService(this, rServiceName);
81}
82
83css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem::getSupportedServiceNames()
84{
85 return { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME };
86}
87
88// ==== CartesianCoordinateSystem2d ====
89
92{}
93
95{}
96
97// ____ XServiceInfo ____
99{
100 return "com.sun.star.comp.chart2.CartesianCoordinateSystem2d";
101}
102
103sal_Bool SAL_CALL CartesianCoordinateSystem2d::supportsService( const OUString& rServiceName )
104{
105 return cppu::supportsService(this, rServiceName);
106}
107
108css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem2d::getSupportedServiceNames()
109{
110 return {
111 CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME,
112 "com.sun.star.chart2.CartesianCoordinateSystem2d"
113 };
114}
115
116// ==== CartesianCoordinateSystem3d ====
117
120{}
121
123{}
124
125// ____ XServiceInfo ____
127{
128 return "com.sun.star.comp.chart2.CartesianCoordinateSystem3d";
129}
130
131sal_Bool SAL_CALL CartesianCoordinateSystem3d::supportsService( const OUString& rServiceName )
132{
133 return cppu::supportsService(this, rServiceName);
134}
135
136css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem3d::getSupportedServiceNames()
137{
138 return {
139 CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME,
140 "com.sun.star.chart2.CartesianCoordinateSystem3d"
141 };
142}
143
144} // namespace chart
145
146extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
148 css::uno::Sequence<css::uno::Any> const &)
149{
150 return cppu::acquire(new ::chart::CartesianCoordinateSystem2d);
151}
152
153extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
155 css::uno::Sequence<css::uno::Any> const &)
156{
157 return cppu::acquire(new ::chart::CartesianCoordinateSystem3d);
158}
159
160/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
CartesianCoordinateSystem(sal_Int32 nDimensionCount)
virtual OUString SAL_CALL getCoordinateSystemType() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual OUString SAL_CALL getViewServiceName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
float u
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME
unsigned char sal_Bool