LibreOffice Module unoxml (master) 1
cdatasection.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/XCDATASection.hpp>
24
26#include "text.hxx"
27
28namespace DOM
29{
30 typedef ::cppu::ImplInheritanceHelper< CText, css::xml::dom::XCDATASection >
32
34 : public CCDATASection_Base
35 {
36 friend class CDocument;
37
38 CCDATASection(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 virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) override
46 {
47 return CText::splitText(offset);
48 }
49
50 // --- delegations for XCharacterData
51 virtual void SAL_CALL appendData(const OUString& arg) override
52 {
54 }
55 virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
56 {
58 }
59 virtual OUString SAL_CALL getData() override
60 {
62 }
63 virtual sal_Int32 SAL_CALL getLength() override
64 {
66 }
67 virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) override
68 {
69 CCharacterData::insertData(offset, arg);
70 }
71 virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) override
72 {
74 }
75 virtual void SAL_CALL setData(const OUString& data) override
76 {
78 }
79 virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
80 {
82 }
83
84
85 // --- overrides for XNode base
86 virtual OUString SAL_CALL getNodeName() override;
87 virtual OUString SAL_CALL getNodeValue() override;
88
89 // --- delegation for XNode base.
90 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) override
91 {
92 return CNode::appendChild(newChild);
93 }
94 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
95 {
96 return CNode::cloneNode(deep);
97 }
98 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
99 {
100 return CNode::getAttributes();
101 }
102 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
103 {
104 return CNode::getChildNodes();
105 }
106 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
107 {
108 return CNode::getFirstChild();
109 }
110 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
111 {
112 return CNode::getLastChild();
113 }
114 virtual OUString SAL_CALL getLocalName() override
115 {
116 return CNode::getLocalName();
117 }
118 virtual OUString SAL_CALL getNamespaceURI() override
119 {
120 return CNode::getNamespaceURI();
121 }
122 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
123 {
124 return CNode::getNextSibling();
125 }
126 virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
127 {
128 return CNode::getNodeType();
129 }
130 virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
131 {
132 return CNode::getOwnerDocument();
133 }
134 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
135 {
136 return CNode::getParentNode();
137 }
138 virtual OUString SAL_CALL getPrefix() override
139 {
140 return CNode::getPrefix();
141 }
142 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
143 {
144 return CNode::getPreviousSibling();
145 }
146 virtual sal_Bool SAL_CALL hasAttributes() override
147 {
148 return CNode::hasAttributes();
149 }
150 virtual sal_Bool SAL_CALL hasChildNodes() override
151 {
152 return CNode::hasChildNodes();
153 }
154 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
155 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) override
156 {
157 return CNode::insertBefore(newChild, refChild);
158 }
159 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) override
160 {
161 return CNode::isSupported(feature, ver);
162 }
163 virtual void SAL_CALL normalize() override
164 {
165 CNode::normalize();
166 }
167 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
168 {
169 return CNode::removeChild(oldChild);
170 }
171 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
172 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
173 {
174 return CNode::replaceChild(newChild, oldChild);
175 }
176 virtual void SAL_CALL setNodeValue(const OUString& nodeValue) override
177 {
178 return CText::setNodeValue(nodeValue);
179 }
180 virtual void SAL_CALL setPrefix(const OUString& prefix) override
181 {
182 return CNode::setPrefix(prefix);
183 }
184
185 };
186
187}
188
189/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getData() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
virtual OUString SAL_CALL getNodeValue() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode > &newChild) 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 replaceChild(const css::uno::Reference< css::xml::dom::XNode > &newChild, const css::uno::Reference< css::xml::dom::XNode > &oldChild) override
virtual void SAL_CALL appendData(const OUString &arg) override
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
virtual OUString SAL_CALL getNamespaceURI() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
virtual void SAL_CALL normalize() override
virtual void SAL_CALL setData(const OUString &data) override
virtual OUString SAL_CALL getPrefix() override
virtual sal_Bool SAL_CALL hasChildNodes() override
virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
CCDATASection(CDocument const &rDocument, ::osl::Mutex const &rMutex, xmlNodePtr const pNode)
virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler > &i_xHandler) override
virtual OUString SAL_CALL getLocalName() override
virtual sal_Bool SAL_CALL hasAttributes() override
virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) override
virtual sal_Bool SAL_CALL isSupported(const OUString &feature, const OUString &ver) override
virtual void SAL_CALL insertData(sal_Int32 offset, const OUString &arg) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString &arg) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() 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 getLastChild() override
virtual sal_Int32 SAL_CALL getLength() override
virtual OUString SAL_CALL getNodeName() override
virtual void SAL_CALL setPrefix(const OUString &prefix) override
virtual void SAL_CALL setNodeValue(const OUString &nodeValue) override
virtual OUString SAL_CALL getData() override
Return the character data of the node that implements this interface.
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 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 insertData(sal_Int32 offset, const OUString &arg) override
Insert a string at the specified 16-bit unit offset.
virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
Extracts a range of data from the node.
virtual void SAL_CALL appendData(const OUString &arg) override
Append the string to the end of the character data of the node.
virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
Remove a range of 16-bit units from the node.
virtual void SAL_CALL setNodeValue(const OUString &nodeValue) override
Definition: text.hxx:191
virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) override
Definition: text.cxx:66
Definition: attr.cxx:38
::cppu::ImplInheritanceHelper< CText, css::xml::dom::XCDATASection > CCDATASection_Base
unsigned char sal_Bool