LCOV - code coverage report
Current view: top level - oox/source/drawingml/diagram - constraintlistcontext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 31 3.2 %
Date: 2012-08-25 Functions: 2 7 28.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 56 3.6 %

           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 "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                 :            : using ::rtl::OUString;
      27                 :            : 
      28                 :            : namespace oox { namespace drawingml {
      29                 :            : 
      30                 :            : // CT_ConstraintLists
      31                 :          0 : ConstraintListContext::ConstraintListContext( ContextHandler& rParent,
      32                 :            :                                               const Reference< XFastAttributeList >&,
      33                 :            :                                               const LayoutAtomPtr &pNode )
      34                 :            :     : ContextHandler( rParent )
      35         [ #  # ]:          0 :     , mpNode( pNode )
      36                 :            : {
      37                 :            :     OSL_ENSURE( pNode, "Node must NOT be NULL" );
      38                 :          0 : }
      39                 :            : 
      40                 :            : 
      41         [ #  # ]:          0 : ConstraintListContext::~ConstraintListContext()
      42                 :            : {
      43         [ #  # ]:          0 : }
      44                 :            : 
      45                 :          0 : void SAL_CALL ConstraintListContext::endFastElement( ::sal_Int32 )
      46                 :            :     throw (SAXException, RuntimeException)
      47                 :            : {
      48                 :          0 : }
      49                 :            : 
      50                 :            : Reference< XFastContextHandler > SAL_CALL
      51                 :          0 : ConstraintListContext::createFastChildContext( ::sal_Int32 aElement,
      52                 :            :                                                const Reference< XFastAttributeList >& xAttribs )
      53                 :            :     throw (SAXException, RuntimeException)
      54                 :            : {
      55                 :          0 :     Reference< XFastContextHandler > xRet;
      56                 :            : 
      57                 :          0 :     OUString aEmptyStr;
      58                 :            : 
      59         [ #  # ]:          0 :     switch( aElement )
      60                 :            :     {
      61                 :            :     case DGM_TOKEN( constr ):
      62                 :            :     {
      63 [ #  # ][ #  # ]:          0 :         ConstraintAtomPtr pNode( new ConstraintAtom() );
                 [ #  # ]
      64 [ #  # ][ #  # ]:          0 :         mpNode->addChild( pNode );
                 [ #  # ]
      65                 :            : 
      66         [ #  # ]:          0 :         AttributeList aAttribs( xAttribs );
      67         [ #  # ]:          0 :         pNode->setFor( aAttribs.getToken( XML_for, XML_none ) );
      68         [ #  # ]:          0 :         pNode->setForName( aAttribs.getString( XML_forName, aEmptyStr ) );
      69         [ #  # ]:          0 :         pNode->setPointType( aAttribs.getToken( XML_ptType, XML_none ) );
      70         [ #  # ]:          0 :         pNode->setType( aAttribs.getToken( XML_type, XML_none ) );
      71         [ #  # ]:          0 :         pNode->setRefFor( aAttribs.getToken( XML_refFor, XML_none ) );
      72         [ #  # ]:          0 :         pNode->setRefForName( aAttribs.getString( XML_refForName, aEmptyStr ) );
      73         [ #  # ]:          0 :         pNode->setRefType( aAttribs.getToken( XML_refType, XML_none ) );
      74         [ #  # ]:          0 :         pNode->setRefPointType( aAttribs.getToken( XML_refPtType, XML_none ) );
      75         [ #  # ]:          0 :         pNode->setFactor( aAttribs.getDouble( XML_fact, 1.0 ) );
      76         [ #  # ]:          0 :         pNode->setValue( aAttribs.getDouble( XML_val, 0.0 ) );
      77         [ #  # ]:          0 :         pNode->setOperator( aAttribs.getToken( XML_op, XML_none ) );
      78 [ #  # ][ #  # ]:          0 :         break;
      79                 :            :     }
      80                 :            :     default:
      81                 :          0 :         break;
      82                 :            :     }
      83         [ #  # ]:          0 :     if( !xRet.is() )
      84         [ #  # ]:          0 :         xRet.set(this);
      85                 :            : 
      86                 :          0 :     return xRet;
      87                 :            : }
      88                 :            : 
      89                 :            : 
      90 [ +  - ][ +  - ]:        285 : } }
      91                 :            : 
      92                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10