LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - chart.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 33 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 6 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             :  * 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 <main.hxx>
      21             : #include <chart.hxx>
      22             : 
      23             : 
      24           0 : CGMChart::CGMChart(CGM& rCGM)
      25             :     : mpCGM(&rCGM)
      26           0 :     , mnCurrentFileType(0)
      27             : {
      28           0 :     for ( sal_Int8 i = 0; i < 7; i++ )
      29             :     {
      30           0 :         mDataNode[ i ].nBoxX1 = mDataNode[ i ].nBoxY1 = 0 ;
      31           0 :         mDataNode[ i ].nBoxX2 = mDataNode[ i ].nBoxY2 = 0 ;
      32             : 
      33           0 :         mDataNode[ i ].nZoneEnum = i;
      34             :     }
      35           0 : }
      36             : 
      37           0 : CGMChart::~CGMChart()
      38             : {
      39             :     // delete the whole textentry structure
      40             : 
      41           0 :     while( !maTextEntryList.empty() )
      42             :     {
      43           0 :         DeleteTextEntry( maTextEntryList[ 0 ] );
      44             :     }
      45           0 : }
      46             : 
      47           0 : void CGMChart::DeleteTextEntry( TextEntry* pTextEntry )
      48             : {
      49           0 :     if ( pTextEntry )
      50             :     {
      51           0 :         delete pTextEntry->pText;
      52           0 :         for ( TextAttribute* pTAttr = pTextEntry->pAttribute; pTAttr != NULL ; )
      53             :         {
      54           0 :             TextAttribute* pTempTAttr = pTAttr;
      55           0 :             pTAttr = pTAttr->pNextAttribute;
      56           0 :             delete pTempTAttr;
      57             :         }
      58           0 :         ::std::vector< TextEntry* >::iterator it;
      59           0 :         for ( it = maTextEntryList.begin(); it != maTextEntryList.end(); ++it )
      60             :         {
      61           0 :             if ( *it == pTextEntry )
      62             :             {
      63           0 :                 maTextEntryList.erase( it );
      64           0 :                 break;
      65             :             }
      66             :         }
      67           0 :         delete pTextEntry;
      68             :     }
      69           0 : }
      70             : 
      71           0 : void CGMChart::InsertTextEntry( TextEntry* pTextEntry )
      72             : {
      73           0 :     maTextEntryList.push_back( pTextEntry );
      74           0 : }
      75             : 
      76           0 : void CGMChart::ResetAnnotation()
      77             : {
      78           0 :     mDataNode[ 0 ].nZoneEnum = 0;
      79           0 : }
      80             : 
      81           0 : bool CGMChart::IsAnnotation()
      82             : {
      83           0 :     return ( mDataNode[ 0 ].nZoneEnum == 0 );
      84             : }
      85             : 
      86             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11