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