LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/oox/source/ppt - extdrawingfragmenthandler.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 18 5.6 %
Date: 2013-07-09 Functions: 2 7 28.6 %
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 "extdrawingfragmenthandler.hxx"
      11             : 
      12             : using namespace ::oox::core;
      13             : using namespace ::com::sun::star::xml::sax;
      14             : using namespace ::com::sun::star::uno;
      15             : 
      16             : namespace oox { namespace ppt {
      17             : 
      18           0 : ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
      19             :                                                         const OUString& rFragmentPath,
      20             :         const oox::ppt::SlidePersistPtr pSlidePersistPtr,
      21             :         const oox::ppt::ShapeLocation   eShapeLocation,
      22             :         oox::drawingml::ShapePtr        pMasterShapePtr,
      23             :         oox::drawingml::ShapePtr        pGroupShapePtr,
      24             :         oox::drawingml::ShapePtr        pShapePtr)
      25             :     throw( )
      26             :     : FragmentHandler2( rFilter, rFragmentPath ),
      27             :      mpSlidePersistPtr (pSlidePersistPtr ),
      28             :      meShapeLocation( eShapeLocation ),
      29             :      mpMasterShapePtr( pMasterShapePtr ),
      30             :      mpGroupShapePtr( pGroupShapePtr ),
      31           0 :      mpOrgShapePtr( pShapePtr )
      32             : {
      33           0 : }
      34             : 
      35           0 : ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
      36             : {
      37             : 
      38           0 : }
      39             : 
      40             : ContextHandlerRef
      41           0 : ExtDrawingFragmentHandler::onCreateContext( ::sal_Int32 aElement,
      42             :                                             const AttributeList& )
      43             : {
      44           0 :     switch( aElement )
      45             :     {
      46             :     case DSP_TOKEN( drawing ):
      47           0 :         break;
      48             :     case DSP_TOKEN( spTree ):
      49           0 :         mpShapePtr = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
      50             :         return new PPTShapeGroupContext(
      51             :                 *this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
      52           0 :                 mpShapePtr );
      53             :     default:
      54           0 :         break;
      55             :     }
      56             : 
      57           0 :     return this;
      58             : }
      59           0 : void SAL_CALL ExtDrawingFragmentHandler::endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException)
      60             : {
      61           0 :     if( mpShapePtr )
      62             :     {
      63           0 :         mpShapePtr->moveAllToPosition( mpOrgShapePtr->getPosition() );
      64           0 :         mpShapePtr->setName( mpOrgShapePtr->getName() );
      65             :     }
      66           0 : }
      67             : 
      68         141 : } }
      69             : 
      70             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10