LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/transform - ControlOOoTContext.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 31 0.0 %
Date: 2012-12-27 Functions: 0 12 0.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 "ControlOOoTContext.hxx"
      21             : #include "IgnoreTContext.hxx"
      22             : #include "MutableAttrList.hxx"
      23             : #include "xmloff/xmlnmspe.hxx"
      24             : #include "ActionMapTypesOOo.hxx"
      25             : #include "ElemTransformerAction.hxx"
      26             : #include "TransformerActions.hxx"
      27             : #include "TransformerBase.hxx"
      28             : 
      29             : using ::rtl::OUString;
      30             : 
      31             : using namespace ::com::sun::star::uno;
      32             : using namespace ::com::sun::star::xml::sax;
      33             : using namespace ::xmloff::token;
      34             : 
      35           0 : TYPEINIT1( XMLControlOOoTransformerContext, XMLTransformerContext );
      36             : 
      37           0 : XMLControlOOoTransformerContext::XMLControlOOoTransformerContext(
      38             :         XMLTransformerBase& rImp,
      39             :         const OUString& rQName ) :
      40           0 :     XMLTransformerContext( rImp, rQName )
      41             : {
      42           0 : }
      43             : 
      44           0 : XMLControlOOoTransformerContext::~XMLControlOOoTransformerContext()
      45             : {
      46           0 : }
      47             : 
      48           0 : void XMLControlOOoTransformerContext::StartElement(
      49             :     const Reference< XAttributeList >& rAttrList )
      50             : {
      51           0 :     m_xAttrList = new XMLMutableAttributeList( rAttrList, sal_True );
      52           0 : }
      53             : 
      54           0 : XMLTransformerContext *XMLControlOOoTransformerContext::CreateChildContext(
      55             :         sal_uInt16 /*nPrefix*/,
      56             :         const OUString& /*rLocalName*/,
      57             :         const OUString& rQName,
      58             :         const Reference< XAttributeList >& rAttrList )
      59             : {
      60           0 :     XMLTransformerContext *pContext = 0;
      61             : 
      62           0 :     if( m_aElemQName.isEmpty() )
      63             :     {
      64           0 :         pContext = new XMLIgnoreTransformerContext( GetTransformer(),
      65             :                                                     rQName,
      66           0 :                                                     sal_False, sal_False );
      67           0 :         m_aElemQName = rQName;
      68           0 :         static_cast< XMLMutableAttributeList * >( m_xAttrList.get() )
      69           0 :                 ->AppendAttributeList( rAttrList );
      70           0 :         GetTransformer().ProcessAttrList( m_xAttrList,
      71             :                                           OOO_FORM_CONTROL_ACTIONS,
      72           0 :                                           sal_False );
      73           0 :         GetTransformer().GetDocHandler()->startElement( m_aElemQName,
      74           0 :                                                         m_xAttrList );
      75             :     }
      76             :     else
      77             :     {
      78           0 :         pContext = new XMLIgnoreTransformerContext( GetTransformer(),
      79             :                                                     rQName,
      80           0 :                                                     sal_True, sal_True );
      81             :     }
      82           0 :     return pContext;
      83             : }
      84             : 
      85           0 : void XMLControlOOoTransformerContext::EndElement()
      86             : {
      87           0 :     GetTransformer().GetDocHandler()->endElement( m_aElemQName );
      88           0 : }
      89             : 
      90           0 : void XMLControlOOoTransformerContext::Characters( const OUString& rChars )
      91             : {
      92             :     // ignore
      93           0 :     if( !m_aElemQName.isEmpty() )
      94           0 :         XMLTransformerContext::Characters( rChars );
      95           0 : }
      96             : 
      97             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10