xref: /aoo41x/main/unoxml/source/dom/comment.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef DOM_COMMENT_HXX
29 #define DOM_COMMENT_HXX
30 
31 #include <com/sun/star/uno/Reference.h>
32 #include <com/sun/star/xml/dom/XComment.hpp>
33 
34 #include <characterdata.hxx>
35 
36 
37 using ::rtl::OUString;
38 using namespace com::sun::star::uno;
39 using namespace com::sun::star::xml::dom;
40 
41 namespace DOM
42 {
43     typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment >
44         CComment_Base;
45 
46     class CComment
47         : public CComment_Base
48     {
49     private:
50         friend class CDocument;
51 
52     protected:
53         CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
54                 xmlNodePtr const pNode);
55 
56     public:
57 
58         virtual void saxify(const Reference< XDocumentHandler >& i_xHandler);
59 
60          // --- delegations for XCharacterData
61         virtual void SAL_CALL appendData(const OUString& arg)
62             throw (RuntimeException, DOMException)
63         {
64             CCharacterData::appendData(arg);
65         }
66         virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
67             throw (RuntimeException, DOMException)
68         {
69             CCharacterData::deleteData(offset, count);
70         }
71         virtual OUString SAL_CALL getData() throw (RuntimeException)
72         {
73             return CCharacterData::getData();
74         }
75         virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
76         {
77             return CCharacterData::getLength();
78         }
79         virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
80             throw (RuntimeException, DOMException)
81         {
82             CCharacterData::insertData(offset, arg);
83         }
84         virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
85             throw (RuntimeException, DOMException)
86         {
87             CCharacterData::replaceData(offset, count, arg);
88         }
89         virtual void SAL_CALL setData(const OUString& data)
90             throw (RuntimeException, DOMException)
91         {
92             CCharacterData::setData(data);
93         }
94         virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
95             throw (RuntimeException, DOMException)
96         {
97             return CCharacterData::subStringData(offset, count);
98         }
99 
100 
101          // --- overrides for XNode base
102         virtual OUString SAL_CALL getNodeName()
103             throw (RuntimeException);
104         virtual OUString SAL_CALL getNodeValue()
105             throw (RuntimeException);
106 
107     // --- delegation for XNde base.
108     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
109         throw (RuntimeException, DOMException)
110     {
111         return CCharacterData::appendChild(newChild);
112     }
113     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
114         throw (RuntimeException)
115     {
116         return CCharacterData::cloneNode(deep);
117     }
118     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
119         throw (RuntimeException)
120     {
121         return CCharacterData::getAttributes();
122     }
123     virtual Reference< XNodeList > SAL_CALL getChildNodes()
124         throw (RuntimeException)
125     {
126         return CCharacterData::getChildNodes();
127     }
128     virtual Reference< XNode > SAL_CALL getFirstChild()
129         throw (RuntimeException)
130     {
131         return CCharacterData::getFirstChild();
132     }
133     virtual Reference< XNode > SAL_CALL getLastChild()
134         throw (RuntimeException)
135     {
136         return CCharacterData::getLastChild();
137     }
138     virtual OUString SAL_CALL getLocalName()
139         throw (RuntimeException)
140     {
141         return CCharacterData::getLocalName();
142     }
143     virtual OUString SAL_CALL getNamespaceURI()
144         throw (RuntimeException)
145     {
146         return CCharacterData::getNamespaceURI();
147     }
148     virtual Reference< XNode > SAL_CALL getNextSibling()
149         throw (RuntimeException)
150     {
151         return CCharacterData::getNextSibling();
152     }
153     virtual NodeType SAL_CALL getNodeType()
154         throw (RuntimeException)
155     {
156         return CCharacterData::getNodeType();
157     }
158     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
159         throw (RuntimeException)
160     {
161         return CCharacterData::getOwnerDocument();
162     }
163     virtual Reference< XNode > SAL_CALL getParentNode()
164         throw (RuntimeException)
165     {
166         return CCharacterData::getParentNode();
167     }
168     virtual OUString SAL_CALL getPrefix()
169         throw (RuntimeException)
170     {
171         return CCharacterData::getPrefix();
172     }
173     virtual Reference< XNode > SAL_CALL getPreviousSibling()
174         throw (RuntimeException)
175     {
176         return CCharacterData::getPreviousSibling();
177     }
178     virtual sal_Bool SAL_CALL hasAttributes()
179         throw (RuntimeException)
180     {
181         return CCharacterData::hasAttributes();
182     }
183     virtual sal_Bool SAL_CALL hasChildNodes()
184         throw (RuntimeException)
185     {
186         return CCharacterData::hasChildNodes();
187     }
188     virtual Reference< XNode > SAL_CALL insertBefore(
189             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
190         throw (RuntimeException, DOMException)
191     {
192         return CCharacterData::insertBefore(newChild, refChild);
193     }
194     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
195         throw (RuntimeException)
196     {
197         return CCharacterData::isSupported(feature, ver);
198     }
199     virtual void SAL_CALL normalize()
200         throw (RuntimeException)
201     {
202         CCharacterData::normalize();
203     }
204     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
205         throw (RuntimeException, DOMException)
206     {
207         return CCharacterData::removeChild(oldChild);
208     }
209     virtual Reference< XNode > SAL_CALL replaceChild(
210             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
211         throw (RuntimeException, DOMException)
212     {
213         return CCharacterData::replaceChild(newChild, oldChild);
214     }
215     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
216         throw (RuntimeException, DOMException)
217     {
218         return CCharacterData::setNodeValue(nodeValue);
219     }
220     virtual void SAL_CALL setPrefix(const OUString& prefix)
221         throw (RuntimeException, DOMException)
222     {
223         return CCharacterData::setPrefix(prefix);
224     }
225 
226     };
227 }
228 
229 #endif
230