LCOV - code coverage report
Current view: top level - libreoffice/oox/source/drawingml - textliststylecontext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 33 38 86.8 %
Date: 2012-12-27 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             :  * 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/textliststylecontext.hxx"
      21             : #include "oox/drawingml/textparagraphpropertiescontext.hxx"
      22             : #include "oox/helper/attributelist.hxx"
      23             : 
      24             : using namespace ::oox::core;
      25             : using namespace ::com::sun::star::uno;
      26             : using namespace ::com::sun::star::xml::sax;
      27             : 
      28             : namespace oox { namespace drawingml {
      29             : 
      30             : // --------------------------------------------------------------------
      31             : 
      32             : // CT_TextListStyle
      33          56 : TextListStyleContext::TextListStyleContext( ContextHandler& rParent, TextListStyle& rTextListStyle )
      34             : : ContextHandler( rParent )
      35          56 : , mrTextListStyle( rTextListStyle )
      36             : {
      37          56 : }
      38             : 
      39         112 : TextListStyleContext::~TextListStyleContext()
      40             : {
      41         112 : }
      42             : 
      43             : // --------------------------------------------------------------------
      44             : 
      45          56 : void TextListStyleContext::endFastElement( sal_Int32 ) throw (SAXException, RuntimeException)
      46             : {
      47          56 : }
      48             : 
      49             : // --------------------------------------------------------------------
      50             : 
      51         122 : Reference< XFastContextHandler > TextListStyleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& rxAttributes ) throw (SAXException, RuntimeException)
      52             : {
      53         122 :     Reference< XFastContextHandler > xRet;
      54         122 :     switch( aElementToken )
      55             :     {
      56             :         case A_TOKEN( defPPr ):     // CT_TextParagraphProperties
      57           8 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 0 ] ) );
      58           8 :             break;
      59             :         case A_TOKEN( outline1pPr ):
      60           0 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getAggregationListStyle()[ 0 ] ) );
      61           0 :             break;
      62             :         case A_TOKEN( outline2pPr ):
      63           0 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getAggregationListStyle()[ 1 ] ) );
      64           0 :             break;
      65             :         case A_TOKEN( lvl1pPr ):
      66          26 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 0 ] ) );
      67          26 :             break;
      68             :         case A_TOKEN( lvl2pPr ):
      69          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 1 ] ) );
      70          11 :             break;
      71             :         case A_TOKEN( lvl3pPr ):
      72          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 2 ] ) );
      73          11 :             break;
      74             :         case A_TOKEN( lvl4pPr ):
      75          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 3 ] ) );
      76          11 :             break;
      77             :         case A_TOKEN( lvl5pPr ):
      78          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 4 ] ) );
      79          11 :             break;
      80             :         case A_TOKEN( lvl6pPr ):
      81          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 5 ] ) );
      82          11 :             break;
      83             :         case A_TOKEN( lvl7pPr ):
      84          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 6 ] ) );
      85          11 :             break;
      86             :         case A_TOKEN( lvl8pPr ):
      87          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 7 ] ) );
      88          11 :             break;
      89             :         case A_TOKEN( lvl9pPr ):
      90          11 :             xRet.set( new TextParagraphPropertiesContext( *this, rxAttributes, *mrTextListStyle.getListStyle()[ 8 ] ) );
      91          11 :             break;
      92             :     }
      93         122 :     if ( !xRet.is() )
      94           0 :         xRet.set( this );
      95         122 :     return xRet;
      96             : }
      97             : 
      98             : // --------------------------------------------------------------------
      99             : 
     100          51 : } }
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10