xref: /trunk/main/unoxml/source/dom/cdatasection.hxx (revision 45c5a00162811bd03b87fcb4fe9996782f2b59ec) !
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 
55         virtual Reference< XText > SAL_CALL splitText(sal_Int32 offset)
56         {
57             return CText::splitText(offset);
58         }
59 
60          // --- delegations for XCharacterData
61         virtual void SAL_CALL appendData(const OUString& arg)
62         {
63             CCharacterData::appendData(arg);
64         }
65         virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
66         {
67             CCharacterData::deleteData(offset, count);
68         }
69         virtual OUString SAL_CALL getData()
70         {
71             return CCharacterData::getData();
72         }
73         virtual sal_Int32 SAL_CALL getLength()
74         {
75             return CCharacterData::getLength();
76         }
77         virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
78         {
79             CCharacterData::insertData(offset, arg);
80         }
81         virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
82         {
83             CCharacterData::replaceData(offset, count, arg);
84         }
85         virtual void SAL_CALL setData(const OUString& data)
86         {
87             CCharacterData::setData(data);
88         }
89         virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
90         {
91             return CCharacterData::subStringData(offset, count);
92         }
93 
94 
95          // --- overrides for XNode base
96         virtual OUString SAL_CALL getNodeName();
97         virtual OUString SAL_CALL getNodeValue();
98 
99     // --- delegation for XNde base.
100     virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
101     {
102         return CNode::appendChild(newChild);
103     }
104     virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
105     {
106         return CNode::cloneNode(deep);
107     }
108     virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
109     {
110         return CNode::getAttributes();
111     }
112     virtual Reference< XNodeList > SAL_CALL getChildNodes()
113     {
114         return CNode::getChildNodes();
115     }
116     virtual Reference< XNode > SAL_CALL getFirstChild()
117     {
118         return CNode::getFirstChild();
119     }
120     virtual Reference< XNode > SAL_CALL getLastChild()
121     {
122         return CNode::getLastChild();
123     }
124     virtual OUString SAL_CALL getLocalName()
125     {
126         return CNode::getLocalName();
127     }
128     virtual OUString SAL_CALL getNamespaceURI()
129     {
130         return CNode::getNamespaceURI();
131     }
132     virtual Reference< XNode > SAL_CALL getNextSibling()
133     {
134         return CNode::getNextSibling();
135     }
136     virtual NodeType SAL_CALL getNodeType()
137     {
138         return CNode::getNodeType();
139     }
140     virtual Reference< XDocument > SAL_CALL getOwnerDocument()
141     {
142         return CNode::getOwnerDocument();
143     }
144     virtual Reference< XNode > SAL_CALL getParentNode()
145     {
146         return CNode::getParentNode();
147     }
148     virtual OUString SAL_CALL getPrefix()
149     {
150         return CNode::getPrefix();
151     }
152     virtual Reference< XNode > SAL_CALL getPreviousSibling()
153     {
154         return CNode::getPreviousSibling();
155     }
156     virtual sal_Bool SAL_CALL hasAttributes()
157     {
158         return CNode::hasAttributes();
159     }
160     virtual sal_Bool SAL_CALL hasChildNodes()
161     {
162         return CNode::hasChildNodes();
163     }
164     virtual Reference< XNode > SAL_CALL insertBefore(
165             const Reference< XNode >& newChild, const Reference< XNode >& refChild)
166     {
167         return CNode::insertBefore(newChild, refChild);
168     }
169     virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
170     {
171         return CNode::isSupported(feature, ver);
172     }
173     virtual void SAL_CALL normalize()
174     {
175         CNode::normalize();
176     }
177     virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
178     {
179         return CNode::removeChild(oldChild);
180     }
181     virtual Reference< XNode > SAL_CALL replaceChild(
182             const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
183     {
184         return CNode::replaceChild(newChild, oldChild);
185     }
186     virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
187     {
188         return CText::setNodeValue(nodeValue);
189     }
190     virtual void SAL_CALL setPrefix(const OUString& prefix)
191     {
192         return CNode::setPrefix(prefix);
193     }
194 
195     };
196 
197 }
198 
199 #endif
200