update dev300-m58
[ooovba.git] / unoxml / source / dom / entity.hxx
blobf4b5855cfba5d428d5141ced1b390005331e6e76
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: entity.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _ENTITY_HXX
32 #define _ENTITY_HXX
34 #include <sal/types.h>
35 #include <com/sun/star/uno/Reference.h>
36 #include <com/sun/star/uno/Exception.hpp>
37 #include <com/sun/star/xml/dom/XEntity.hpp>
38 #include "node.hxx"
39 #include <libxml/tree.h>
40 #include <libxml/entities.h>
42 using ::rtl::OUString;
43 using namespace com::sun::star::uno;
44 using namespace com::sun::star::xml::dom;
46 namespace DOM
48 class CEntity : public cppu::ImplInheritanceHelper1< CNode, XEntity >
50 friend class CNode;
51 private:
52 xmlEntityPtr m_aEntityPtr;
54 protected:
55 CEntity(const xmlEntityPtr aEntityPtr);
57 public:
59 /**
60 For unparsed entities, the name of the notation for the entity.
62 virtual OUString SAL_CALL getNotationName() throw (RuntimeException);
64 /**
65 The public identifier associated with the entity, if specified.
67 virtual OUString SAL_CALL getPublicId() throw (RuntimeException);
69 /**
70 The system identifier associated with the entity, if specified.
72 virtual OUString SAL_CALL getSystemId() throw (RuntimeException);
74 // ---- resolve uno inheritance problems...
75 // overrides for XNode base
76 virtual OUString SAL_CALL getNodeName()
77 throw (RuntimeException);
78 virtual OUString SAL_CALL getNodeValue()
79 throw (RuntimeException);
80 // --- delegation for XNde base.
81 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
82 throw (RuntimeException, DOMException)
84 return CNode::appendChild(newChild);
86 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
87 throw (RuntimeException)
89 return CNode::cloneNode(deep);
91 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
92 throw (RuntimeException)
94 return CNode::getAttributes();
96 virtual Reference< XNodeList > SAL_CALL getChildNodes()
97 throw (RuntimeException)
99 return CNode::getChildNodes();
101 virtual Reference< XNode > SAL_CALL getFirstChild()
102 throw (RuntimeException)
104 return CNode::getFirstChild();
106 virtual Reference< XNode > SAL_CALL getLastChild()
107 throw (RuntimeException)
109 return CNode::getLastChild();
111 virtual OUString SAL_CALL getLocalName()
112 throw (RuntimeException)
114 return CNode::getLocalName();
116 virtual OUString SAL_CALL getNamespaceURI()
117 throw (RuntimeException)
119 return CNode::getNamespaceURI();
121 virtual Reference< XNode > SAL_CALL getNextSibling()
122 throw (RuntimeException)
124 return CNode::getNextSibling();
126 virtual NodeType SAL_CALL getNodeType()
127 throw (RuntimeException)
129 return CNode::getNodeType();
131 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
132 throw (RuntimeException)
134 return CNode::getOwnerDocument();
136 virtual Reference< XNode > SAL_CALL getParentNode()
137 throw (RuntimeException)
139 return CNode::getParentNode();
141 virtual OUString SAL_CALL getPrefix()
142 throw (RuntimeException)
144 return CNode::getPrefix();
146 virtual Reference< XNode > SAL_CALL getPreviousSibling()
147 throw (RuntimeException)
149 return CNode::getPreviousSibling();
151 virtual sal_Bool SAL_CALL hasAttributes()
152 throw (RuntimeException)
154 return CNode::hasAttributes();
156 virtual sal_Bool SAL_CALL hasChildNodes()
157 throw (RuntimeException)
159 return CNode::hasChildNodes();
161 virtual Reference< XNode > SAL_CALL insertBefore(
162 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
163 throw (RuntimeException, DOMException)
165 return CNode::insertBefore(newChild, refChild);
167 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
168 throw (RuntimeException)
170 return CNode::isSupported(feature, ver);
172 virtual void SAL_CALL normalize()
173 throw (RuntimeException)
175 CNode::normalize();
177 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
178 throw (RuntimeException, DOMException)
180 return CNode::removeChild(oldChild);
182 virtual Reference< XNode > SAL_CALL replaceChild(
183 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
184 throw (RuntimeException, DOMException)
186 return CNode::replaceChild(newChild, oldChild);
188 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
189 throw (RuntimeException, DOMException)
191 return CNode::setNodeValue(nodeValue);
193 virtual void SAL_CALL setPrefix(const OUString& prefix)
194 throw (RuntimeException, DOMException)
196 return CNode::setPrefix(prefix);
203 #endif