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_ENTITY_HXX
21 : : #define DOM_ENTITY_HXX
22 : :
23 : : #include <libxml/tree.h>
24 : : #include <libxml/entities.h>
25 : :
26 : : #include <sal/types.h>
27 : :
28 : : #include <com/sun/star/uno/Reference.h>
29 : : #include <com/sun/star/xml/dom/XEntity.hpp>
30 : :
31 : : #include <node.hxx>
32 : :
33 : :
34 : : using ::rtl::OUString;
35 : : using namespace com::sun::star::uno;
36 : : using namespace com::sun::star::xml::dom;
37 : :
38 : : namespace DOM
39 : : {
40 : : typedef ::cppu::ImplInheritanceHelper1< CNode, XEntity > CEntity_Base;
41 : :
42 [ # # ]: 0 : class CEntity
43 : : : public CEntity_Base
44 : : {
45 : : private:
46 : : friend class CDocument;
47 : :
48 : : private:
49 : : xmlEntityPtr m_aEntityPtr;
50 : :
51 : : protected:
52 : : CEntity(CDocument const& rDocument, ::osl::Mutex const& rMutex,
53 : : xmlEntityPtr const pEntity);
54 : :
55 : : public:
56 : : virtual bool IsChildTypeAllowed(NodeType const nodeType);
57 : :
58 : : /**
59 : : For unparsed entities, the name of the notation for the entity.
60 : : */
61 : : virtual OUString SAL_CALL getNotationName() throw (RuntimeException);
62 : :
63 : : /**
64 : : The public identifier associated with the entity, if specified.
65 : : */
66 : : virtual OUString SAL_CALL getPublicId() throw (RuntimeException);
67 : :
68 : : /**
69 : : The system identifier associated with the entity, if specified.
70 : : */
71 : : virtual OUString SAL_CALL getSystemId() throw (RuntimeException);
72 : :
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 : 0 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
81 : : throw (RuntimeException, DOMException)
82 : : {
83 : 0 : return CNode::appendChild(newChild);
84 : : }
85 : 0 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
86 : : throw (RuntimeException)
87 : : {
88 : 0 : return CNode::cloneNode(deep);
89 : : }
90 : 0 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
91 : : throw (RuntimeException)
92 : : {
93 : 0 : return CNode::getAttributes();
94 : : }
95 : 0 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
96 : : throw (RuntimeException)
97 : : {
98 : 0 : 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 : 0 : virtual OUString SAL_CALL getLocalName()
111 : : throw (RuntimeException)
112 : : {
113 : 0 : return CNode::getLocalName();
114 : : }
115 : 0 : virtual OUString SAL_CALL getNamespaceURI()
116 : : throw (RuntimeException)
117 : : {
118 : 0 : return CNode::getNamespaceURI();
119 : : }
120 : 0 : virtual Reference< XNode > SAL_CALL getNextSibling()
121 : : throw (RuntimeException)
122 : : {
123 : 0 : return CNode::getNextSibling();
124 : : }
125 : 0 : virtual NodeType SAL_CALL getNodeType()
126 : : throw (RuntimeException)
127 : : {
128 : 0 : return CNode::getNodeType();
129 : : }
130 : 0 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
131 : : throw (RuntimeException)
132 : : {
133 : 0 : return CNode::getOwnerDocument();
134 : : }
135 : 0 : virtual Reference< XNode > SAL_CALL getParentNode()
136 : : throw (RuntimeException)
137 : : {
138 : 0 : return CNode::getParentNode();
139 : : }
140 : 0 : virtual OUString SAL_CALL getPrefix()
141 : : throw (RuntimeException)
142 : : {
143 : 0 : return CNode::getPrefix();
144 : : }
145 : 0 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
146 : : throw (RuntimeException)
147 : : {
148 : 0 : return CNode::getPreviousSibling();
149 : : }
150 : 0 : virtual sal_Bool SAL_CALL hasAttributes()
151 : : throw (RuntimeException)
152 : : {
153 : 0 : return CNode::hasAttributes();
154 : : }
155 : 0 : virtual sal_Bool SAL_CALL hasChildNodes()
156 : : throw (RuntimeException)
157 : : {
158 : 0 : return CNode::hasChildNodes();
159 : : }
160 : 0 : virtual Reference< XNode > SAL_CALL insertBefore(
161 : : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
162 : : throw (RuntimeException, DOMException)
163 : : {
164 : 0 : return CNode::insertBefore(newChild, refChild);
165 : : }
166 : 0 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
167 : : throw (RuntimeException)
168 : : {
169 : 0 : return CNode::isSupported(feature, ver);
170 : : }
171 : 0 : virtual void SAL_CALL normalize()
172 : : throw (RuntimeException)
173 : : {
174 : 0 : CNode::normalize();
175 : 0 : }
176 : 0 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
177 : : throw (RuntimeException, DOMException)
178 : : {
179 : 0 : return CNode::removeChild(oldChild);
180 : : }
181 : 0 : virtual Reference< XNode > SAL_CALL replaceChild(
182 : : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
183 : : throw (RuntimeException, DOMException)
184 : : {
185 : 0 : return CNode::replaceChild(newChild, oldChild);
186 : : }
187 : 0 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
188 : : throw (RuntimeException, DOMException)
189 : : {
190 : 0 : return CNode::setNodeValue(nodeValue);
191 : : }
192 : 0 : virtual void SAL_CALL setPrefix(const OUString& prefix)
193 : : throw (RuntimeException, DOMException)
194 : : {
195 : 0 : return CNode::setPrefix(prefix);
196 : : }
197 : :
198 : :
199 : : };
200 : : }
201 : :
202 : : #endif
203 : :
204 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|