LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/unoxml/source/dom - comment.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 65 69 94.2 %
Date: 2013-07-09 Functions: 31 33 93.9 %
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             : #ifndef DOM_COMMENT_HXX
      21             : #define DOM_COMMENT_HXX
      22             : 
      23             : #include <com/sun/star/uno/Reference.h>
      24             : #include <com/sun/star/xml/dom/XComment.hpp>
      25             : 
      26             : #include <characterdata.hxx>
      27             : 
      28             : 
      29             : using namespace com::sun::star::uno;
      30             : using namespace com::sun::star::xml::dom;
      31             : 
      32             : namespace DOM
      33             : {
      34             :     typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment >
      35             :         CComment_Base;
      36             : 
      37          18 :     class CComment
      38             :         : public CComment_Base
      39             :     {
      40             :     private:
      41             :         friend class CDocument;
      42             : 
      43             :     protected:
      44             :         CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
      45             :                 xmlNodePtr const pNode);
      46             : 
      47             :     public:
      48             : 
      49             :         virtual void saxify(const Reference< XDocumentHandler >& i_xHandler);
      50             : 
      51             :          // --- delegations for XCharacterData
      52           1 :         virtual void SAL_CALL appendData(const OUString& arg)
      53             :             throw (RuntimeException, DOMException)
      54             :         {
      55           1 :             CCharacterData::appendData(arg);
      56           1 :         }
      57           2 :         virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
      58             :             throw (RuntimeException, DOMException)
      59             :         {
      60           2 :             CCharacterData::deleteData(offset, count);
      61           1 :         }
      62           6 :         virtual OUString SAL_CALL getData() throw (RuntimeException)
      63             :         {
      64           6 :             return CCharacterData::getData();
      65             :         }
      66           1 :         virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
      67             :         {
      68           1 :             return CCharacterData::getLength();
      69             :         }
      70           2 :         virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
      71             :             throw (RuntimeException, DOMException)
      72             :         {
      73           2 :             CCharacterData::insertData(offset, arg);
      74           1 :         }
      75           2 :         virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
      76             :             throw (RuntimeException, DOMException)
      77             :         {
      78           2 :             CCharacterData::replaceData(offset, count, arg);
      79           1 :         }
      80           2 :         virtual void SAL_CALL setData(const OUString& data)
      81             :             throw (RuntimeException, DOMException)
      82             :         {
      83           2 :             CCharacterData::setData(data);
      84           2 :         }
      85           2 :         virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
      86             :             throw (RuntimeException, DOMException)
      87             :         {
      88           2 :             return CCharacterData::subStringData(offset, count);
      89             :         }
      90             : 
      91             : 
      92             :          // --- overrides for XNode base
      93             :         virtual OUString SAL_CALL getNodeName()
      94             :             throw (RuntimeException);
      95             :         virtual OUString SAL_CALL getNodeValue()
      96             :             throw (RuntimeException);
      97             : 
      98             :     // --- delegation for XNde base.
      99           2 :     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
     100             :         throw (RuntimeException, DOMException)
     101             :     {
     102           2 :         return CCharacterData::appendChild(newChild);
     103             :     }
     104           2 :     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
     105             :         throw (RuntimeException)
     106             :     {
     107           2 :         return CCharacterData::cloneNode(deep);
     108             :     }
     109           1 :     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
     110             :         throw (RuntimeException)
     111             :     {
     112           1 :         return CCharacterData::getAttributes();
     113             :     }
     114           1 :     virtual Reference< XNodeList > SAL_CALL getChildNodes()
     115             :         throw (RuntimeException)
     116             :     {
     117           1 :         return CCharacterData::getChildNodes();
     118             :     }
     119           0 :     virtual Reference< XNode > SAL_CALL getFirstChild()
     120             :         throw (RuntimeException)
     121             :     {
     122           0 :         return CCharacterData::getFirstChild();
     123             :     }
     124           0 :     virtual Reference< XNode > SAL_CALL getLastChild()
     125             :         throw (RuntimeException)
     126             :     {
     127           0 :         return CCharacterData::getLastChild();
     128             :     }
     129           1 :     virtual OUString SAL_CALL getLocalName()
     130             :         throw (RuntimeException)
     131             :     {
     132           1 :         return CCharacterData::getLocalName();
     133             :     }
     134           1 :     virtual OUString SAL_CALL getNamespaceURI()
     135             :         throw (RuntimeException)
     136             :     {
     137           1 :         return CCharacterData::getNamespaceURI();
     138             :     }
     139           1 :     virtual Reference< XNode > SAL_CALL getNextSibling()
     140             :         throw (RuntimeException)
     141             :     {
     142           1 :         return CCharacterData::getNextSibling();
     143             :     }
     144           1 :     virtual NodeType SAL_CALL getNodeType()
     145             :         throw (RuntimeException)
     146             :     {
     147           1 :         return CCharacterData::getNodeType();
     148             :     }
     149          25 :     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
     150             :         throw (RuntimeException)
     151             :     {
     152          25 :         return CCharacterData::getOwnerDocument();
     153             :     }
     154          12 :     virtual Reference< XNode > SAL_CALL getParentNode()
     155             :         throw (RuntimeException)
     156             :     {
     157          12 :         return CCharacterData::getParentNode();
     158             :     }
     159           1 :     virtual OUString SAL_CALL getPrefix()
     160             :         throw (RuntimeException)
     161             :     {
     162           1 :         return CCharacterData::getPrefix();
     163             :     }
     164           1 :     virtual Reference< XNode > SAL_CALL getPreviousSibling()
     165             :         throw (RuntimeException)
     166             :     {
     167           1 :         return CCharacterData::getPreviousSibling();
     168             :     }
     169           1 :     virtual sal_Bool SAL_CALL hasAttributes()
     170             :         throw (RuntimeException)
     171             :     {
     172           1 :         return CCharacterData::hasAttributes();
     173             :     }
     174           3 :     virtual sal_Bool SAL_CALL hasChildNodes()
     175             :         throw (RuntimeException)
     176             :     {
     177           3 :         return CCharacterData::hasChildNodes();
     178             :     }
     179           1 :     virtual Reference< XNode > SAL_CALL insertBefore(
     180             :             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
     181             :         throw (RuntimeException, DOMException)
     182             :     {
     183           1 :         return CCharacterData::insertBefore(newChild, refChild);
     184             :     }
     185           1 :     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
     186             :         throw (RuntimeException)
     187             :     {
     188           1 :         return CCharacterData::isSupported(feature, ver);
     189             :     }
     190           1 :     virtual void SAL_CALL normalize()
     191             :         throw (RuntimeException)
     192             :     {
     193           1 :         CCharacterData::normalize();
     194           1 :     }
     195           2 :     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
     196             :         throw (RuntimeException, DOMException)
     197             :     {
     198           2 :         return CCharacterData::removeChild(oldChild);
     199             :     }
     200           1 :     virtual Reference< XNode > SAL_CALL replaceChild(
     201             :             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
     202             :         throw (RuntimeException, DOMException)
     203             :     {
     204           1 :         return CCharacterData::replaceChild(newChild, oldChild);
     205             :     }
     206           1 :     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
     207             :         throw (RuntimeException, DOMException)
     208             :     {
     209           1 :         return CCharacterData::setNodeValue(nodeValue);
     210             :     }
     211           1 :     virtual void SAL_CALL setPrefix(const OUString& prefix)
     212             :         throw (RuntimeException, DOMException)
     213             :     {
     214           1 :         return CCharacterData::setPrefix(prefix);
     215             :     }
     216             : 
     217             :     };
     218             : }
     219             : 
     220             : #endif
     221             : 
     222             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10