LCOV - code coverage report
Current view: top level - libreoffice/oox/source/drawingml/diagram - constraintlistcontext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 31 3.2 %
Date: 2012-12-27 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             :  * 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 "constraintlistcontext.hxx"
      21             : #include "oox/helper/attributelist.hxx"
      22             : 
      23             : using namespace ::oox::core;
      24             : using namespace ::com::sun::star::uno;
      25             : using namespace ::com::sun::star::xml::sax;
      26             : 
      27             : namespace oox { namespace drawingml {
      28             : 
      29             : // CT_ConstraintLists
      30           0 : ConstraintListContext::ConstraintListContext( ContextHandler& rParent,
      31             :                                               const Reference< XFastAttributeList >&,
      32             :                                               const LayoutAtomPtr &pNode )
      33             :     : ContextHandler( rParent )
      34           0 :     , mpNode( pNode )
      35             : {
      36             :     OSL_ENSURE( pNode, "Node must NOT be NULL" );
      37           0 : }
      38             : 
      39             : 
      40           0 : ConstraintListContext::~ConstraintListContext()
      41             : {
      42           0 : }
      43             : 
      44           0 : void SAL_CALL ConstraintListContext::endFastElement( ::sal_Int32 )
      45             :     throw (SAXException, RuntimeException)
      46             : {
      47           0 : }
      48             : 
      49             : Reference< XFastContextHandler > SAL_CALL
      50           0 : ConstraintListContext::createFastChildContext( ::sal_Int32 aElement,
      51             :                                                const Reference< XFastAttributeList >& xAttribs )
      52             :     throw (SAXException, RuntimeException)
      53             : {
      54           0 :     Reference< XFastContextHandler > xRet;
      55             : 
      56           0 :     OUString aEmptyStr;
      57             : 
      58           0 :     switch( aElement )
      59             :     {
      60             :     case DGM_TOKEN( constr ):
      61             :     {
      62           0 :         ConstraintAtomPtr pNode( new ConstraintAtom() );
      63           0 :         mpNode->addChild( pNode );
      64             : 
      65           0 :         AttributeList aAttribs( xAttribs );
      66           0 :         pNode->setFor( aAttribs.getToken( XML_for, XML_none ) );
      67           0 :         pNode->setForName( aAttribs.getString( XML_forName, aEmptyStr ) );
      68           0 :         pNode->setPointType( aAttribs.getToken( XML_ptType, XML_none ) );
      69           0 :         pNode->setType( aAttribs.getToken( XML_type, XML_none ) );
      70           0 :         pNode->setRefFor( aAttribs.getToken( XML_refFor, XML_none ) );
      71           0 :         pNode->setRefForName( aAttribs.getString( XML_refForName, aEmptyStr ) );
      72           0 :         pNode->setRefType( aAttribs.getToken( XML_refType, XML_none ) );
      73           0 :         pNode->setRefPointType( aAttribs.getToken( XML_refPtType, XML_none ) );
      74           0 :         pNode->setFactor( aAttribs.getDouble( XML_fact, 1.0 ) );
      75           0 :         pNode->setValue( aAttribs.getDouble( XML_val, 0.0 ) );
      76           0 :         pNode->setOperator( aAttribs.getToken( XML_op, XML_none ) );
      77           0 :         break;
      78             :     }
      79             :     default:
      80           0 :         break;
      81             :     }
      82           0 :     if( !xRet.is() )
      83           0 :         xRet.set(this);
      84             : 
      85           0 :     return xRet;
      86             : }
      87             : 
      88             : 
      89          51 : } }
      90             : 
      91             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10