update dev300-m58
[ooovba.git] / unoxml / source / dom / processinginstruction.hxx
blob780fe557e1d82c5dad2174f0a81cadf1e0b3918a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: processinginstruction.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _PROCESSINGINSTRUCTION_HXX
32 #define _PROCESSINGINSTRUCTION_HXX
34 #include <com/sun/star/uno/Reference.h>
35 #include <com/sun/star/uno/Exception.hpp>
36 #include <com/sun/star/xml/dom/XProcessingInstruction.hpp>
37 #include "node.hxx"
38 #include <libxml/tree.h>
40 using ::rtl::OUString;
41 using namespace com::sun::star::uno;
42 using namespace com::sun::star::xml::dom;
44 namespace DOM
46 class CProcessingInstruction : public cppu::ImplInheritanceHelper1< CNode, XProcessingInstruction >
48 friend class CNode;
50 protected:
51 CProcessingInstruction(const xmlNodePtr aNodePtr);
53 public:
55 virtual void SAL_CALL saxify(
56 const Reference< XDocumentHandler >& i_xHandler);
58 /**
59 The content of this processing instruction.
61 virtual OUString SAL_CALL getData() throw (RuntimeException);
63 /**
64 The target of this processing instruction.
66 virtual OUString SAL_CALL getTarget() throw (RuntimeException);
68 /**
69 The content of this processing instruction.
71 virtual void SAL_CALL setData(const OUString& data) throw (RuntimeException, DOMException);
73 // ---- resolve uno inheritance problems...
74 // overrides for XNode base
75 virtual OUString SAL_CALL getNodeName()
76 throw (RuntimeException);
77 virtual OUString SAL_CALL getNodeValue()
78 throw (RuntimeException);
79 // --- delegation for XNde base.
80 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
81 throw (RuntimeException, DOMException)
83 return CNode::appendChild(newChild);
85 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
86 throw (RuntimeException)
88 return CNode::cloneNode(deep);
90 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
91 throw (RuntimeException)
93 return CNode::getAttributes();
95 virtual Reference< XNodeList > SAL_CALL getChildNodes()
96 throw (RuntimeException)
98 return CNode::getChildNodes();
100 virtual Reference< XNode > SAL_CALL getFirstChild()
101 throw (RuntimeException)
103 return CNode::getFirstChild();
105 virtual Reference< XNode > SAL_CALL getLastChild()
106 throw (RuntimeException)
108 return CNode::getLastChild();
110 virtual OUString SAL_CALL getLocalName()
111 throw (RuntimeException)
113 return CNode::getLocalName();
115 virtual OUString SAL_CALL getNamespaceURI()
116 throw (RuntimeException)
118 return CNode::getNamespaceURI();
120 virtual Reference< XNode > SAL_CALL getNextSibling()
121 throw (RuntimeException)
123 return CNode::getNextSibling();
125 virtual NodeType SAL_CALL getNodeType()
126 throw (RuntimeException)
128 return CNode::getNodeType();
130 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
131 throw (RuntimeException)
133 return CNode::getOwnerDocument();
135 virtual Reference< XNode > SAL_CALL getParentNode()
136 throw (RuntimeException)
138 return CNode::getParentNode();
140 virtual OUString SAL_CALL getPrefix()
141 throw (RuntimeException)
143 return CNode::getPrefix();
145 virtual Reference< XNode > SAL_CALL getPreviousSibling()
146 throw (RuntimeException)
148 return CNode::getPreviousSibling();
150 virtual sal_Bool SAL_CALL hasAttributes()
151 throw (RuntimeException)
153 return CNode::hasAttributes();
155 virtual sal_Bool SAL_CALL hasChildNodes()
156 throw (RuntimeException)
158 return CNode::hasChildNodes();
160 virtual Reference< XNode > SAL_CALL insertBefore(
161 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
162 throw (RuntimeException, DOMException)
164 return CNode::insertBefore(newChild, refChild);
166 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
167 throw (RuntimeException)
169 return CNode::isSupported(feature, ver);
171 virtual void SAL_CALL normalize()
172 throw (RuntimeException)
174 CNode::normalize();
176 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
177 throw (RuntimeException, DOMException)
179 return CNode::removeChild(oldChild);
181 virtual Reference< XNode > SAL_CALL replaceChild(
182 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
183 throw (RuntimeException, DOMException)
185 return CNode::replaceChild(newChild, oldChild);
187 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
188 throw (RuntimeException, DOMException)
190 return CNode::setNodeValue(nodeValue);
192 virtual void SAL_CALL setPrefix(const OUString& prefix)
193 throw (RuntimeException, DOMException)
195 return CNode::setPrefix(prefix);
201 #endif