merge the formfield patch from ooo-build
[ooovba.git] / unoxml / source / dom / comment.hxx
blob33dd66783155ef983538c332564d2ad2dc72a21f
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: comment.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 _COMMENT_HXX
32 #define _COMMENT_HXX
34 #include <com/sun/star/uno/Reference.h>
35 #include <com/sun/star/uno/Exception.hpp>
36 #include <com/sun/star/xml/dom/XComment.hpp>
37 #include "characterdata.hxx"
39 using ::rtl::OUString;
40 using namespace com::sun::star::uno;
41 using namespace com::sun::star::xml::dom;
43 namespace DOM
45 class CComment : public cppu::ImplInheritanceHelper1< CCharacterData, XComment >
47 friend class CNode;
48 protected:
49 CComment(const xmlNodePtr aNodePtr);
51 public:
53 virtual void SAL_CALL saxify(
54 const Reference< XDocumentHandler >& i_xHandler);
56 // --- delegations for XCharacterData
57 virtual void SAL_CALL appendData(const OUString& arg)
58 throw (RuntimeException, DOMException)
60 CCharacterData::appendData(arg);
62 virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
63 throw (RuntimeException, DOMException)
65 CCharacterData::deleteData(offset, count);
67 virtual OUString SAL_CALL getData() throw (RuntimeException)
69 return CCharacterData::getData();
71 virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
73 return CCharacterData::getLength();
75 virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
76 throw (RuntimeException, DOMException)
78 CCharacterData::insertData(offset, arg);
80 virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
81 throw (RuntimeException, DOMException)
83 CCharacterData::replaceData(offset, count, arg);
85 virtual void SAL_CALL setData(const OUString& data)
86 throw (RuntimeException, DOMException)
88 CCharacterData::setData(data);
90 virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
91 throw (RuntimeException, DOMException)
93 return CCharacterData::subStringData(offset, count);
97 // --- overrides for XNode base
98 virtual OUString SAL_CALL getNodeName()
99 throw (RuntimeException);
100 virtual OUString SAL_CALL getNodeValue()
101 throw (RuntimeException);
103 // --- delegation for XNde base.
104 virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
105 throw (RuntimeException, DOMException)
107 return CCharacterData::appendChild(newChild);
109 virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
110 throw (RuntimeException)
112 return CCharacterData::cloneNode(deep);
114 virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
115 throw (RuntimeException)
117 return CCharacterData::getAttributes();
119 virtual Reference< XNodeList > SAL_CALL getChildNodes()
120 throw (RuntimeException)
122 return CCharacterData::getChildNodes();
124 virtual Reference< XNode > SAL_CALL getFirstChild()
125 throw (RuntimeException)
127 return CCharacterData::getFirstChild();
129 virtual Reference< XNode > SAL_CALL getLastChild()
130 throw (RuntimeException)
132 return CCharacterData::getLastChild();
134 virtual OUString SAL_CALL getLocalName()
135 throw (RuntimeException)
137 return CCharacterData::getLocalName();
139 virtual OUString SAL_CALL getNamespaceURI()
140 throw (RuntimeException)
142 return CCharacterData::getNamespaceURI();
144 virtual Reference< XNode > SAL_CALL getNextSibling()
145 throw (RuntimeException)
147 return CCharacterData::getNextSibling();
149 virtual NodeType SAL_CALL getNodeType()
150 throw (RuntimeException)
152 return CCharacterData::getNodeType();
154 virtual Reference< XDocument > SAL_CALL getOwnerDocument()
155 throw (RuntimeException)
157 return CCharacterData::getOwnerDocument();
159 virtual Reference< XNode > SAL_CALL getParentNode()
160 throw (RuntimeException)
162 return CCharacterData::getParentNode();
164 virtual OUString SAL_CALL getPrefix()
165 throw (RuntimeException)
167 return CCharacterData::getPrefix();
169 virtual Reference< XNode > SAL_CALL getPreviousSibling()
170 throw (RuntimeException)
172 return CCharacterData::getPreviousSibling();
174 virtual sal_Bool SAL_CALL hasAttributes()
175 throw (RuntimeException)
177 return CCharacterData::hasAttributes();
179 virtual sal_Bool SAL_CALL hasChildNodes()
180 throw (RuntimeException)
182 return CCharacterData::hasChildNodes();
184 virtual Reference< XNode > SAL_CALL insertBefore(
185 const Reference< XNode >& newChild, const Reference< XNode >& refChild)
186 throw (RuntimeException, DOMException)
188 return CCharacterData::insertBefore(newChild, refChild);
190 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
191 throw (RuntimeException)
193 return CCharacterData::isSupported(feature, ver);
195 virtual void SAL_CALL normalize()
196 throw (RuntimeException)
198 CCharacterData::normalize();
200 virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
201 throw (RuntimeException, DOMException)
203 return CCharacterData::removeChild(oldChild);
205 virtual Reference< XNode > SAL_CALL replaceChild(
206 const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
207 throw (RuntimeException, DOMException)
209 return CCharacterData::replaceChild(newChild, oldChild);
211 virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
212 throw (RuntimeException, DOMException)
214 return CCharacterData::setNodeValue(nodeValue);
216 virtual void SAL_CALL setPrefix(const OUString& prefix)
217 throw (RuntimeException, DOMException)
219 return CCharacterData::setPrefix(prefix);
225 #endif