LCOV - code coverage report
Current view: top level - oox/source/drawingml/chart - plotareacontext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 59 1.7 %
Date: 2012-08-25 Functions: 2 14 14.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 75 2.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 "oox/drawingml/chart/plotareacontext.hxx"
      21                 :            : 
      22                 :            : #include "oox/drawingml/shapepropertiescontext.hxx"
      23                 :            : #include "oox/drawingml/chart/axiscontext.hxx"
      24                 :            : #include "oox/drawingml/chart/plotareamodel.hxx"
      25                 :            : #include "oox/drawingml/chart/seriescontext.hxx"
      26                 :            : #include "oox/drawingml/chart/titlecontext.hxx"
      27                 :            : #include "oox/drawingml/chart/typegroupcontext.hxx"
      28                 :            : 
      29                 :            : namespace oox {
      30                 :            : namespace drawingml {
      31                 :            : namespace chart {
      32                 :            : 
      33                 :            : // ============================================================================
      34                 :            : 
      35                 :            : using ::oox::core::ContextHandler2Helper;
      36                 :            : using ::oox::core::ContextHandlerRef;
      37                 :            : 
      38                 :            : // ============================================================================
      39                 :            : 
      40                 :          0 : View3DContext::View3DContext( ContextHandler2Helper& rParent, View3DModel& rModel ) :
      41                 :          0 :     ContextBase< View3DModel >( rParent, rModel )
      42                 :            : {
      43                 :          0 : }
      44                 :            : 
      45                 :          0 : View3DContext::~View3DContext()
      46                 :            : {
      47         [ #  # ]:          0 : }
      48                 :            : 
      49                 :          0 : ContextHandlerRef View3DContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
      50                 :            : {
      51         [ #  # ]:          0 :     switch( getCurrentElement() )
      52                 :            :     {
      53                 :            :         case C_TOKEN( view3D ):
      54   [ #  #  #  #  :          0 :             switch( nElement )
                #  #  # ]
      55                 :            :             {
      56                 :            :                 case C_TOKEN( depthPercent ):
      57                 :          0 :                     mrModel.mnDepthPercent = rAttribs.getInteger( XML_val, 100 );
      58                 :          0 :                     return 0;
      59                 :            :                 case C_TOKEN( hPercent ):
      60         [ #  # ]:          0 :                     mrModel.monHeightPercent = rAttribs.getInteger( XML_val, 100 );
      61                 :          0 :                     return 0;
      62                 :            :                 case C_TOKEN( perspective ):
      63                 :          0 :                     mrModel.mnPerspective = rAttribs.getInteger( XML_val, 30 );
      64                 :          0 :                     return 0;
      65                 :            :                 case C_TOKEN( rAngAx ):
      66                 :            :                     // default is 'false', not 'true' as specified
      67                 :          0 :                     mrModel.mbRightAngled = rAttribs.getBool( XML_val, false );
      68                 :          0 :                     return 0;
      69                 :            :                 case C_TOKEN( rotX ):
      70                 :            :                     // default value dependent on chart type
      71                 :          0 :                     mrModel.monRotationX = rAttribs.getInteger( XML_val );
      72                 :          0 :                     return 0;
      73                 :            :                 case C_TOKEN( rotY ):
      74                 :            :                     // default value dependent on chart type
      75                 :          0 :                     mrModel.monRotationY = rAttribs.getInteger( XML_val );
      76                 :          0 :                     return 0;
      77                 :            :             }
      78                 :          0 :         break;
      79                 :            :     }
      80                 :          0 :     return 0;
      81                 :            : }
      82                 :            : 
      83                 :            : // ============================================================================
      84                 :            : 
      85                 :          0 : WallFloorContext::WallFloorContext( ContextHandler2Helper& rParent, WallFloorModel& rModel ) :
      86                 :          0 :     ContextBase< WallFloorModel >( rParent, rModel )
      87                 :            : {
      88                 :          0 : }
      89                 :            : 
      90                 :          0 : WallFloorContext::~WallFloorContext()
      91                 :            : {
      92         [ #  # ]:          0 : }
      93                 :            : 
      94                 :          0 : ContextHandlerRef WallFloorContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
      95                 :            : {
      96         [ #  # ]:          0 :     switch( getCurrentElement() )
      97                 :            :     {
      98                 :            :         case C_TOKEN( backWall ):
      99                 :            :         case C_TOKEN( floor ):
     100                 :            :         case C_TOKEN( sideWall ):
     101      [ #  #  # ]:          0 :             switch( nElement )
     102                 :            :             {
     103                 :            :                 case C_TOKEN( pictureOptions ):
     104         [ #  # ]:          0 :                     return new PictureOptionsContext( *this, mrModel.mxPicOptions.create() );
     105                 :            :                 case C_TOKEN( spPr ):
     106         [ #  # ]:          0 :                     return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
     107                 :            :             }
     108                 :          0 :         break;
     109                 :            :     }
     110                 :          0 :     return 0;
     111                 :            : }
     112                 :            : 
     113                 :            : // ============================================================================
     114                 :            : 
     115                 :          0 : PlotAreaContext::PlotAreaContext( ContextHandler2Helper& rParent, PlotAreaModel& rModel ) :
     116                 :          0 :     ContextBase< PlotAreaModel >( rParent, rModel )
     117                 :            : {
     118                 :          0 : }
     119                 :            : 
     120                 :          0 : PlotAreaContext::~PlotAreaContext()
     121                 :            : {
     122         [ #  # ]:          0 : }
     123                 :            : 
     124                 :          0 : ContextHandlerRef PlotAreaContext::onCreateContext( sal_Int32 nElement, const AttributeList& )
     125                 :            : {
     126         [ #  # ]:          0 :     switch( getCurrentElement() )
     127                 :            :     {
     128                 :            :         case C_TOKEN( plotArea ):
     129   [ #  #  #  #  :          0 :             switch( nElement )
          #  #  #  #  #  
          #  #  #  #  #  
                      # ]
     130                 :            :             {
     131                 :            :                 case C_TOKEN( area3DChart ):
     132                 :            :                 case C_TOKEN( areaChart ):
     133         [ #  # ]:          0 :                     return new AreaTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     134                 :            :                 case C_TOKEN( bar3DChart ):
     135                 :            :                 case C_TOKEN( barChart ):
     136         [ #  # ]:          0 :                     return new BarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     137                 :            :                 case C_TOKEN( bubbleChart ):
     138         [ #  # ]:          0 :                     return new BubbleTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     139                 :            :                 case C_TOKEN( line3DChart ):
     140                 :            :                 case C_TOKEN( lineChart ):
     141                 :            :                 case C_TOKEN( stockChart ):
     142         [ #  # ]:          0 :                     return new LineTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     143                 :            :                 case C_TOKEN( doughnutChart ):
     144                 :            :                 case C_TOKEN( ofPieChart ):
     145                 :            :                 case C_TOKEN( pie3DChart ):
     146                 :            :                 case C_TOKEN( pieChart ):
     147         [ #  # ]:          0 :                     return new PieTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     148                 :            :                 case C_TOKEN( radarChart ):
     149         [ #  # ]:          0 :                     return new RadarTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     150                 :            :                 case C_TOKEN( scatterChart ):
     151         [ #  # ]:          0 :                     return new ScatterTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     152                 :            :                 case C_TOKEN( surface3DChart ):
     153                 :            :                 case C_TOKEN( surfaceChart ):
     154         [ #  # ]:          0 :                     return new SurfaceTypeGroupContext( *this, mrModel.maTypeGroups.create( nElement ) );
     155                 :            : 
     156                 :            :                 case C_TOKEN( catAx ):
     157         [ #  # ]:          0 :                     return new CatAxisContext( *this, mrModel.maAxes.create( nElement ) );
     158                 :            :                 case C_TOKEN( dateAx ):
     159         [ #  # ]:          0 :                     return new DateAxisContext( *this, mrModel.maAxes.create( nElement ) );
     160                 :            :                 case C_TOKEN( serAx ):
     161         [ #  # ]:          0 :                     return new SerAxisContext( *this, mrModel.maAxes.create( nElement ) );
     162                 :            :                 case C_TOKEN( valAx ):
     163         [ #  # ]:          0 :                     return new ValAxisContext( *this, mrModel.maAxes.create( nElement ) );
     164                 :            : 
     165                 :            :                 case C_TOKEN( layout ):
     166         [ #  # ]:          0 :                     return new LayoutContext( *this, mrModel.mxLayout.create() );
     167                 :            :                 case C_TOKEN( spPr ):
     168         [ #  # ]:          0 :                     return new ShapePropertiesContext( *this, mrModel.mxShapeProp.create() );
     169                 :            :             }
     170                 :          0 :         break;
     171                 :            :     }
     172                 :          0 :     return 0;
     173                 :            : }
     174                 :            : 
     175                 :            : // ============================================================================
     176                 :            : 
     177                 :            : } // namespace chart
     178                 :            : } // namespace drawingml
     179 [ +  - ][ +  - ]:        285 : } // namespace oox
     180                 :            : 
     181                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10