LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/oox/source/shape - LockedCanvasContext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 18 23 78.3 %
Date: 2013-07-09 Functions: 7 7 100.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 "LockedCanvasContext.hxx"
      11             : #include <oox/drawingml/shapegroupcontext.hxx>
      12             : 
      13             : using namespace com::sun::star;
      14             : 
      15             : namespace oox { namespace shape {
      16             : 
      17           1 : LockedCanvasContext::LockedCanvasContext( ContextHandler2Helper& rParent )
      18           1 : : ContextHandler2( rParent )
      19             : {
      20           1 : }
      21             : 
      22           2 : LockedCanvasContext::~LockedCanvasContext()
      23             : {
      24           2 : }
      25             : 
      26           1 : oox::drawingml::ShapePtr LockedCanvasContext::getShape()
      27             : {
      28           1 :     return mpShape;
      29             : }
      30             : 
      31           4 : ::oox::core::ContextHandlerRef LockedCanvasContext::onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& /*rAttribs*/ )
      32             : {
      33           4 :     switch( getBaseToken( aElementToken ) )
      34             :     {
      35             :     case XML_lockedCanvas:
      36           1 :         break;
      37             :     case XML_nvGrpSpPr:
      38           1 :         break;
      39             :     case XML_grpSpPr:
      40           1 :         break;
      41             :     case XML_sp:
      42             :         {
      43           0 :             oox::drawingml::ShapePtr pMasterShape;
      44           0 :             mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape"));
      45           0 :             mpShape->setLockedCanvas(true);
      46           0 :             return new oox::drawingml::ShapeContext( *this, pMasterShape, mpShape );
      47             :         }
      48             :     case XML_grpSp:
      49             :         {
      50           1 :             oox::drawingml::ShapePtr pMasterShape;
      51           1 :             mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
      52           1 :             mpShape->setLockedCanvas(true);
      53           1 :             return new oox::drawingml::ShapeGroupContext( *this, pMasterShape, mpShape );
      54             :         }
      55             :     default:
      56             :         SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken));
      57           0 :         break;
      58             :     }
      59           3 :     return 0;
      60             : }
      61             : 
      62         141 : } }
      63             : 
      64             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10