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