1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <com/sun/star/uno/Reference.h>
23 #include <com/sun/star/xml/dom/XCDATASection.hpp>
25 #include <cppuhelper/implbase.hxx>
30 typedef ::cppu::ImplInheritanceHelper
< CText
, css::xml::dom::XCDATASection
>
34 : public CCDATASection_Base
36 friend class CDocument
;
38 CCDATASection(CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
39 xmlNodePtr
const pNode
);
43 virtual void saxify(const css::uno::Reference
< css::xml::sax::XDocumentHandler
>& i_xHandler
) override
;
45 virtual css::uno::Reference
< css::xml::dom::XText
> SAL_CALL
splitText(sal_Int32 offset
) override
47 return CText::splitText(offset
);
50 // --- delegations for XCharacterData
51 virtual void SAL_CALL
appendData(const OUString
& arg
) override
53 CCharacterData::appendData(arg
);
55 virtual void SAL_CALL
deleteData(sal_Int32 offset
, sal_Int32 count
) override
57 CCharacterData::deleteData(offset
, count
);
59 virtual OUString SAL_CALL
getData() override
61 return CCharacterData::getData();
63 virtual sal_Int32 SAL_CALL
getLength() override
65 return CCharacterData::getLength();
67 virtual void SAL_CALL
insertData(sal_Int32 offset
, const OUString
& arg
) override
69 CCharacterData::insertData(offset
, arg
);
71 virtual void SAL_CALL
replaceData(sal_Int32 offset
, sal_Int32 count
, const OUString
& arg
) override
73 CCharacterData::replaceData(offset
, count
, arg
);
75 virtual void SAL_CALL
setData(const OUString
& data
) override
77 CCharacterData::setData(data
);
79 virtual OUString SAL_CALL
subStringData(sal_Int32 offset
, sal_Int32 count
) override
81 return CCharacterData::subStringData(offset
, count
);
85 // --- overrides for XNode base
86 virtual OUString SAL_CALL
getNodeName() override
;
87 virtual OUString SAL_CALL
getNodeValue() override
;
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
92 return CNode::appendChild(newChild
);
94 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
96 return CNode::cloneNode(deep
);
98 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
100 return CNode::getAttributes();
102 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
104 return CNode::getChildNodes();
106 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
108 return CNode::getFirstChild();
110 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
112 return CNode::getLastChild();
114 virtual OUString SAL_CALL
getLocalName() override
116 return CNode::getLocalName();
118 virtual OUString SAL_CALL
getNamespaceURI() override
120 return CNode::getNamespaceURI();
122 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
124 return CNode::getNextSibling();
126 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
128 return CNode::getNodeType();
130 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
132 return CNode::getOwnerDocument();
134 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
136 return CNode::getParentNode();
138 virtual OUString SAL_CALL
getPrefix() override
140 return CNode::getPrefix();
142 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
144 return CNode::getPreviousSibling();
146 virtual sal_Bool SAL_CALL
hasAttributes() override
148 return CNode::hasAttributes();
150 virtual sal_Bool SAL_CALL
hasChildNodes() override
152 return CNode::hasChildNodes();
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
157 return CNode::insertBefore(newChild
, refChild
);
159 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
161 return CNode::isSupported(feature
, ver
);
163 virtual void SAL_CALL
normalize() override
167 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
169 return CNode::removeChild(oldChild
);
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
174 return CNode::replaceChild(newChild
, oldChild
);
176 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
) override
178 return CText::setNodeValue(nodeValue
);
180 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
182 return CNode::setPrefix(prefix
);
189 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */