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

Generated by: LCOV version 1.11