LCOV - code coverage report
Current view: top level - unoxml/source/dom - processinginstruction.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 42 46 91.3 %
Date: 2014-11-03 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          64 :     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           4 :     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           4 :         return CNode::appendChild(newChild);
      79             :     }
      80           4 :     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           4 :         return CNode::cloneNode(deep);
      84             :     }
      85           2 :     virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes()
      86             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      87             :     {
      88           2 :         return CNode::getAttributes();
      89             :     }
      90           2 :     virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes()
      91             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      92             :     {
      93           2 :         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           2 :     virtual OUString SAL_CALL getLocalName()
     106             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     107             :     {
     108           2 :         return CNode::getLocalName();
     109             :     }
     110           2 :     virtual OUString SAL_CALL getNamespaceURI()
     111             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     112             :     {
     113           2 :         return CNode::getNamespaceURI();
     114             :     }
     115           2 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling()
     116             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     117             :     {
     118           2 :         return CNode::getNextSibling();
     119             :     }
     120           2 :     virtual css::xml::dom::NodeType SAL_CALL getNodeType()
     121             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     122             :     {
     123           2 :         return CNode::getNodeType();
     124             :     }
     125          12 :     virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument()
     126             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     127             :     {
     128          12 :         return CNode::getOwnerDocument();
     129             :     }
     130           4 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode()
     131             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     132             :     {
     133           4 :         return CNode::getParentNode();
     134             :     }
     135           2 :     virtual OUString SAL_CALL getPrefix()
     136             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     137             :     {
     138           2 :         return CNode::getPrefix();
     139             :     }
     140           2 :     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling()
     141             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     142             :     {
     143           2 :         return CNode::getPreviousSibling();
     144             :     }
     145           2 :     virtual sal_Bool SAL_CALL hasAttributes()
     146             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     147             :     {
     148           2 :         return CNode::hasAttributes();
     149             :     }
     150           6 :     virtual sal_Bool SAL_CALL hasChildNodes()
     151             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     152             :     {
     153           6 :         return CNode::hasChildNodes();
     154             :     }
     155           2 :     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           2 :         return CNode::insertBefore(newChild, refChild);
     160             :     }
     161           2 :     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
     162             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     163             :     {
     164           2 :         return CNode::isSupported(feature, ver);
     165             :     }
     166           2 :     virtual void SAL_CALL normalize()
     167             :         throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     168             :     {
     169           2 :         CNode::normalize();
     170           2 :     }
     171           4 :     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           4 :         return CNode::removeChild(oldChild);
     175             :     }
     176           2 :     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           2 :         return CNode::replaceChild(newChild, oldChild);
     181             :     }
     182           2 :     virtual void SAL_CALL setPrefix(const OUString& prefix)
     183             :         throw (css::uno::RuntimeException, css::xml::dom::DOMException, std::exception) SAL_OVERRIDE
     184             :     {
     185           2 :         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.10