xref: /aoo41x/main/unoxml/source/dom/comment.hxx (revision 7f654276)
1*7f654276SAndrew Rist /**************************************************************
2*7f654276SAndrew Rist  *
3*7f654276SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7f654276SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7f654276SAndrew Rist  * distributed with this work for additional information
6*7f654276SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7f654276SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7f654276SAndrew Rist  * "License"); you may not use this file except in compliance
9*7f654276SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*7f654276SAndrew Rist  *
11*7f654276SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*7f654276SAndrew Rist  *
13*7f654276SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7f654276SAndrew Rist  * software distributed under the License is distributed on an
15*7f654276SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7f654276SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7f654276SAndrew Rist  * specific language governing permissions and limitations
18*7f654276SAndrew Rist  * under the License.
19*7f654276SAndrew Rist  *
20*7f654276SAndrew Rist  *************************************************************/
21*7f654276SAndrew Rist 
22*7f654276SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef DOM_COMMENT_HXX
25cdf0e10cSrcweir #define DOM_COMMENT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
28cdf0e10cSrcweir #include <com/sun/star/xml/dom/XComment.hpp>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <characterdata.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir 
33cdf0e10cSrcweir using ::rtl::OUString;
34cdf0e10cSrcweir using namespace com::sun::star::uno;
35cdf0e10cSrcweir using namespace com::sun::star::xml::dom;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace DOM
38cdf0e10cSrcweir {
39cdf0e10cSrcweir     typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment >
40cdf0e10cSrcweir         CComment_Base;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir     class CComment
43cdf0e10cSrcweir         : public CComment_Base
44cdf0e10cSrcweir     {
45cdf0e10cSrcweir     private:
46cdf0e10cSrcweir         friend class CDocument;
47cdf0e10cSrcweir 
48cdf0e10cSrcweir     protected:
49cdf0e10cSrcweir         CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
50cdf0e10cSrcweir                 xmlNodePtr const pNode);
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     public:
53cdf0e10cSrcweir 
54cdf0e10cSrcweir         virtual void saxify(const Reference< XDocumentHandler >& i_xHandler);
55cdf0e10cSrcweir 
56cdf0e10cSrcweir          // --- delegations for XCharacterData
appendData(const OUString & arg)57cdf0e10cSrcweir         virtual void SAL_CALL appendData(const OUString& arg)
58cdf0e10cSrcweir             throw (RuntimeException, DOMException)
59cdf0e10cSrcweir         {
60cdf0e10cSrcweir             CCharacterData::appendData(arg);
61cdf0e10cSrcweir         }
deleteData(sal_Int32 offset,sal_Int32 count)62cdf0e10cSrcweir         virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
63cdf0e10cSrcweir             throw (RuntimeException, DOMException)
64cdf0e10cSrcweir         {
65cdf0e10cSrcweir             CCharacterData::deleteData(offset, count);
66cdf0e10cSrcweir         }
getData()67cdf0e10cSrcweir         virtual OUString SAL_CALL getData() throw (RuntimeException)
68cdf0e10cSrcweir         {
69cdf0e10cSrcweir             return CCharacterData::getData();
70cdf0e10cSrcweir         }
getLength()71cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException)
72cdf0e10cSrcweir         {
73cdf0e10cSrcweir             return CCharacterData::getLength();
74cdf0e10cSrcweir         }
insertData(sal_Int32 offset,const OUString & arg)75cdf0e10cSrcweir         virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
76cdf0e10cSrcweir             throw (RuntimeException, DOMException)
77cdf0e10cSrcweir         {
78cdf0e10cSrcweir             CCharacterData::insertData(offset, arg);
79cdf0e10cSrcweir         }
replaceData(sal_Int32 offset,sal_Int32 count,const OUString & arg)80cdf0e10cSrcweir         virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
81cdf0e10cSrcweir             throw (RuntimeException, DOMException)
82cdf0e10cSrcweir         {
83cdf0e10cSrcweir             CCharacterData::replaceData(offset, count, arg);
84cdf0e10cSrcweir         }
setData(const OUString & data)85cdf0e10cSrcweir         virtual void SAL_CALL setData(const OUString& data)
86cdf0e10cSrcweir             throw (RuntimeException, DOMException)
87cdf0e10cSrcweir         {
88cdf0e10cSrcweir             CCharacterData::setData(data);
89cdf0e10cSrcweir         }
subStringData(sal_Int32 offset,sal_Int32 count)90cdf0e10cSrcweir         virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
91cdf0e10cSrcweir             throw (RuntimeException, DOMException)
92cdf0e10cSrcweir         {
93cdf0e10cSrcweir             return CCharacterData::subStringData(offset, count);
94cdf0e10cSrcweir         }
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 
97cdf0e10cSrcweir          // --- overrides for XNode base
98cdf0e10cSrcweir         virtual OUString SAL_CALL getNodeName()
99cdf0e10cSrcweir             throw (RuntimeException);
100cdf0e10cSrcweir         virtual OUString SAL_CALL getNodeValue()
101cdf0e10cSrcweir             throw (RuntimeException);
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     // --- delegation for XNde base.
appendChild(const Reference<XNode> & newChild)104cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
105cdf0e10cSrcweir         throw (RuntimeException, DOMException)
106cdf0e10cSrcweir     {
107cdf0e10cSrcweir         return CCharacterData::appendChild(newChild);
108cdf0e10cSrcweir     }
cloneNode(sal_Bool deep)109cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
110cdf0e10cSrcweir         throw (RuntimeException)
111cdf0e10cSrcweir     {
112cdf0e10cSrcweir         return CCharacterData::cloneNode(deep);
113cdf0e10cSrcweir     }
getAttributes()114cdf0e10cSrcweir     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
115cdf0e10cSrcweir         throw (RuntimeException)
116cdf0e10cSrcweir     {
117cdf0e10cSrcweir         return CCharacterData::getAttributes();
118cdf0e10cSrcweir     }
getChildNodes()119cdf0e10cSrcweir     virtual Reference< XNodeList > SAL_CALL getChildNodes()
120cdf0e10cSrcweir         throw (RuntimeException)
121cdf0e10cSrcweir     {
122cdf0e10cSrcweir         return CCharacterData::getChildNodes();
123cdf0e10cSrcweir     }
getFirstChild()124cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getFirstChild()
125cdf0e10cSrcweir         throw (RuntimeException)
126cdf0e10cSrcweir     {
127cdf0e10cSrcweir         return CCharacterData::getFirstChild();
128cdf0e10cSrcweir     }
getLastChild()129cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getLastChild()
130cdf0e10cSrcweir         throw (RuntimeException)
131cdf0e10cSrcweir     {
132cdf0e10cSrcweir         return CCharacterData::getLastChild();
133cdf0e10cSrcweir     }
getLocalName()134cdf0e10cSrcweir     virtual OUString SAL_CALL getLocalName()
135cdf0e10cSrcweir         throw (RuntimeException)
136cdf0e10cSrcweir     {
137cdf0e10cSrcweir         return CCharacterData::getLocalName();
138cdf0e10cSrcweir     }
getNamespaceURI()139cdf0e10cSrcweir     virtual OUString SAL_CALL getNamespaceURI()
140cdf0e10cSrcweir         throw (RuntimeException)
141cdf0e10cSrcweir     {
142cdf0e10cSrcweir         return CCharacterData::getNamespaceURI();
143cdf0e10cSrcweir     }
getNextSibling()144cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getNextSibling()
145cdf0e10cSrcweir         throw (RuntimeException)
146cdf0e10cSrcweir     {
147cdf0e10cSrcweir         return CCharacterData::getNextSibling();
148cdf0e10cSrcweir     }
getNodeType()149cdf0e10cSrcweir     virtual NodeType SAL_CALL getNodeType()
150cdf0e10cSrcweir         throw (RuntimeException)
151cdf0e10cSrcweir     {
152cdf0e10cSrcweir         return CCharacterData::getNodeType();
153cdf0e10cSrcweir     }
getOwnerDocument()154cdf0e10cSrcweir     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
155cdf0e10cSrcweir         throw (RuntimeException)
156cdf0e10cSrcweir     {
157cdf0e10cSrcweir         return CCharacterData::getOwnerDocument();
158cdf0e10cSrcweir     }
getParentNode()159cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getParentNode()
160cdf0e10cSrcweir         throw (RuntimeException)
161cdf0e10cSrcweir     {
162cdf0e10cSrcweir         return CCharacterData::getParentNode();
163cdf0e10cSrcweir     }
getPrefix()164cdf0e10cSrcweir     virtual OUString SAL_CALL getPrefix()
165cdf0e10cSrcweir         throw (RuntimeException)
166cdf0e10cSrcweir     {
167cdf0e10cSrcweir         return CCharacterData::getPrefix();
168cdf0e10cSrcweir     }
getPreviousSibling()169cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getPreviousSibling()
170cdf0e10cSrcweir         throw (RuntimeException)
171cdf0e10cSrcweir     {
172cdf0e10cSrcweir         return CCharacterData::getPreviousSibling();
173cdf0e10cSrcweir     }
hasAttributes()174cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasAttributes()
175cdf0e10cSrcweir         throw (RuntimeException)
176cdf0e10cSrcweir     {
177cdf0e10cSrcweir         return CCharacterData::hasAttributes();
178cdf0e10cSrcweir     }
hasChildNodes()179cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasChildNodes()
180cdf0e10cSrcweir         throw (RuntimeException)
181cdf0e10cSrcweir     {
182cdf0e10cSrcweir         return CCharacterData::hasChildNodes();
183cdf0e10cSrcweir     }
insertBefore(const Reference<XNode> & newChild,const Reference<XNode> & refChild)184cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL insertBefore(
185cdf0e10cSrcweir             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
186cdf0e10cSrcweir         throw (RuntimeException, DOMException)
187cdf0e10cSrcweir     {
188cdf0e10cSrcweir         return CCharacterData::insertBefore(newChild, refChild);
189cdf0e10cSrcweir     }
isSupported(const OUString & feature,const OUString & ver)190cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
191cdf0e10cSrcweir         throw (RuntimeException)
192cdf0e10cSrcweir     {
193cdf0e10cSrcweir         return CCharacterData::isSupported(feature, ver);
194cdf0e10cSrcweir     }
normalize()195cdf0e10cSrcweir     virtual void SAL_CALL normalize()
196cdf0e10cSrcweir         throw (RuntimeException)
197cdf0e10cSrcweir     {
198cdf0e10cSrcweir         CCharacterData::normalize();
199cdf0e10cSrcweir     }
removeChild(const Reference<XNode> & oldChild)200cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
201cdf0e10cSrcweir         throw (RuntimeException, DOMException)
202cdf0e10cSrcweir     {
203cdf0e10cSrcweir         return CCharacterData::removeChild(oldChild);
204cdf0e10cSrcweir     }
replaceChild(const Reference<XNode> & newChild,const Reference<XNode> & oldChild)205cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL replaceChild(
206cdf0e10cSrcweir             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
207cdf0e10cSrcweir         throw (RuntimeException, DOMException)
208cdf0e10cSrcweir     {
209cdf0e10cSrcweir         return CCharacterData::replaceChild(newChild, oldChild);
210cdf0e10cSrcweir     }
setNodeValue(const OUString & nodeValue)211cdf0e10cSrcweir     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
212cdf0e10cSrcweir         throw (RuntimeException, DOMException)
213cdf0e10cSrcweir     {
214cdf0e10cSrcweir         return CCharacterData::setNodeValue(nodeValue);
215cdf0e10cSrcweir     }
setPrefix(const OUString & prefix)216cdf0e10cSrcweir     virtual void SAL_CALL setPrefix(const OUString& prefix)
217cdf0e10cSrcweir         throw (RuntimeException, DOMException)
218cdf0e10cSrcweir     {
219cdf0e10cSrcweir         return CCharacterData::setPrefix(prefix);
220cdf0e10cSrcweir     }
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     };
223cdf0e10cSrcweir }
224cdf0e10cSrcweir 
225cdf0e10cSrcweir #endif
226