LCOV - code coverage report
Current view: top level - unoxml/source/dom - comment.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 65 69 94.2 %
Date: 2012-08-25 Functions: 31 33 93.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

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

Generated by: LCOV version 1.10