LCOV - code coverage report
Current view: top level - oox/source/drawingml - themefragmenthandler.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 16 19 84.2 %
Date: 2012-08-25 Functions: 6 6 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 12 21 57.1 %

           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 "oox/drawingml/themefragmenthandler.hxx"
      21                 :            : #include "oox/drawingml/objectdefaultcontext.hxx"
      22                 :            : #include "oox/drawingml/theme.hxx"
      23                 :            : #include "oox/drawingml/themeelementscontext.hxx"
      24                 :            : 
      25                 :            : using ::rtl::OUString;
      26                 :            : using namespace ::oox::core;
      27                 :            : 
      28                 :            : namespace oox {
      29                 :            : namespace drawingml {
      30                 :            : 
      31                 :            : // ============================================================================
      32                 :            : 
      33                 :         18 : ThemeFragmentHandler::ThemeFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rTheme ) :
      34                 :            :     FragmentHandler2( rFilter, rFragmentPath ),
      35                 :         18 :     mrTheme( rTheme )
      36                 :            : {
      37                 :         18 : }
      38                 :            : 
      39                 :         18 : ThemeFragmentHandler::~ThemeFragmentHandler()
      40                 :            : {
      41         [ -  + ]:         36 : }
      42                 :            : 
      43                 :        294 : ContextHandlerRef ThemeFragmentHandler::onCreateContext( sal_Int32 nElement, const AttributeList& )
      44                 :            : {
      45                 :            :     // CT_OfficeStyleSheet
      46      [ +  +  - ]:        294 :     switch( getCurrentElement() )
      47                 :            :     {
      48                 :            :         case XML_ROOT_CONTEXT:
      49         [ +  - ]:         18 :             switch( nElement )
      50                 :            :             {
      51                 :            :                 case A_TOKEN( theme ):
      52                 :         18 :                     return this;
      53                 :            :             }
      54                 :          0 :         break;
      55                 :            : 
      56                 :            :         case A_TOKEN( theme ):
      57   [ +  +  +  -  :        276 :             switch( nElement )
                   -  + ]
      58                 :            :             {
      59                 :            :                 case A_TOKEN( themeElements ):              // CT_BaseStyles
      60         [ +  - ]:         18 :                     return new ThemeElementsContext( *this, mrTheme );
      61                 :            :                 case A_TOKEN( objectDefaults ):             // CT_ObjectStyleDefaults
      62         [ +  - ]:         15 :                     return new objectDefaultContext( *this, mrTheme );
      63                 :            :                 case A_TOKEN( extraClrSchemeLst ):          // CT_ColorSchemeList
      64                 :         15 :                     return 0;
      65                 :            :                 case A_TOKEN( custClrLst ):                 // CustomColorList
      66                 :          0 :                     return 0;
      67                 :            :                 case A_TOKEN( ext ):                        // CT_OfficeArtExtension
      68                 :          0 :                     return 0;
      69                 :            :             }
      70                 :        228 :         break;
      71                 :            :     }
      72                 :        294 :     return 0;
      73                 :            : }
      74                 :            : 
      75                 :            : // ============================================================================
      76                 :            : 
      77                 :            : } // namespace drawingml
      78 [ +  - ][ +  - ]:        285 : } // namespace oox
      79                 :            : 
      80                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10