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_DOCUMENTTYPE_HXX
21 : : #define DOM_DOCUMENTTYPE_HXX
22 : :
23 : : #include <libxml/tree.h>
24 : :
25 : : #include <sal/types.h>
26 : :
27 : : #include <com/sun/star/uno/Reference.h>
28 : : #include <com/sun/star/xml/dom/XDocumentType.hpp>
29 : : #include <com/sun/star/xml/dom/XNodeList.hpp>
30 : : #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
31 : :
32 : : #include <node.hxx>
33 : :
34 : :
35 : : using ::rtl::OUString;
36 : : using namespace com::sun::star::uno;
37 : : using namespace com::sun::star::xml::dom;
38 : :
39 : : namespace DOM
40 : : {
41 : : typedef ::cppu::ImplInheritanceHelper1< CNode, XDocumentType >
42 : : CDocumentType_Base;
43 : :
44 [ # # ]: 0 : class CDocumentType
45 : : : public CDocumentType_Base
46 : : {
47 : : private:
48 : : friend class CDocument;
49 : :
50 : : private:
51 : : xmlDtdPtr m_aDtdPtr;
52 : :
53 : : protected:
54 : : CDocumentType(CDocument const& rDocument, ::osl::Mutex const& rMutex,
55 : : xmlDtdPtr const pDtd);
56 : :
57 : : public:
58 : : /**
59 : : A NamedNodeMap containing the general entities, both external and
60 : : internal, declared in the DTD.
61 : : */
62 : : virtual Reference< XNamedNodeMap > SAL_CALL getEntities() throw (RuntimeException);
63 : :
64 : : /**
65 : : The internal subset as a string, or null if there is none.
66 : : */
67 : : virtual OUString SAL_CALL getInternalSubset() throw (RuntimeException);
68 : :
69 : : /**
70 : : The name of DTD; i.e., the name immediately following the DOCTYPE
71 : : keyword.
72 : : */
73 : : virtual OUString SAL_CALL getName() throw (RuntimeException);
74 : :
75 : : /**
76 : : A NamedNodeMap containing the notations declared in the DTD.
77 : : */
78 : : virtual Reference< XNamedNodeMap > SAL_CALL getNotations() throw (RuntimeException);
79 : :
80 : : /**
81 : : The public identifier of the external subset.
82 : : */
83 : : virtual OUString SAL_CALL getPublicId() throw (RuntimeException);
84 : :
85 : : /**
86 : : The system identifier of the external subset.
87 : : */
88 : : virtual OUString SAL_CALL getSystemId() throw (RuntimeException);
89 : :
90 : : // ---- resolve uno inheritance problems...
91 : : // overrides for XNode base
92 : : virtual OUString SAL_CALL getNodeName()
93 : : throw (RuntimeException);
94 : : virtual OUString SAL_CALL getNodeValue()
95 : : throw (RuntimeException);
96 : : // --- delegation for XNde base.
97 : 0 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
98 : : throw (RuntimeException, DOMException)
99 : : {
100 : 0 : return CNode::appendChild(newChild);
101 : : }
102 : 0 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
103 : : throw (RuntimeException)
104 : : {
105 : 0 : return CNode::cloneNode(deep);
106 : : }
107 : 0 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
108 : : throw (RuntimeException)
109 : : {
110 : 0 : return CNode::getAttributes();
111 : : }
112 : 0 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
113 : : throw (RuntimeException)
114 : : {
115 : 0 : return CNode::getChildNodes();
116 : : }
117 : 0 : virtual Reference< XNode > SAL_CALL getFirstChild()
118 : : throw (RuntimeException)
119 : : {
120 : 0 : return CNode::getFirstChild();
121 : : }
122 : 0 : virtual Reference< XNode > SAL_CALL getLastChild()
123 : : throw (RuntimeException)
124 : : {
125 : 0 : return CNode::getLastChild();
126 : : }
127 : 0 : virtual OUString SAL_CALL getLocalName()
128 : : throw (RuntimeException)
129 : : {
130 : 0 : return CNode::getLocalName();
131 : : }
132 : 0 : virtual OUString SAL_CALL getNamespaceURI()
133 : : throw (RuntimeException)
134 : : {
135 : 0 : return CNode::getNamespaceURI();
136 : : }
137 : 0 : virtual Reference< XNode > SAL_CALL getNextSibling()
138 : : throw (RuntimeException)
139 : : {
140 : 0 : return CNode::getNextSibling();
141 : : }
142 : 0 : virtual NodeType SAL_CALL getNodeType()
143 : : throw (RuntimeException)
144 : : {
145 : 0 : return CNode::getNodeType();
146 : : }
147 : 0 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
148 : : throw (RuntimeException)
149 : : {
150 : 0 : return CNode::getOwnerDocument();
151 : : }
152 : 0 : virtual Reference< XNode > SAL_CALL getParentNode()
153 : : throw (RuntimeException)
154 : : {
155 : 0 : return CNode::getParentNode();
156 : : }
157 : 0 : virtual OUString SAL_CALL getPrefix()
158 : : throw (RuntimeException)
159 : : {
160 : 0 : return CNode::getPrefix();
161 : : }
162 : 0 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
163 : : throw (RuntimeException)
164 : : {
165 : 0 : return CNode::getPreviousSibling();
166 : : }
167 : 0 : virtual sal_Bool SAL_CALL hasAttributes()
168 : : throw (RuntimeException)
169 : : {
170 : 0 : return CNode::hasAttributes();
171 : : }
172 : 0 : virtual sal_Bool SAL_CALL hasChildNodes()
173 : : throw (RuntimeException)
174 : : {
175 : 0 : return CNode::hasChildNodes();
176 : : }
177 : 0 : virtual Reference< XNode > SAL_CALL insertBefore(
178 : : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
179 : : throw (RuntimeException, DOMException)
180 : : {
181 : 0 : return CNode::insertBefore(newChild, refChild);
182 : : }
183 : 0 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
184 : : throw (RuntimeException)
185 : : {
186 : 0 : return CNode::isSupported(feature, ver);
187 : : }
188 : 0 : virtual void SAL_CALL normalize()
189 : : throw (RuntimeException)
190 : : {
191 : 0 : CNode::normalize();
192 : 0 : }
193 : 0 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
194 : : throw (RuntimeException, DOMException)
195 : : {
196 : 0 : return CNode::removeChild(oldChild);
197 : : }
198 : 0 : virtual Reference< XNode > SAL_CALL replaceChild(
199 : : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
200 : : throw (RuntimeException, DOMException)
201 : : {
202 : 0 : return CNode::replaceChild(newChild, oldChild);
203 : : }
204 : 0 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
205 : : throw (RuntimeException, DOMException)
206 : : {
207 : 0 : return CNode::setNodeValue(nodeValue);
208 : : }
209 : 0 : virtual void SAL_CALL setPrefix(const OUString& prefix)
210 : : throw (RuntimeException, DOMException)
211 : : {
212 : 0 : return CNode::setPrefix(prefix);
213 : : }
214 : :
215 : : };
216 : : }
217 : : #endif
218 : :
219 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|