1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: entityreference.hxx,v $
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 _ENTITYREFERENCE_HXX
32 #define _ENTITYREFERENCE_HXX
33 #include <com/sun/star/uno/Reference.h>
34 #include <com/sun/star/uno/Exception.hpp>
35 #include <com/sun/star/xml/dom/XEntityReference.hpp>
37 #include <libxml/tree.h>
39 using ::rtl::OUString
;
40 using namespace com::sun::star::uno
;
41 using namespace com::sun::star::xml::dom
;
45 class CEntityReference
: public cppu::ImplInheritanceHelper1
< CNode
, XEntityReference
>
49 CEntityReference(const xmlNodePtr aNodePtr
);
52 // ---- resolve uno inheritance problems...
53 // overrides for XNode base
54 virtual OUString SAL_CALL
getNodeName()
55 throw (RuntimeException
);
56 virtual OUString SAL_CALL
getNodeValue()
57 throw (RuntimeException
);
58 // --- delegation for XNde base.
59 virtual Reference
< XNode
> SAL_CALL
appendChild(const Reference
< XNode
>& newChild
)
60 throw (RuntimeException
, DOMException
)
62 return CNode::appendChild(newChild
);
64 virtual Reference
< XNode
> SAL_CALL
cloneNode(sal_Bool deep
)
65 throw (RuntimeException
)
67 return CNode::cloneNode(deep
);
69 virtual Reference
< XNamedNodeMap
> SAL_CALL
getAttributes()
70 throw (RuntimeException
)
72 return CNode::getAttributes();
74 virtual Reference
< XNodeList
> SAL_CALL
getChildNodes()
75 throw (RuntimeException
)
77 return CNode::getChildNodes();
79 virtual Reference
< XNode
> SAL_CALL
getFirstChild()
80 throw (RuntimeException
)
82 return CNode::getFirstChild();
84 virtual Reference
< XNode
> SAL_CALL
getLastChild()
85 throw (RuntimeException
)
87 return CNode::getLastChild();
89 virtual OUString SAL_CALL
getLocalName()
90 throw (RuntimeException
)
92 return CNode::getLocalName();
94 virtual OUString SAL_CALL
getNamespaceURI()
95 throw (RuntimeException
)
97 return CNode::getNamespaceURI();
99 virtual Reference
< XNode
> SAL_CALL
getNextSibling()
100 throw (RuntimeException
)
102 return CNode::getNextSibling();
104 virtual NodeType SAL_CALL
getNodeType()
105 throw (RuntimeException
)
107 return CNode::getNodeType();
109 virtual Reference
< XDocument
> SAL_CALL
getOwnerDocument()
110 throw (RuntimeException
)
112 return CNode::getOwnerDocument();
114 virtual Reference
< XNode
> SAL_CALL
getParentNode()
115 throw (RuntimeException
)
117 return CNode::getParentNode();
119 virtual OUString SAL_CALL
getPrefix()
120 throw (RuntimeException
)
122 return CNode::getPrefix();
124 virtual Reference
< XNode
> SAL_CALL
getPreviousSibling()
125 throw (RuntimeException
)
127 return CNode::getPreviousSibling();
129 virtual sal_Bool SAL_CALL
hasAttributes()
130 throw (RuntimeException
)
132 return CNode::hasAttributes();
134 virtual sal_Bool SAL_CALL
hasChildNodes()
135 throw (RuntimeException
)
137 return CNode::hasChildNodes();
139 virtual Reference
< XNode
> SAL_CALL
insertBefore(
140 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& refChild
)
141 throw (RuntimeException
, DOMException
)
143 return CNode::insertBefore(newChild
, refChild
);
145 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
)
146 throw (RuntimeException
)
148 return CNode::isSupported(feature
, ver
);
150 virtual void SAL_CALL
normalize()
151 throw (RuntimeException
)
155 virtual Reference
< XNode
> SAL_CALL
removeChild(const Reference
< XNode
>& oldChild
)
156 throw (RuntimeException
, DOMException
)
158 return CNode::removeChild(oldChild
);
160 virtual Reference
< XNode
> SAL_CALL
replaceChild(
161 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& oldChild
)
162 throw (RuntimeException
, DOMException
)
164 return CNode::replaceChild(newChild
, oldChild
);
166 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
)
167 throw (RuntimeException
, DOMException
)
169 return CNode::setNodeValue(nodeValue
);
171 virtual void SAL_CALL
setPrefix(const OUString
& prefix
)
172 throw (RuntimeException
, DOMException
)
174 return CNode::setPrefix(prefix
);