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