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_COMMENT_HXX
21 : #define INCLUDED_UNOXML_SOURCE_DOM_COMMENT_HXX
22 :
23 : #include <com/sun/star/uno/Reference.h>
24 : #include <com/sun/star/xml/dom/XComment.hpp>
25 :
26 : #include <characterdata.hxx>
27 :
28 :
29 : using namespace com::sun::star::uno;
30 : using namespace com::sun::star::xml::dom;
31 :
32 : namespace DOM
33 : {
34 : typedef ::cppu::ImplInheritanceHelper1< CCharacterData, XComment >
35 : CComment_Base;
36 :
37 0 : class CComment
38 : : public CComment_Base
39 : {
40 : private:
41 : friend class CDocument;
42 :
43 : protected:
44 : CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
45 : xmlNodePtr const pNode);
46 :
47 : public:
48 :
49 : virtual void saxify(const Reference< XDocumentHandler >& i_xHandler) SAL_OVERRIDE;
50 :
51 : // --- delegations for XCharacterData
52 0 : virtual void SAL_CALL appendData(const OUString& arg)
53 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
54 : {
55 0 : CCharacterData::appendData(arg);
56 0 : }
57 0 : virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count)
58 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
59 : {
60 0 : CCharacterData::deleteData(offset, count);
61 0 : }
62 0 : virtual OUString SAL_CALL getData() throw (RuntimeException, std::exception) SAL_OVERRIDE
63 : {
64 0 : return CCharacterData::getData();
65 : }
66 0 : virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException, std::exception) SAL_OVERRIDE
67 : {
68 0 : return CCharacterData::getLength();
69 : }
70 0 : virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg)
71 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
72 : {
73 0 : CCharacterData::insertData(offset, arg);
74 0 : }
75 0 : virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg)
76 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
77 : {
78 0 : CCharacterData::replaceData(offset, count, arg);
79 0 : }
80 0 : virtual void SAL_CALL setData(const OUString& data)
81 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
82 : {
83 0 : CCharacterData::setData(data);
84 0 : }
85 0 : virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count)
86 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
87 : {
88 0 : return CCharacterData::subStringData(offset, count);
89 : }
90 :
91 :
92 : // --- overrides for XNode base
93 : virtual OUString SAL_CALL getNodeName()
94 : throw (RuntimeException, std::exception) SAL_OVERRIDE;
95 : virtual OUString SAL_CALL getNodeValue()
96 : throw (RuntimeException, std::exception) SAL_OVERRIDE;
97 :
98 : // --- delegation for XNde base.
99 0 : virtual Reference< XNode > SAL_CALL appendChild(const Reference< XNode >& newChild)
100 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
101 : {
102 0 : return CCharacterData::appendChild(newChild);
103 : }
104 0 : virtual Reference< XNode > SAL_CALL cloneNode(sal_Bool deep)
105 : throw (RuntimeException, std::exception) SAL_OVERRIDE
106 : {
107 0 : return CCharacterData::cloneNode(deep);
108 : }
109 0 : virtual Reference< XNamedNodeMap > SAL_CALL getAttributes()
110 : throw (RuntimeException, std::exception) SAL_OVERRIDE
111 : {
112 0 : return CCharacterData::getAttributes();
113 : }
114 0 : virtual Reference< XNodeList > SAL_CALL getChildNodes()
115 : throw (RuntimeException, std::exception) SAL_OVERRIDE
116 : {
117 0 : return CCharacterData::getChildNodes();
118 : }
119 0 : virtual Reference< XNode > SAL_CALL getFirstChild()
120 : throw (RuntimeException, std::exception) SAL_OVERRIDE
121 : {
122 0 : return CCharacterData::getFirstChild();
123 : }
124 0 : virtual Reference< XNode > SAL_CALL getLastChild()
125 : throw (RuntimeException, std::exception) SAL_OVERRIDE
126 : {
127 0 : return CCharacterData::getLastChild();
128 : }
129 0 : virtual OUString SAL_CALL getLocalName()
130 : throw (RuntimeException, std::exception) SAL_OVERRIDE
131 : {
132 0 : return CCharacterData::getLocalName();
133 : }
134 0 : virtual OUString SAL_CALL getNamespaceURI()
135 : throw (RuntimeException, std::exception) SAL_OVERRIDE
136 : {
137 0 : return CCharacterData::getNamespaceURI();
138 : }
139 0 : virtual Reference< XNode > SAL_CALL getNextSibling()
140 : throw (RuntimeException, std::exception) SAL_OVERRIDE
141 : {
142 0 : return CCharacterData::getNextSibling();
143 : }
144 0 : virtual NodeType SAL_CALL getNodeType()
145 : throw (RuntimeException, std::exception) SAL_OVERRIDE
146 : {
147 0 : return CCharacterData::getNodeType();
148 : }
149 0 : virtual Reference< XDocument > SAL_CALL getOwnerDocument()
150 : throw (RuntimeException, std::exception) SAL_OVERRIDE
151 : {
152 0 : return CCharacterData::getOwnerDocument();
153 : }
154 0 : virtual Reference< XNode > SAL_CALL getParentNode()
155 : throw (RuntimeException, std::exception) SAL_OVERRIDE
156 : {
157 0 : return CCharacterData::getParentNode();
158 : }
159 0 : virtual OUString SAL_CALL getPrefix()
160 : throw (RuntimeException, std::exception) SAL_OVERRIDE
161 : {
162 0 : return CCharacterData::getPrefix();
163 : }
164 0 : virtual Reference< XNode > SAL_CALL getPreviousSibling()
165 : throw (RuntimeException, std::exception) SAL_OVERRIDE
166 : {
167 0 : return CCharacterData::getPreviousSibling();
168 : }
169 0 : virtual sal_Bool SAL_CALL hasAttributes()
170 : throw (RuntimeException, std::exception) SAL_OVERRIDE
171 : {
172 0 : return CCharacterData::hasAttributes();
173 : }
174 0 : virtual sal_Bool SAL_CALL hasChildNodes()
175 : throw (RuntimeException, std::exception) SAL_OVERRIDE
176 : {
177 0 : return CCharacterData::hasChildNodes();
178 : }
179 0 : virtual Reference< XNode > SAL_CALL insertBefore(
180 : const Reference< XNode >& newChild, const Reference< XNode >& refChild)
181 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
182 : {
183 0 : return CCharacterData::insertBefore(newChild, refChild);
184 : }
185 0 : virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver)
186 : throw (RuntimeException, std::exception) SAL_OVERRIDE
187 : {
188 0 : return CCharacterData::isSupported(feature, ver);
189 : }
190 0 : virtual void SAL_CALL normalize()
191 : throw (RuntimeException, std::exception) SAL_OVERRIDE
192 : {
193 0 : CCharacterData::normalize();
194 0 : }
195 0 : virtual Reference< XNode > SAL_CALL removeChild(const Reference< XNode >& oldChild)
196 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
197 : {
198 0 : return CCharacterData::removeChild(oldChild);
199 : }
200 0 : virtual Reference< XNode > SAL_CALL replaceChild(
201 : const Reference< XNode >& newChild, const Reference< XNode >& oldChild)
202 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
203 : {
204 0 : return CCharacterData::replaceChild(newChild, oldChild);
205 : }
206 0 : virtual void SAL_CALL setNodeValue(const OUString& nodeValue)
207 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
208 : {
209 0 : return CCharacterData::setNodeValue(nodeValue);
210 : }
211 0 : virtual void SAL_CALL setPrefix(const OUString& prefix)
212 : throw (RuntimeException, DOMException, std::exception) SAL_OVERRIDE
213 : {
214 0 : return CCharacterData::setPrefix(prefix);
215 : }
216 :
217 : };
218 : }
219 :
220 : #endif
221 :
222 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|