xref: /trunk/main/unoxml/source/dom/entityreference.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef DOM_ENTITYREFERENCE_HXX
25 #define DOM_ENTITYREFERENCE_HXX
26 
27 #include <libxml/tree.h>
28 
29 #include <com/sun/star/uno/Reference.h>
30 #include <com/sun/star/xml/dom/XEntityReference.hpp>
31 
32 #include <node.hxx>
33 
34 
35 using ::rtl::OUString;
36 using namespace com::sun::star::uno;
37 using namespace com::sun::star::xml::dom;
38 
39 namespace DOM
40 {
41     typedef ::cppu::ImplInheritanceHelper1< CNode, XEntityReference >
42         CEntityReference_Base;
43 
44     class CEntityReference
45         : public CEntityReference_Base
46     {
47     private:
48         friend class CDocument;
49 
50     protected:
51         CEntityReference(
52             CDocument const& rDocument, ::osl::Mutex const& rMutex,
53             xmlNodePtr const pNode);
54 
55     public:
56         virtual bool IsChildTypeAllowed(NodeType const nodeType);
57 
58         // ---- resolve uno inheritance problems...
59         // overrides for XNode base
60         virtual OUString SAL_CALL getNodeName();
61         virtual OUString SAL_CALL getNodeValue();
62     // --- delegation for XNde base.
appendChild(const Reference<XNode> & newChild)63     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
64     {
65         return CNode::appendChild(newChild);
66     }
cloneNode(sal_Bool deep)67     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
68     {
69         return CNode::cloneNode(deep);
70     }
getAttributes()71     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
72     {
73         return CNode::getAttributes();
74     }
getChildNodes()75     virtual Reference< XNodeList > SAL_CALL getChildNodes()
76     {
77         return CNode::getChildNodes();
78     }
getFirstChild()79     virtual Reference< XNode > SAL_CALL getFirstChild()
80     {
81         return CNode::getFirstChild();
82     }
getLastChild()83     virtual Reference< XNode > SAL_CALL getLastChild()
84     {
85         return CNode::getLastChild();
86     }
getLocalName()87     virtual OUString SAL_CALL getLocalName()
88     {
89         return CNode::getLocalName();
90     }
getNamespaceURI()91     virtual OUString SAL_CALL getNamespaceURI()
92     {
93         return CNode::getNamespaceURI();
94     }
getNextSibling()95     virtual Reference< XNode > SAL_CALL getNextSibling()
96     {
97         return CNode::getNextSibling();
98     }
getNodeType()99     virtual NodeType SAL_CALL getNodeType()
100     {
101         return CNode::getNodeType();
102     }
getOwnerDocument()103     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
104     {
105         return CNode::getOwnerDocument();
106     }
getParentNode()107     virtual Reference< XNode > SAL_CALL getParentNode()
108     {
109         return CNode::getParentNode();
110     }
getPrefix()111     virtual OUString SAL_CALL getPrefix()
112     {
113         return CNode::getPrefix();
114     }
getPreviousSibling()115     virtual Reference< XNode > SAL_CALL getPreviousSibling()
116     {
117         return CNode::getPreviousSibling();
118     }
hasAttributes()119     virtual sal_Bool SAL_CALL hasAttributes()
120     {
121         return CNode::hasAttributes();
122     }
hasChildNodes()123     virtual sal_Bool SAL_CALL hasChildNodes()
124     {
125         return CNode::hasChildNodes();
126     }
insertBefore(const Reference<XNode> & newChild,const Reference<XNode> & refChild)127     virtual Reference< XNode > SAL_CALL insertBefore(
128             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
129     {
130         return CNode::insertBefore(newChild, refChild);
131     }
isSupported(const OUString & feature,const OUString & ver)132     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
133     {
134         return CNode::isSupported(feature, ver);
135     }
normalize()136     virtual void SAL_CALL normalize()
137     {
138         CNode::normalize();
139     }
removeChild(const Reference<XNode> & oldChild)140     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
141     {
142         return CNode::removeChild(oldChild);
143     }
replaceChild(const Reference<XNode> & newChild,const Reference<XNode> & oldChild)144     virtual Reference< XNode > SAL_CALL replaceChild(
145             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
146     {
147         return CNode::replaceChild(newChild, oldChild);
148     }
setNodeValue(const OUString & nodeValue)149     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
150     {
151         return CNode::setNodeValue(nodeValue);
152     }
setPrefix(const OUString & prefix)153     virtual void SAL_CALL setPrefix(const OUString& prefix)
154     {
155         return CNode::setPrefix(prefix);
156     }
157 
158     };
159 }
160 #endif
161