LCOV - code coverage report
Current view: top level - sw/source/filter/xml - xmlitem.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 11 14 78.6 %
Date: 2014-04-11 Functions: 3 5 60.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 <xmloff/xmlimp.hxx>
      21             : #include "xmlimpit.hxx"
      22             : #include "xmlitem.hxx"
      23             : 
      24             : using namespace ::com::sun::star;
      25             : 
      26         482 : SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
      27             :                                           const OUString& rLName,
      28             :                                           const uno::Reference< xml::sax::XAttributeList >& xAttrList,
      29             :                                           SfxItemSet& rISet,
      30             :                                           SvXMLImportItemMapper& rIMap,
      31             :                                           const SvXMLUnitConverter& rUnitConverter ):
      32             :     SvXMLImportContext( rImp, nPrfx, rLName ),
      33             :     rItemSet( rISet ),
      34             :     rIMapper( rIMap ),
      35         482 :     rUnitConv( rUnitConverter )
      36             : {
      37             :     rIMap.importXML( rItemSet, xAttrList, rUnitConv,
      38         482 :                            GetImport().GetNamespaceMap() );
      39         482 : }
      40             : 
      41         482 : SvXMLItemSetContext::~SvXMLItemSetContext()
      42             : {
      43         482 : }
      44             : 
      45          17 : SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
      46             :                                             const OUString& rLocalName,
      47             :                                             const uno::Reference< xml::sax::XAttributeList >& xAttrList )
      48             : {
      49          17 :     SvXMLItemMapEntriesRef xMapEntries = rIMapper.getMapEntries();
      50          17 :     SvXMLItemMapEntry* pEntry = xMapEntries->getByName( nPrefix, rLocalName );
      51             : 
      52          17 :     if( pEntry && 0 != (pEntry->nMemberId & MID_SW_FLAG_ELEMENT_ITEM_IMPORT) )
      53             :     {
      54             :         return CreateChildContext( nPrefix, rLocalName, xAttrList,
      55          17 :                                    rItemSet, *pEntry, rUnitConv );
      56             :     }
      57           0 :     return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
      58             : }
      59             : 
      60             : /** This method is called from this instance implementation of
      61             :     CreateChildContext if the element matches an entry in the
      62             :     SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT
      63             : */
      64           0 : SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
      65             :                                    const OUString& rLocalName,
      66             :                                    const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/,
      67             :                                     SfxItemSet&  /*rItemSet*/,
      68             :                                    const SvXMLItemMapEntry& /*rEntry*/,
      69             :                                    const SvXMLUnitConverter& /*rUnitConv*/ )
      70             : {
      71           0 :     return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
      72             : }
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10