update dev300-m58
[ooovba.git] / unoxml / source / dom / cdatasection.hxx
blob524a50d2cf5a5b03114d58b507bbe0d57ef7e600
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cdatasection.hxx,v $
10 * $Revision: 1.8 $
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 _CDATASECTION_HXX
32 #define _CDATASECTION_HXX
34 #include <com/sun/star/uno/Reference.h>
35 #include <com/sun/star/uno/Exception.hpp>
36 #include <com/sun/star/xml/dom/XCDATASection.hpp>
38 #include "text.hxx"
40 using ::rtl::OUString;
41 using namespace com::sun::star::uno;
42 using namespace com::sun::star::xml::dom;
44 namespace DOM
46 class CCDATASection : public cppu::ImplInheritanceHelper1< CText, XCDATASection >
48 friend class CNode;
49 protected:
50 CCDATASection(const xmlNodePtr aNodePtr);
52 public:
54 virtual void SAL_CALL saxify(
55 const Reference< XDocumentHandler >& i_xHandler);
57 virtual Reference< XText > SAL_CALL splitText(sal_Int32 offset)
58 throw (RuntimeException)
60 return CText::splitText(offset);
63 // --- delegations for XCharacterData
64 virtual void SAL_CALL appendData(const OUString& arg)
65 throw (RuntimeException, DOMException)
67 CCharacterData::appendData(arg);
69 virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
70 throw (RuntimeException, DOMException)
72 CCharacterData::deleteData(offset, count);
74 virtual OUString SAL_CALL getData() throw (RuntimeException)
76 return CCharacterData::getData();
78 virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
80 return CCharacterData::getLength();
82 virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
83 throw (RuntimeException, DOMException)
85 CCharacterData::insertData(offset, arg);
87 virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
88 throw (RuntimeException, DOMException)
90 CCharacterData::replaceData(offset, count, arg);
92 virtual void SAL_CALL setData(const OUString& data)
93 throw (RuntimeException, DOMException)
95 CCharacterData::setData(data);
97 virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
98 throw (RuntimeException, DOMException)
100 return CCharacterData::subStringData(offset, count);
104 // --- overrides for XNode base
105 virtual OUString SAL_CALL getNodeName()
106 throw (RuntimeException);
107 virtual OUString SAL_CALL getNodeValue()
108 throw (RuntimeException);
110 // --- delegation for XNde base.
111 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
112 throw (RuntimeException, DOMException)
114 return CNode::appendChild(newChild);
116 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
117 throw (RuntimeException)
119 return CNode::cloneNode(deep);
121 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
122 throw (RuntimeException)
124 return CNode::getAttributes();
126 virtual Reference< XNodeList > SAL_CALL getChildNodes()
127 throw (RuntimeException)
129 return CNode::getChildNodes();
131 virtual Reference< XNode > SAL_CALL getFirstChild()
132 throw (RuntimeException)
134 return CNode::getFirstChild();
136 virtual Reference< XNode > SAL_CALL getLastChild()
137 throw (RuntimeException)
139 return CNode::getLastChild();
141 virtual OUString SAL_CALL getLocalName()
142 throw (RuntimeException)
144 return CNode::getLocalName();
146 virtual OUString SAL_CALL getNamespaceURI()
147 throw (RuntimeException)
149 return CNode::getNamespaceURI();
151 virtual Reference< XNode > SAL_CALL getNextSibling()
152 throw (RuntimeException)
154 return CNode::getNextSibling();
156 virtual NodeType SAL_CALL getNodeType()
157 throw (RuntimeException)
159 return CNode::getNodeType();
161 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
162 throw (RuntimeException)
164 return CNode::getOwnerDocument();
166 virtual Reference< XNode > SAL_CALL getParentNode()
167 throw (RuntimeException)
169 return CNode::getParentNode();
171 virtual OUString SAL_CALL getPrefix()
172 throw (RuntimeException)
174 return CNode::getPrefix();
176 virtual Reference< XNode > SAL_CALL getPreviousSibling()
177 throw (RuntimeException)
179 return CNode::getPreviousSibling();
181 virtual sal_Bool SAL_CALL hasAttributes()
182 throw (RuntimeException)
184 return CNode::hasAttributes();
186 virtual sal_Bool SAL_CALL hasChildNodes()
187 throw (RuntimeException)
189 return CNode::hasChildNodes();
191 virtual Reference< XNode > SAL_CALL insertBefore(
192 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
193 throw (RuntimeException, DOMException)
195 return CNode::insertBefore(newChild, refChild);
197 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
198 throw (RuntimeException)
200 return CNode::isSupported(feature, ver);
202 virtual void SAL_CALL normalize()
203 throw (RuntimeException)
205 CNode::normalize();
207 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
208 throw (RuntimeException, DOMException)
210 return CNode::removeChild(oldChild);
212 virtual Reference< XNode > SAL_CALL replaceChild(
213 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
214 throw (RuntimeException, DOMException)
216 return CNode::replaceChild(newChild, oldChild);
218 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
219 throw (RuntimeException, DOMException)
221 return CNode::setNodeValue(nodeValue);
223 virtual void SAL_CALL setPrefix(const OUString& prefix)
224 throw (RuntimeException, DOMException)
226 return CNode::setPrefix(prefix);
233 #endif