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