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