LCOV - code coverage report
Current view: top level - oox/source/core - fragmenthandler.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 29 41 70.7 %
Date: 2015-06-13 12:38:46 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             : using namespace ::com::sun::star::io;
      28             : using namespace ::com::sun::star::uno;
      29             : using namespace ::com::sun::star::xml::sax;
      30             : 
      31       12059 : FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
      32             :     mrFilter( rFilter ),
      33             :     maFragmentPath( rFragmentPath ),
      34       12059 :     mxRelations( xRelations )
      35             : {
      36       12059 : }
      37             : 
      38        8136 : FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
      39        8136 :     FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) ) )
      40             : {
      41        8136 : }
      42             : 
      43        3923 : FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
      44        3923 :     FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, xRelations ) ) )
      45             : {
      46        3923 : }
      47             : 
      48       12643 : FragmentHandler::~FragmentHandler()
      49             : {
      50       12643 : }
      51             : 
      52             : // com.sun.star.xml.sax.XFastDocumentHandler interface ------------------------
      53             : 
      54        2497 : void FragmentHandler::startDocument() throw( SAXException, RuntimeException, std::exception )
      55             : {
      56        2497 : }
      57             : 
      58        2497 : void FragmentHandler::endDocument() throw( SAXException, RuntimeException, std::exception )
      59             : {
      60        2497 : }
      61             : 
      62        3950 : void FragmentHandler::setDocumentLocator( const Reference< XLocator >& rxLocator ) throw( SAXException, RuntimeException, std::exception )
      63             : {
      64        3950 :     implSetLocator( rxLocator );
      65        3950 : }
      66             : 
      67             : // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
      68             : 
      69        2497 : void FragmentHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
      70             : {
      71        2497 : }
      72             : 
      73           0 : void FragmentHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
      74             : {
      75           0 : }
      76             : 
      77        2497 : void FragmentHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException, std::exception )
      78             : {
      79        2497 : }
      80             : 
      81           0 : void FragmentHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException, std::exception )
      82             : {
      83           0 : }
      84             : 
      85           0 : Reference< XFastContextHandler > FragmentHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
      86             : {
      87           0 :     return 0;
      88             : }
      89             : 
      90         249 : Reference< XFastContextHandler > FragmentHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
      91             : {
      92         249 :     return 0;
      93             : }
      94             : 
      95        1024 : void FragmentHandler::characters( const OUString& ) throw( SAXException, RuntimeException, std::exception )
      96             : {
      97        1024 : }
      98             : 
      99           0 : void FragmentHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException )
     100             : {
     101           0 : }
     102             : 
     103           0 : void FragmentHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
     104             : {
     105           0 : }
     106             : 
     107             : // XML stream handling --------------------------------------------------------
     108             : 
     109        5367 : Reference< XInputStream > FragmentHandler::openFragmentStream() const
     110             : {
     111        5367 :     return getFilter().openInputStream( getFragmentPath() );
     112             : }
     113             : 
     114             : // binary records -------------------------------------------------------------
     115             : 
     116           0 : const RecordInfo* FragmentHandler::getRecordInfos() const
     117             : {
     118             :     // default: no support for binary records
     119           0 :     return 0;
     120             : }
     121             : 
     122             : } // namespace core
     123         246 : } // namespace oox
     124             : 
     125             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11