LibreOffice Module unoxml (master) 1
comment.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <com/sun/star/uno/Reference.h>
23#include <com/sun/star/xml/dom/XComment.hpp>
24
26#include "characterdata.hxx"
27
28namespace DOM
29{
30 typedef ::cppu::ImplInheritanceHelper< CCharacterData, css::xml::dom::XComment >
32
34 : public CComment_Base
35 {
36 friend class CDocument;
37
38 CComment(CDocument const& rDocument, ::osl::Mutex const& rMutex,
39 xmlNodePtr const pNode);
40
41 public:
42
43 virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) override;
44
45 // --- delegations for XCharacterData
46 virtual void SAL_CALL appendData(const OUString& arg) override
47 {
49 }
50 virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
51 {
53 }
54 virtual OUString SAL_CALL getData() override
55 {
57 }
58 virtual sal_Int32 SAL_CALL getLength() override
59 {
61 }
62 virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) override
63 {
64 CCharacterData::insertData(offset, arg);
65 }
66 virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) override
67 {
69 }
70 virtual void SAL_CALL setData(const OUString& data) override
71 {
73 }
74 virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
75 {
77 }
78
79
80 // --- overrides for XNode base
81 virtual OUString SAL_CALL getNodeName() override;
82 virtual OUString SAL_CALL getNodeValue() override;
83
84 // --- delegation for XNode base.
85 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) override
86 {
87 return CCharacterData::appendChild(newChild);
88 }
89 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
90 {
91 return CCharacterData::cloneNode(deep);
92 }
93 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
94 {
96 }
97 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
98 {
100 }
101 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
102 {
104 }
105 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
106 {
108 }
109 virtual OUString SAL_CALL getLocalName() override
110 {
112 }
113 virtual OUString SAL_CALL getNamespaceURI() override
114 {
116 }
117 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
118 {
120 }
121 virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
122 {
124 }
125 virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
126 {
128 }
129 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
130 {
132 }
133 virtual OUString SAL_CALL getPrefix() override
134 {
136 }
137 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
138 {
140 }
141 virtual sal_Bool SAL_CALL hasAttributes() override
142 {
144 }
145 virtual sal_Bool SAL_CALL hasChildNodes() override
146 {
148 }
149 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
150 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) override
151 {
152 return CCharacterData::insertBefore(newChild, refChild);
153 }
154 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) override
155 {
156 return CCharacterData::isSupported(feature, ver);
157 }
158 virtual void SAL_CALL normalize() override
159 {
161 }
162 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
163 {
164 return CCharacterData::removeChild(oldChild);
165 }
166 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
167 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
168 {
169 return CCharacterData::replaceChild(newChild, oldChild);
170 }
171 virtual void SAL_CALL setNodeValue(const OUString& nodeValue) override
172 {
173 return CCharacterData::setNodeValue(nodeValue);
174 }
175 virtual void SAL_CALL setPrefix(const OUString& prefix) override
176 {
178 }
179
180 };
181}
182
183/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getData() override
Return the character data of the node that implements this interface.
virtual OUString SAL_CALL getLocalName() override
virtual OUString SAL_CALL getNamespaceURI() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &refChild) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode > &newChild) override
virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString &arg) override
Replace the characters starting at the specified 16-bit unit offset with the specified string.
virtual void SAL_CALL setPrefix(const OUString &prefix) override
virtual sal_Int32 SAL_CALL getLength() override
The number of 16-bit units that are available through data and the substringData method below.
virtual void SAL_CALL setData(const OUString &data) override
Set the character data of the node that implements this interface.
virtual void SAL_CALL normalize() override
virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
virtual void SAL_CALL insertData(sal_Int32 offset, const OUString &arg) override
Insert a string at the specified 16-bit unit offset.
virtual sal_Bool SAL_CALL isSupported(const OUString &feature, const OUString &ver) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
Extracts a range of data from the node.
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
virtual void SAL_CALL setNodeValue(const OUString &nodeValue) override
virtual void SAL_CALL appendData(const OUString &arg) override
Append the string to the end of the character data of the node.
virtual sal_Bool SAL_CALL hasChildNodes() override
virtual sal_Bool SAL_CALL hasAttributes() override
virtual OUString SAL_CALL getPrefix() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
Remove a range of 16-bit units from the node.
virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
virtual sal_Bool SAL_CALL hasAttributes() override
Definition: comment.hxx:141
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
Definition: comment.hxx:125
virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
Definition: comment.hxx:121
virtual sal_Bool SAL_CALL isSupported(const OUString &feature, const OUString &ver) override
Definition: comment.hxx:154
virtual sal_Int32 SAL_CALL getLength() override
Definition: comment.hxx:58
virtual void SAL_CALL setPrefix(const OUString &prefix) override
Definition: comment.hxx:175
virtual OUString SAL_CALL getNamespaceURI() override
Definition: comment.hxx:113
CComment(CDocument const &rDocument, ::osl::Mutex const &rMutex, xmlNodePtr const pNode)
Definition: comment.cxx:30
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
Definition: comment.hxx:101
virtual void SAL_CALL setData(const OUString &data) override
Definition: comment.hxx:70
virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString &arg) override
Definition: comment.hxx:66
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &refChild) override
Definition: comment.hxx:149
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
Definition: comment.hxx:117
virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
Definition: comment.hxx:74
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
Definition: comment.hxx:129
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
Definition: comment.hxx:97
virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler > &i_xHandler) override
Definition: comment.cxx:36
virtual OUString SAL_CALL getNodeName() override
Definition: comment.cxx:45
virtual void SAL_CALL setNodeValue(const OUString &nodeValue) override
Definition: comment.hxx:171
virtual void SAL_CALL appendData(const OUString &arg) override
Definition: comment.hxx:46
virtual void SAL_CALL insertData(sal_Int32 offset, const OUString &arg) override
Definition: comment.hxx:62
virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
Definition: comment.hxx:50
virtual sal_Bool SAL_CALL hasChildNodes() override
Definition: comment.hxx:145
virtual void SAL_CALL normalize() override
Definition: comment.hxx:158
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode > &newChild) override
Definition: comment.hxx:85
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
Definition: comment.hxx:105
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
Definition: comment.hxx:89
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
Definition: comment.hxx:162
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
Definition: comment.hxx:137
virtual OUString SAL_CALL getLocalName() override
Definition: comment.hxx:109
virtual OUString SAL_CALL getNodeValue() override
Definition: comment.cxx:50
virtual OUString SAL_CALL getData() override
Definition: comment.hxx:54
virtual OUString SAL_CALL getPrefix() override
Definition: comment.hxx:133
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
Definition: comment.hxx:166
virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
Definition: comment.hxx:93
Definition: attr.cxx:38
::cppu::ImplInheritanceHelper< CCharacterData, css::xml::dom::XComment > CComment_Base
Definition: comment.hxx:31
unsigned char sal_Bool