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