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

Generated by: LCOV version 1.10