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