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

Generated by: LCOV version 1.10