LCOV - code coverage report
Current view: top level - chart2/source/tools - GL3DHelper.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 19 0.0 %
Date: 2014-04-14 Functions: 0 1 0.0 %
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             : 
      10             : #include <GL3DHelper.hxx>
      11             : 
      12             : #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
      13             : #include <com/sun/star/chart2/XCoordinateSystem.hpp>
      14             : #include <com/sun/star/chart2/XChartTypeContainer.hpp>
      15             : #include <com/sun/star/chart2/XChartType.hpp>
      16             : 
      17             : using namespace com::sun::star;
      18             : 
      19             : namespace chart {
      20             : 
      21           0 : bool GL3DHelper::isGL3DDiagram( const css::uno::Reference<css::chart2::XDiagram>& xDiagram )
      22             : {
      23           0 :     uno::Reference<chart2::XCoordinateSystemContainer> xCooSysContainer(xDiagram, uno::UNO_QUERY);
      24             : 
      25           0 :     if (!xCooSysContainer.is())
      26           0 :         return false;
      27             : 
      28           0 :     uno::Sequence< uno::Reference<chart2::XCoordinateSystem> > aCooSysList = xCooSysContainer->getCoordinateSystems();
      29           0 :     for (sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS)
      30             :     {
      31           0 :         uno::Reference<chart2::XCoordinateSystem> xCooSys = aCooSysList[nCS];
      32             : 
      33             :         //iterate through all chart types in the current coordinate system
      34           0 :         uno::Reference<chart2::XChartTypeContainer> xChartTypeContainer(xCooSys, uno::UNO_QUERY);
      35             :         OSL_ASSERT( xChartTypeContainer.is());
      36           0 :         if( !xChartTypeContainer.is() )
      37           0 :             continue;
      38             : 
      39           0 :         uno::Sequence< uno::Reference<chart2::XChartType> > aChartTypeList = xChartTypeContainer->getChartTypes();
      40           0 :         for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
      41             :         {
      42           0 :             uno::Reference<chart2::XChartType> xChartType = aChartTypeList[nT];
      43           0 :             OUString aChartType = xChartType->getChartType();
      44           0 :             if( aChartType == "com.sun.star.chart2.GL3DBarChartType" )
      45           0 :                 return true;
      46           0 :         }
      47           0 :     }
      48             : 
      49           0 :     return false;
      50             : }
      51             : 
      52             : }
      53             : 
      54             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10