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

Generated by: LCOV version 1.10