LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/oox/source/core - fragmenthandler.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 29 41 70.7 %
Date: 2013-07-09 Functions: 14 21 66.7 %
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 "oox/core/fragmenthandler.hxx"
      21             : 
      22             : #include "oox/core/xmlfilterbase.hxx"
      23             : 
      24             : namespace oox {
      25             : namespace core {
      26             : 
      27             : // ============================================================================
      28             : 
      29             : using namespace ::com::sun::star::io;
      30             : using namespace ::com::sun::star::uno;
      31             : using namespace ::com::sun::star::xml::sax;
      32             : 
      33             : 
      34             : // ============================================================================
      35             : 
      36         455 : FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
      37             :     mrFilter( rFilter ),
      38             :     maFragmentPath( rFragmentPath ),
      39         455 :     mxRelations( xRelations )
      40             : {
      41         455 : }
      42             : 
      43             : // ============================================================================
      44             : 
      45         223 : FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
      46         223 :     FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) ) )
      47             : {
      48         223 : }
      49             : 
      50         232 : FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
      51         232 :     FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, xRelations ) ) )
      52             : {
      53         232 : }
      54             : 
      55         623 : FragmentHandler::~FragmentHandler()
      56             : {
      57         623 : }
      58             : 
      59             : // com.sun.star.xml.sax.XFastDocumentHandler interface ------------------------
      60             : 
      61         134 : void FragmentHandler::startDocument() throw( SAXException, RuntimeException )
      62             : {
      63         134 : }
      64             : 
      65         134 : void FragmentHandler::endDocument() throw( SAXException, RuntimeException )
      66             : {
      67         134 : }
      68             : 
      69         284 : void FragmentHandler::setDocumentLocator( const Reference< XLocator >& rxLocator ) throw( SAXException, RuntimeException )
      70             : {
      71         284 :     implSetLocator( rxLocator );
      72         284 : }
      73             : 
      74             : // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
      75             : 
      76         134 : void FragmentHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
      77             : {
      78         134 : }
      79             : 
      80           0 : void FragmentHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
      81             : {
      82           0 : }
      83             : 
      84         134 : void FragmentHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException )
      85             : {
      86         134 : }
      87             : 
      88           0 : void FragmentHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
      89             : {
      90           0 : }
      91             : 
      92           0 : Reference< XFastContextHandler > FragmentHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
      93             : {
      94           0 :     return 0;
      95             : }
      96             : 
      97          16 : Reference< XFastContextHandler > FragmentHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
      98             : {
      99          16 :     return 0;
     100             : }
     101             : 
     102          50 : void FragmentHandler::characters( const OUString& ) throw( SAXException, RuntimeException )
     103             : {
     104          50 : }
     105             : 
     106           0 : void FragmentHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException )
     107             : {
     108           0 : }
     109             : 
     110           0 : void FragmentHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
     111             : {
     112           0 : }
     113             : 
     114             : // XML stream handling --------------------------------------------------------
     115             : 
     116         382 : Reference< XInputStream > FragmentHandler::openFragmentStream() const
     117             : {
     118         382 :     return getFilter().openInputStream( getFragmentPath() );
     119             : }
     120             : 
     121             : // binary records -------------------------------------------------------------
     122             : 
     123           0 : const RecordInfo* FragmentHandler::getRecordInfos() const
     124             : {
     125             :     // default: no support for binary records
     126           0 :     return 0;
     127             : }
     128             : 
     129             : // ============================================================================
     130             : 
     131             : } // namespace core
     132         141 : } // namespace oox
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10