LCOV - code coverage report
Current view: top level - chart2/source/model/main - CartesianCoordinateSystem.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 36 46 78.3 %
Date: 2014-11-03 Functions: 17 30 56.7 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "CartesianCoordinateSystem.hxx"
      21             : #include "macros.hxx"
      22             : #include "servicenames_coosystems.hxx"
      23             : 
      24             : using namespace ::com::sun::star;
      25             : 
      26             : using ::com::sun::star::uno::RuntimeException;
      27             : using ::com::sun::star::uno::Reference;
      28             : using ::com::sun::star::uno::Sequence;
      29             : 
      30             : namespace
      31             : {
      32             : 
      33          36 : static const OUString lcl_aServiceNameCartesian2d( "com.sun.star.chart2.CartesianCoordinateSystem2d" );
      34          36 : static const OUString lcl_aServiceNameCartesian3d( "com.sun.star.chart2.CartesianCoordinateSystem3d" );
      35             : 
      36          36 : static const OUString lcl_aImplementationNameCartesian2d( "com.sun.star.comp.chart2.CartesianCoordinateSystem2d" );
      37          36 : static const OUString lcl_aImplementationNameCartesian3d( "com.sun.star.comp.chart2.CartesianCoordinateSystem3d" );
      38             : }
      39             : 
      40             : namespace chart
      41             : {
      42             : 
      43             : // explicit
      44         544 : CartesianCoordinateSystem::CartesianCoordinateSystem(
      45             :     const uno::Reference< uno::XComponentContext > & xContext,
      46             :     sal_Int32 nDimensionCount /* = 2 */,
      47             :     bool bSwapXAndYAxis /* = sal_False */ ) :
      48         544 :         BaseCoordinateSystem( xContext, nDimensionCount, bSwapXAndYAxis )
      49         544 : {}
      50             : 
      51           0 : CartesianCoordinateSystem::CartesianCoordinateSystem(
      52             :     const CartesianCoordinateSystem & rSource ) :
      53           0 :         BaseCoordinateSystem( rSource )
      54           0 : {}
      55             : 
      56         844 : CartesianCoordinateSystem::~CartesianCoordinateSystem()
      57         844 : {}
      58             : 
      59             : // ____ XCoordinateSystem ____
      60          56 : OUString SAL_CALL CartesianCoordinateSystem::getCoordinateSystemType()
      61             :     throw (RuntimeException, std::exception)
      62             : {
      63          56 :     return CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME;
      64             : }
      65             : 
      66         524 : OUString SAL_CALL CartesianCoordinateSystem::getViewServiceName()
      67             :     throw (RuntimeException, std::exception)
      68             : {
      69         524 :     return CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME;
      70             : }
      71             : 
      72             : // ____ XCloneable ____
      73           0 : uno::Reference< util::XCloneable > SAL_CALL CartesianCoordinateSystem::createClone()
      74             :     throw (RuntimeException, std::exception)
      75             : {
      76           0 :     return Reference< util::XCloneable >( new CartesianCoordinateSystem( *this ));
      77             : }
      78             : 
      79             : // ____ XServiceInfo ____
      80           0 : Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static()
      81             : {
      82           0 :     Sequence< OUString > aServices( 1 );
      83           0 :     aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME;
      84           0 :     return aServices;
      85             : }
      86             : 
      87             : // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
      88           0 : APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem,
      89             :                              OUString("com.sun.star.comp.chart.CartesianCoordinateSystem"))
      90             : 
      91             : // ==== CartesianCoordinateSystem2d ====
      92             : 
      93         136 : CartesianCoordinateSystem2d::CartesianCoordinateSystem2d(
      94             :     const uno::Reference< uno::XComponentContext > & xContext ) :
      95         136 :         CartesianCoordinateSystem( xContext, 2, false )
      96         136 : {}
      97             : 
      98         272 : CartesianCoordinateSystem2d::~CartesianCoordinateSystem2d()
      99         272 : {}
     100             : 
     101             : // ____ XServiceInfo ____
     102          14 : Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Static()
     103             : {
     104          14 :     Sequence< OUString > aServices( 2 );
     105          14 :     aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME;
     106          14 :     aServices[ 1 ] = lcl_aServiceNameCartesian2d;
     107          14 :     return aServices;
     108             : }
     109             : 
     110             : // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
     111         486 : APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, lcl_aImplementationNameCartesian2d )
     112             : 
     113             : // ==== CartesianCoordinateSystem3d ====
     114             : 
     115          60 : CartesianCoordinateSystem3d::CartesianCoordinateSystem3d(
     116             :     const uno::Reference< uno::XComponentContext > & xContext ) :
     117          60 :         CartesianCoordinateSystem( xContext, 3, false )
     118          60 : {}
     119             : 
     120         120 : CartesianCoordinateSystem3d::~CartesianCoordinateSystem3d()
     121         120 : {}
     122             : 
     123             : // ____ XServiceInfo ____
     124          10 : Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Static()
     125             : {
     126          10 :     Sequence< OUString > aServices( 2 );
     127          10 :     aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME;
     128          10 :     aServices[ 1 ] = lcl_aServiceNameCartesian3d;
     129          10 :     return aServices;
     130             : }
     131             : 
     132             : // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
     133         486 : APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, lcl_aImplementationNameCartesian3d )
     134             : 
     135         108 : }  // namespace chart
     136             : 
     137             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10