1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_chart2.hxx"
30 #include "PolarCoordinateSystem.hxx"
32 #include "servicenames_coosystems.hxx"
34 using namespace ::com::sun::star
;
36 using ::com::sun::star::uno::RuntimeException
;
37 using ::com::sun::star::uno::Reference
;
38 using ::com::sun::star::uno::Sequence
;
39 using ::rtl::OUString
;
44 static const ::rtl::OUString
lcl_aServiceNamePolar2d(
45 RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PolarCoordinateSystem2d" ));
46 static const ::rtl::OUString
lcl_aServiceNamePolar3d(
47 RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PolarCoordinateSystem3d" ));
49 static const ::rtl::OUString
lcl_aImplementationNamePolar2d(
50 RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.PolarCoordinateSystem2d" ));
51 static const ::rtl::OUString
lcl_aImplementationNamePolar3d(
52 RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.PolarCoordinateSystem3d" ));
59 PolarCoordinateSystem::PolarCoordinateSystem(
60 const uno::Reference
< uno::XComponentContext
> & xContext
,
61 sal_Int32 nDimensionCount
/* = 2 */,
62 sal_Bool bSwapXAndYAxis
/* = sal_False */ ) :
63 BaseCoordinateSystem( xContext
, nDimensionCount
, bSwapXAndYAxis
)
66 PolarCoordinateSystem::PolarCoordinateSystem(
67 const PolarCoordinateSystem
& rSource
) :
68 BaseCoordinateSystem( rSource
)
71 PolarCoordinateSystem::~PolarCoordinateSystem()
74 // ____ XCoordinateSystem ____
75 ::rtl::OUString SAL_CALL
PolarCoordinateSystem::getCoordinateSystemType()
76 throw (RuntimeException
)
78 return CHART2_COOSYSTEM_POLAR_SERVICE_NAME
;
81 ::rtl::OUString SAL_CALL
PolarCoordinateSystem::getViewServiceName()
82 throw (RuntimeException
)
84 return CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME
;
87 // ____ XCloneable ____
88 uno::Reference
< util::XCloneable
> SAL_CALL
PolarCoordinateSystem::createClone()
89 throw (RuntimeException
)
91 return Reference
< util::XCloneable
>( new PolarCoordinateSystem( *this ));
94 // ____ XServiceInfo ____
95 Sequence
< OUString
> PolarCoordinateSystem::getSupportedServiceNames_Static()
97 Sequence
< OUString
> aServices( 1 );
98 aServices
[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME
;
102 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
103 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem
,
104 C2U( "com.sun.star.comp.chart.PolarCoordinateSystem" ))
107 // =================================
108 // ==== PolarCoordinateSystem2d ====
109 // =================================
111 PolarCoordinateSystem2d::PolarCoordinateSystem2d(
112 const uno::Reference
< uno::XComponentContext
> & xContext
) :
113 PolarCoordinateSystem( xContext
, 2, sal_False
)
116 PolarCoordinateSystem2d::~PolarCoordinateSystem2d()
119 // ____ XServiceInfo ____
120 Sequence
< OUString
> PolarCoordinateSystem2d::getSupportedServiceNames_Static()
122 Sequence
< OUString
> aServices( 2 );
123 aServices
[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME
;
124 aServices
[ 1 ] = lcl_aServiceNamePolar2d
;
128 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
129 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d
, lcl_aImplementationNamePolar2d
)
131 // =================================
132 // ==== PolarCoordinateSystem3d ====
133 // =================================
135 PolarCoordinateSystem3d::PolarCoordinateSystem3d(
136 const uno::Reference
< uno::XComponentContext
> & xContext
) :
137 PolarCoordinateSystem( xContext
, 3, sal_False
)
140 PolarCoordinateSystem3d::~PolarCoordinateSystem3d()
143 // ____ XServiceInfo ____
144 Sequence
< OUString
> PolarCoordinateSystem3d::getSupportedServiceNames_Static()
146 Sequence
< OUString
> aServices( 2 );
147 aServices
[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME
;
148 aServices
[ 1 ] = lcl_aServiceNamePolar3d
;
152 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
153 APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d
, lcl_aImplementationNamePolar3d
)