LCOV - code coverage report
Current view: top level - unoxml/source/dom - documentfragment.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_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           8 :     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           2 :     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           2 :         return CNode::appendChild(newChild);
      58             :     }
      59           2 :     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           2 :         return CNode::cloneNode(deep);
      63             :     }
      64           1 :     virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes()
      65             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      66             :     {
      67           1 :         return CNode::getAttributes();
      68             :     }
      69           1 :     virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes()
      70             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      71             :     {
      72           1 :         return CNode::getChildNodes();
      73             :     }
      74           6 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild()
      75             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      76             :     {
      77           6 :         return CNode::getFirstChild();
      78             :     }
      79           4 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild()
      80             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      81             :     {
      82           4 :         return CNode::getLastChild();
      83             :     }
      84           1 :     virtual OUString SAL_CALL getLocalName()
      85             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      86             :     {
      87           1 :         return CNode::getLocalName();
      88             :     }
      89           1 :     virtual OUString SAL_CALL getNamespaceURI()
      90             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      91             :     {
      92           1 :         return CNode::getNamespaceURI();
      93             :     }
      94           1 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling()
      95             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      96             :     {
      97           1 :         return CNode::getNextSibling();
      98             :     }
      99           1 :     virtual css::xml::dom::NodeType SAL_CALL getNodeType()
     100             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     101             :     {
     102           1 :         return CNode::getNodeType();
     103             :     }
     104          13 :     virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument()
     105             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     106             :     {
     107          13 :         return CNode::getOwnerDocument();
     108             :     }
     109           1 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode()
     110             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     111             :     {
     112           1 :         return CNode::getParentNode();
     113             :     }
     114           1 :     virtual OUString SAL_CALL getPrefix()
     115             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     116             :     {
     117           1 :         return CNode::getPrefix();
     118             :     }
     119           1 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling()
     120             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     121             :     {
     122           1 :         return CNode::getPreviousSibling();
     123             :     }
     124           1 :     virtual sal_Bool SAL_CALL hasAttributes()
     125             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     126             :     {
     127           1 :         return CNode::hasAttributes();
     128             :     }
     129           4 :     virtual sal_Bool SAL_CALL hasChildNodes()
     130             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     131             :     {
     132           4 :         return CNode::hasChildNodes();
     133             :     }
     134           4 :     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           4 :         return CNode::insertBefore(newChild, refChild);
     139             :     }
     140           1 :     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
     141             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     142             :     {
     143           1 :         return CNode::isSupported(feature, ver);
     144             :     }
     145           1 :     virtual void SAL_CALL normalize()
     146             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     147             :     {
     148           1 :         CNode::normalize();
     149           1 :     }
     150           3 :     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           3 :         return CNode::removeChild(oldChild);
     154             :     }
     155           5 :     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           5 :         return CNode::replaceChild(newChild, oldChild);
     160             :     }
     161           1 :     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
     162             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     163             :     {
     164           1 :         return CNode::setNodeValue(nodeValue);
     165             :     }
     166           1 :     virtual void SAL_CALL setPrefix(const OUString& prefix)
     167             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     168             :     {
     169           1 :         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.11