LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/transform - ProcAttrTContext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 19 68.4 %
Date: 2012-12-27 Functions: 5 11 45.5 %
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 "ProcAttrTContext.hxx"
      21             : #include "MutableAttrList.hxx"
      22             : #include "TransformerBase.hxx"
      23             : #include "TransformerActions.hxx"
      24             : #include <xmloff/nmspmap.hxx>
      25             : 
      26             : using ::rtl::OUString;
      27             : 
      28             : using namespace ::com::sun::star::uno;
      29             : using namespace ::com::sun::star::xml::sax;
      30             : using namespace ::xmloff::token;
      31             : 
      32           0 : TYPEINIT1( XMLProcAttrTransformerContext, XMLTransformerContext );
      33             : 
      34           2 : XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
      35             :         XMLTransformerBase& rImp,
      36             :         const OUString& rQName,
      37             :        sal_uInt16 nActionMap ) :
      38             :     XMLTransformerContext( rImp, rQName ),
      39             :     m_aElemQName( rQName ),
      40           2 :     m_nActionMap( nActionMap )
      41             : {
      42           2 : }
      43             : 
      44           0 : XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
      45             :         XMLTransformerBase& rImp,
      46             :         const OUString& rQName,
      47             :         sal_uInt16 nPrefix,
      48             :         ::xmloff::token::XMLTokenEnum eToken,
      49             :        sal_uInt16 nActionMap ) :
      50             :     XMLTransformerContext( rImp, rQName ),
      51           0 :     m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
      52           0 :                             ::xmloff::token::GetXMLToken( eToken ) ) ),
      53           0 :     m_nActionMap( nActionMap )
      54             : {
      55           0 : }
      56             : 
      57           4 : XMLProcAttrTransformerContext::~XMLProcAttrTransformerContext()
      58             : {
      59           4 : }
      60             : 
      61           2 : void XMLProcAttrTransformerContext::StartElement(
      62             :         const Reference< XAttributeList >& rAttrList )
      63             : {
      64           2 :     Reference< XAttributeList > xAttrList( rAttrList );
      65           2 :     GetTransformer().ProcessAttrList( xAttrList, m_nActionMap, sal_False );
      66           2 :     GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
      67           2 : }
      68             : 
      69           2 : void XMLProcAttrTransformerContext::EndElement()
      70             : {
      71           2 :     GetTransformer().GetDocHandler()->endElement( m_aElemQName );
      72           2 : }
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10