LCOV - code coverage report
Current view: top level - xmloff/source/chart - XMLChartPropertyContext.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 14 16 87.5 %
Date: 2014-11-03 Functions: 4 9 44.4 %
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 "XMLChartPropertyContext.hxx"
      21             : #include "PropertyMap.hxx"
      22             : 
      23             : #include "XMLSymbolImageContext.hxx"
      24             : #include "XMLLabelSeparatorContext.hxx"
      25             : 
      26           0 : TYPEINIT1( XMLChartPropertyContext, SvXMLImportContext );
      27             : 
      28             : using namespace ::com::sun::star;
      29             : 
      30        5288 : XMLChartPropertyContext::XMLChartPropertyContext(
      31             :     SvXMLImport& rImport,
      32             :     sal_uInt16 nPrfx,
      33             :     const OUString& rLName,
      34             :     const uno::Reference< xml::sax::XAttributeList > & xAttrList,
      35             :     sal_uInt32 nFamily,
      36             :     ::std::vector< XMLPropertyState >& rProps,
      37             :     const rtl::Reference< SvXMLImportPropertyMapper >& rMapper ) :
      38        5288 :         SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMapper )
      39             : {
      40        5288 : }
      41             : 
      42       10576 : XMLChartPropertyContext::~XMLChartPropertyContext()
      43       10576 : {}
      44             : 
      45         346 : SvXMLImportContext* XMLChartPropertyContext::CreateChildContext(
      46             :     sal_uInt16 nPrefix,
      47             :     const OUString& rLocalName,
      48             :     const uno::Reference< xml::sax::XAttributeList > & xAttrList,
      49             :     ::std::vector< XMLPropertyState > &rProperties,
      50             :     const XMLPropertyState& rProp )
      51             : {
      52         346 :     SvXMLImportContext *pContext = 0;
      53             : 
      54         346 :     switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) )
      55             :     {
      56             :         case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE:
      57          16 :             pContext = new XMLSymbolImageContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
      58          16 :             break;
      59             :         case XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR:
      60         330 :             pContext = new XMLLabelSeparatorContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
      61         330 :             break;
      62             :     }
      63             : 
      64             :     // default / no context yet: create child context by base class
      65         346 :     if( !pContext )
      66             :     {
      67             :         pContext = SvXMLPropertySetContext::CreateChildContext(
      68           0 :             nPrefix, rLocalName, xAttrList, rProperties, rProp );
      69             :     }
      70             : 
      71         346 :     return pContext;
      72             : }
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10