LCOV - code coverage report
Current view: top level - chart2/source/view/axes - VPolarAxis.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 17 18 94.4 %
Date: 2015-06-13 12:38:46 Functions: 5 6 83.3 %
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 "VPolarAxis.hxx"
      21             : #include "VPolarAngleAxis.hxx"
      22             : #include "VPolarRadiusAxis.hxx"
      23             : #include "macros.hxx"
      24             : #include "Tickmarks.hxx"
      25             : #include "ShapeFactory.hxx"
      26             : 
      27             : #include <boost/scoped_ptr.hpp>
      28             : 
      29             : namespace chart
      30             : {
      31             : using namespace ::com::sun::star;
      32             : using namespace ::com::sun::star::chart2;
      33             : 
      34           4 : VPolarAxis* VPolarAxis::createAxis( const AxisProperties& rAxisProperties
      35             :            , const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
      36             :            , sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
      37             : {
      38           4 :     if( 0==nDimensionIndex )
      39           2 :         return new VPolarAngleAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
      40           2 :     return new VPolarRadiusAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
      41             : }
      42             : 
      43           4 : VPolarAxis::VPolarAxis( const AxisProperties& rAxisProperties
      44             :             , const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
      45             :             , sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
      46             :             : VAxisBase( nDimensionIndex, nDimensionCount, rAxisProperties, xNumberFormatsSupplier )
      47           0 :             , m_pPosHelper( new PolarPlottingPositionHelper() )
      48           4 :             , m_aIncrements()
      49             : {
      50           4 :     PlotterBase::m_pPosHelper = m_pPosHelper;
      51           4 : }
      52             : 
      53           8 : VPolarAxis::~VPolarAxis()
      54             : {
      55           4 :     delete m_pPosHelper;
      56           4 :     m_pPosHelper = NULL;
      57           4 : }
      58             : 
      59           8 : void VPolarAxis::setIncrements( const std::vector< ExplicitIncrementData >& rIncrements )
      60             : {
      61           8 :     m_aIncrements = rIncrements;
      62           8 : }
      63             : 
      64          16 : bool VPolarAxis::isAnythingToDraw()
      65             : {
      66          16 :     return ( 2==m_nDimension && VAxisBase::isAnythingToDraw() );
      67             : }
      68             : 
      69             : } //namespace chart
      70             : 
      71             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11