LCOV - code coverage report
Current view: top level - unoxml/source/dom - entityreference.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 48 48 100.0 %
Date: 2015-06-13 12:38:46 Functions: 25 25 100.0 %
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 INCLUDED_UNOXML_SOURCE_DOM_ENTITYREFERENCE_HXX
      21             : #define INCLUDED_UNOXML_SOURCE_DOM_ENTITYREFERENCE_HXX
      22             : 
      23             : #include <libxml/tree.h>
      24             : 
      25             : #include <com/sun/star/uno/Reference.h>
      26             : #include <com/sun/star/xml/dom/XEntityReference.hpp>
      27             : 
      28             : #include <node.hxx>
      29             : 
      30             : namespace DOM
      31             : {
      32             :     typedef ::cppu::ImplInheritanceHelper1< CNode, css::xml::dom::XEntityReference >
      33             :         CEntityReference_Base;
      34             : 
      35          10 :     class CEntityReference
      36             :         : public CEntityReference_Base
      37             :     {
      38             :     private:
      39             :         friend class CDocument;
      40             : 
      41             :     protected:
      42             :         CEntityReference(
      43             :             CDocument const& rDocument, ::osl::Mutex const& rMutex,
      44             :             xmlNodePtr const pNode);
      45             : 
      46             :     public:
      47             :         virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType) SAL_OVERRIDE;
      48             : 
      49             :         // ---- resolve uno inheritance problems...
      50             :         // overrides for XNode base
      51             :         virtual OUString SAL_CALL getNodeName()
      52             :             throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      53             :         virtual OUString SAL_CALL getNodeValue()
      54             :             throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      55             :     // --- delegation for XNode base.
      56           2 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild)
      57             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
      58             :     {
      59           2 :         return CNode::appendChild(newChild);
      60             :     }
      61           2 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep)
      62             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      63             :     {
      64           2 :         return CNode::cloneNode(deep);
      65             :     }
      66           1 :     virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes()
      67             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      68             :     {
      69           1 :         return CNode::getAttributes();
      70             :     }
      71           1 :     virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes()
      72             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      73             :     {
      74           1 :         return CNode::getChildNodes();
      75             :     }
      76           5 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild()
      77             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      78             :     {
      79           5 :         return CNode::getFirstChild();
      80             :     }
      81           4 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild()
      82             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      83             :     {
      84           4 :         return CNode::getLastChild();
      85             :     }
      86           1 :     virtual OUString SAL_CALL getLocalName()
      87             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      88             :     {
      89           1 :         return CNode::getLocalName();
      90             :     }
      91           1 :     virtual OUString SAL_CALL getNamespaceURI()
      92             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      93             :     {
      94           1 :         return CNode::getNamespaceURI();
      95             :     }
      96           1 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling()
      97             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      98             :     {
      99           1 :         return CNode::getNextSibling();
     100             :     }
     101           1 :     virtual css::xml::dom::NodeType SAL_CALL getNodeType()
     102             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     103             :     {
     104           1 :         return CNode::getNodeType();
     105             :     }
     106          15 :     virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument()
     107             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     108             :     {
     109          15 :         return CNode::getOwnerDocument();
     110             :     }
     111           4 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode()
     112             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     113             :     {
     114           4 :         return CNode::getParentNode();
     115             :     }
     116           1 :     virtual OUString SAL_CALL getPrefix()
     117             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     118             :     {
     119           1 :         return CNode::getPrefix();
     120             :     }
     121           1 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling()
     122             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     123             :     {
     124           1 :         return CNode::getPreviousSibling();
     125             :     }
     126           1 :     virtual sal_Bool SAL_CALL hasAttributes()
     127             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     128             :     {
     129           1 :         return CNode::hasAttributes();
     130             :     }
     131           3 :     virtual sal_Bool SAL_CALL hasChildNodes()
     132             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     133             :     {
     134           3 :         return CNode::hasChildNodes();
     135             :     }
     136           4 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
     137             :             const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild)
     138             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     139             :     {
     140           4 :         return CNode::insertBefore(newChild, refChild);
     141             :     }
     142           1 :     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
     143             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     144             :     {
     145           1 :         return CNode::isSupported(feature, ver);
     146             :     }
     147           1 :     virtual void SAL_CALL normalize()
     148             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     149             :     {
     150           1 :         CNode::normalize();
     151           1 :     }
     152           3 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild)
     153             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     154             :     {
     155           3 :         return CNode::removeChild(oldChild);
     156             :     }
     157           5 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
     158             :             const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild)
     159             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     160             :     {
     161           5 :         return CNode::replaceChild(newChild, oldChild);
     162             :     }
     163           1 :     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
     164             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     165             :     {
     166           1 :         return CNode::setNodeValue(nodeValue);
     167             :     }
     168           1 :     virtual void SAL_CALL setPrefix(const OUString& prefix)
     169             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     170             :     {
     171           1 :         return CNode::setPrefix(prefix);
     172             :     }
     173             : 
     174             :     };
     175             : }
     176             : #endif
     177             : 
     178             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11