xref: /aoo4110/main/unoxml/source/dom/comment.hxx (revision b1cdbd2c)
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_COMMENT_HXX
25 #define DOM_COMMENT_HXX
26 
27 #include <com/sun/star/uno/Reference.h>
28 #include <com/sun/star/xml/dom/XComment.hpp>
29 
30 #include <characterdata.hxx>
31 
32 
33 using ::rtl::OUString;
34 using namespace com::sun::star::uno;
35 using namespace com::sun::star::xml::dom;
36 
37 namespace DOM
38 {
39     typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment >
40         CComment_Base;
41 
42     class CComment
43         : public CComment_Base
44     {
45     private:
46         friend class CDocument;
47 
48     protected:
49         CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
50                 xmlNodePtr const pNode);
51 
52     public:
53 
54         virtual void saxify(const Reference< XDocumentHandler >& i_xHandler);
55 
56          // --- delegations for XCharacterData
appendData(const OUString & arg)57         virtual void SAL_CALL appendData(const OUString& arg)
58             throw (RuntimeException, DOMException)
59         {
60             CCharacterData::appendData(arg);
61         }
deleteData(sal_Int32 offset,sal_Int32 count)62         virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
63             throw (RuntimeException, DOMException)
64         {
65             CCharacterData::deleteData(offset, count);
66         }
getData()67         virtual OUString SAL_CALL getData() throw (RuntimeException)
68         {
69             return CCharacterData::getData();
70         }
getLength()71         virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
72         {
73             return CCharacterData::getLength();
74         }
insertData(sal_Int32 offset,const OUString & arg)75         virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
76             throw (RuntimeException, DOMException)
77         {
78             CCharacterData::insertData(offset, arg);
79         }
replaceData(sal_Int32 offset,sal_Int32 count,const OUString & arg)80         virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
81             throw (RuntimeException, DOMException)
82         {
83             CCharacterData::replaceData(offset, count, arg);
84         }
setData(const OUString & data)85         virtual void SAL_CALL setData(const OUString& data)
86             throw (RuntimeException, DOMException)
87         {
88             CCharacterData::setData(data);
89         }
subStringData(sal_Int32 offset,sal_Int32 count)90         virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
91             throw (RuntimeException, DOMException)
92         {
93             return CCharacterData::subStringData(offset, count);
94         }
95 
96 
97          // --- overrides for XNode base
98         virtual OUString SAL_CALL getNodeName()
99             throw (RuntimeException);
100         virtual OUString SAL_CALL getNodeValue()
101             throw (RuntimeException);
102 
103     // --- delegation for XNde base.
appendChild(const Reference<XNode> & newChild)104     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
105         throw (RuntimeException, DOMException)
106     {
107         return CCharacterData::appendChild(newChild);
108     }
cloneNode(sal_Bool deep)109     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
110         throw (RuntimeException)
111     {
112         return CCharacterData::cloneNode(deep);
113     }
getAttributes()114     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
115         throw (RuntimeException)
116     {
117         return CCharacterData::getAttributes();
118     }
getChildNodes()119     virtual Reference< XNodeList > SAL_CALL getChildNodes()
120         throw (RuntimeException)
121     {
122         return CCharacterData::getChildNodes();
123     }
getFirstChild()124     virtual Reference< XNode > SAL_CALL getFirstChild()
125         throw (RuntimeException)
126     {
127         return CCharacterData::getFirstChild();
128     }
getLastChild()129     virtual Reference< XNode > SAL_CALL getLastChild()
130         throw (RuntimeException)
131     {
132         return CCharacterData::getLastChild();
133     }
getLocalName()134     virtual OUString SAL_CALL getLocalName()
135         throw (RuntimeException)
136     {
137         return CCharacterData::getLocalName();
138     }
getNamespaceURI()139     virtual OUString SAL_CALL getNamespaceURI()
140         throw (RuntimeException)
141     {
142         return CCharacterData::getNamespaceURI();
143     }
getNextSibling()144     virtual Reference< XNode > SAL_CALL getNextSibling()
145         throw (RuntimeException)
146     {
147         return CCharacterData::getNextSibling();
148     }
getNodeType()149     virtual NodeType SAL_CALL getNodeType()
150         throw (RuntimeException)
151     {
152         return CCharacterData::getNodeType();
153     }
getOwnerDocument()154     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
155         throw (RuntimeException)
156     {
157         return CCharacterData::getOwnerDocument();
158     }
getParentNode()159     virtual Reference< XNode > SAL_CALL getParentNode()
160         throw (RuntimeException)
161     {
162         return CCharacterData::getParentNode();
163     }
getPrefix()164     virtual OUString SAL_CALL getPrefix()
165         throw (RuntimeException)
166     {
167         return CCharacterData::getPrefix();
168     }
getPreviousSibling()169     virtual Reference< XNode > SAL_CALL getPreviousSibling()
170         throw (RuntimeException)
171     {
172         return CCharacterData::getPreviousSibling();
173     }
hasAttributes()174     virtual sal_Bool SAL_CALL hasAttributes()
175         throw (RuntimeException)
176     {
177         return CCharacterData::hasAttributes();
178     }
hasChildNodes()179     virtual sal_Bool SAL_CALL hasChildNodes()
180         throw (RuntimeException)
181     {
182         return CCharacterData::hasChildNodes();
183     }
insertBefore(const Reference<XNode> & newChild,const Reference<XNode> & refChild)184     virtual Reference< XNode > SAL_CALL insertBefore(
185             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
186         throw (RuntimeException, DOMException)
187     {
188         return CCharacterData::insertBefore(newChild, refChild);
189     }
isSupported(const OUString & feature,const OUString & ver)190     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
191         throw (RuntimeException)
192     {
193         return CCharacterData::isSupported(feature, ver);
194     }
normalize()195     virtual void SAL_CALL normalize()
196         throw (RuntimeException)
197     {
198         CCharacterData::normalize();
199     }
removeChild(const Reference<XNode> & oldChild)200     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
201         throw (RuntimeException, DOMException)
202     {
203         return CCharacterData::removeChild(oldChild);
204     }
replaceChild(const Reference<XNode> & newChild,const Reference<XNode> & oldChild)205     virtual Reference< XNode > SAL_CALL replaceChild(
206             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
207         throw (RuntimeException, DOMException)
208     {
209         return CCharacterData::replaceChild(newChild, oldChild);
210     }
setNodeValue(const OUString & nodeValue)211     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
212         throw (RuntimeException, DOMException)
213     {
214         return CCharacterData::setNodeValue(nodeValue);
215     }
setPrefix(const OUString & prefix)216     virtual void SAL_CALL setPrefix(const OUString& prefix)
217         throw (RuntimeException, DOMException)
218     {
219         return CCharacterData::setPrefix(prefix);
220     }
221 
222     };
223 }
224 
225 #endif
226