LCOV - code coverage report
Current view: top level - chart2/source/model/main - CartesianCoordinateSystem.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 26 46 56.5 %
Date: 2012-08-25 Functions: 13 30 43.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 60 11.7 %

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

Generated by: LCOV version 1.10