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_ENTITYREFERENCE_HXX
21 : : #define DOM_ENTITYREFERENCE_HXX
22 : :
23 : : #include <libxml/tree.h>
24 : :
25 : : #include <com/sun/star/uno/Reference.h>
26 : : #include <com/sun/star/xml/dom/XEntityReference.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, XEntityReference >
38 : : CEntityReference_Base;
39 : :
40 [ - + ]: 20 : class CEntityReference
41 : : : public CEntityReference_Base
42 : : {
43 : : private:
44 : : friend class CDocument;
45 : :
46 : : protected:
47 : : CEntityReference(
48 : : CDocument const& rDocument, ::osl::Mutex const& rMutex,
49 : : xmlNodePtr const pNode);
50 : :
51 : : public:
52 : : virtual bool IsChildTypeAllowed(NodeType const nodeType);
53 : :
54 : : // ---- resolve uno inheritance problems...
55 : : // overrides for XNode base
56 : : virtual OUString SAL_CALL getNodeName()
57 : : throw (RuntimeException);
58 : : virtual OUString SAL_CALL getNodeValue()
59 : : throw (RuntimeException);
60 : : // --- delegation for XNde base.
61 : 4 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
62 : : throw (RuntimeException, DOMException)
63 : : {
64 : 4 : return CNode::appendChild(newChild);
65 : : }
66 : 4 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
67 : : throw (RuntimeException)
68 : : {
69 : 4 : return CNode::cloneNode(deep);
70 : : }
71 : 2 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
72 : : throw (RuntimeException)
73 : : {
74 : 2 : return CNode::getAttributes();
75 : : }
76 : 2 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
77 : : throw (RuntimeException)
78 : : {
79 : 2 : return CNode::getChildNodes();
80 : : }
81 : 10 : virtual Reference< XNode > SAL_CALL getFirstChild()
82 : : throw (RuntimeException)
83 : : {
84 : 10 : return CNode::getFirstChild();
85 : : }
86 : 8 : virtual Reference< XNode > SAL_CALL getLastChild()
87 : : throw (RuntimeException)
88 : : {
89 : 8 : return CNode::getLastChild();
90 : : }
91 : 2 : virtual OUString SAL_CALL getLocalName()
92 : : throw (RuntimeException)
93 : : {
94 : 2 : return CNode::getLocalName();
95 : : }
96 : 2 : virtual OUString SAL_CALL getNamespaceURI()
97 : : throw (RuntimeException)
98 : : {
99 : 2 : return CNode::getNamespaceURI();
100 : : }
101 : 2 : virtual Reference< XNode > SAL_CALL getNextSibling()
102 : : throw (RuntimeException)
103 : : {
104 : 2 : return CNode::getNextSibling();
105 : : }
106 : 2 : virtual NodeType SAL_CALL getNodeType()
107 : : throw (RuntimeException)
108 : : {
109 : 2 : return CNode::getNodeType();
110 : : }
111 : 30 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
112 : : throw (RuntimeException)
113 : : {
114 : 30 : return CNode::getOwnerDocument();
115 : : }
116 : 8 : virtual Reference< XNode > SAL_CALL getParentNode()
117 : : throw (RuntimeException)
118 : : {
119 : 8 : return CNode::getParentNode();
120 : : }
121 : 2 : virtual OUString SAL_CALL getPrefix()
122 : : throw (RuntimeException)
123 : : {
124 : 2 : return CNode::getPrefix();
125 : : }
126 : 2 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
127 : : throw (RuntimeException)
128 : : {
129 : 2 : return CNode::getPreviousSibling();
130 : : }
131 : 2 : virtual sal_Bool SAL_CALL hasAttributes()
132 : : throw (RuntimeException)
133 : : {
134 : 2 : return CNode::hasAttributes();
135 : : }
136 : 6 : virtual sal_Bool SAL_CALL hasChildNodes()
137 : : throw (RuntimeException)
138 : : {
139 : 6 : return CNode::hasChildNodes();
140 : : }
141 : 8 : virtual Reference< XNode > SAL_CALL insertBefore(
142 : : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
143 : : throw (RuntimeException, DOMException)
144 : : {
145 : 8 : return CNode::insertBefore(newChild, refChild);
146 : : }
147 : 2 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
148 : : throw (RuntimeException)
149 : : {
150 : 2 : return CNode::isSupported(feature, ver);
151 : : }
152 : 2 : virtual void SAL_CALL normalize()
153 : : throw (RuntimeException)
154 : : {
155 : 2 : CNode::normalize();
156 : 2 : }
157 : 6 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
158 : : throw (RuntimeException, DOMException)
159 : : {
160 : 6 : return CNode::removeChild(oldChild);
161 : : }
162 : 10 : virtual Reference< XNode > SAL_CALL replaceChild(
163 : : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
164 : : throw (RuntimeException, DOMException)
165 : : {
166 : 10 : return CNode::replaceChild(newChild, oldChild);
167 : : }
168 : 2 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
169 : : throw (RuntimeException, DOMException)
170 : : {
171 : 2 : return CNode::setNodeValue(nodeValue);
172 : : }
173 : 2 : virtual void SAL_CALL setPrefix(const OUString& prefix)
174 : : throw (RuntimeException, DOMException)
175 : : {
176 : 2 : return CNode::setPrefix(prefix);
177 : : }
178 : :
179 : : };
180 : : }
181 : : #endif
182 : :
183 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|