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

Generated by: LCOV version 1.10