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/XComment.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include "characterdata.hxx"
30 typedef ::cppu::ImplInheritanceHelper
< CCharacterData
, css::xml::dom::XComment
>
34 : public CComment_Base
36 friend class CDocument
;
38 CComment(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 // --- delegations for XCharacterData
46 virtual void SAL_CALL
appendData(const OUString
& arg
) override
48 CCharacterData::appendData(arg
);
50 virtual void SAL_CALL
deleteData(sal_Int32 offset
, sal_Int32 count
) override
52 CCharacterData::deleteData(offset
, count
);
54 virtual OUString SAL_CALL
getData() override
56 return CCharacterData::getData();
58 virtual sal_Int32 SAL_CALL
getLength() override
60 return CCharacterData::getLength();
62 virtual void SAL_CALL
insertData(sal_Int32 offset
, const OUString
& arg
) override
64 CCharacterData::insertData(offset
, arg
);
66 virtual void SAL_CALL
replaceData(sal_Int32 offset
, sal_Int32 count
, const OUString
& arg
) override
68 CCharacterData::replaceData(offset
, count
, arg
);
70 virtual void SAL_CALL
setData(const OUString
& data
) override
72 CCharacterData::setData(data
);
74 virtual OUString SAL_CALL
subStringData(sal_Int32 offset
, sal_Int32 count
) override
76 return CCharacterData::subStringData(offset
, count
);
80 // --- overrides for XNode base
81 virtual OUString SAL_CALL
getNodeName() override
;
82 virtual OUString SAL_CALL
getNodeValue() override
;
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
87 return CCharacterData::appendChild(newChild
);
89 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
91 return CCharacterData::cloneNode(deep
);
93 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
95 return CCharacterData::getAttributes();
97 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
99 return CCharacterData::getChildNodes();
101 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
103 return CCharacterData::getFirstChild();
105 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
107 return CCharacterData::getLastChild();
109 virtual OUString SAL_CALL
getLocalName() override
111 return CCharacterData::getLocalName();
113 virtual OUString SAL_CALL
getNamespaceURI() override
115 return CCharacterData::getNamespaceURI();
117 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
119 return CCharacterData::getNextSibling();
121 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
123 return CCharacterData::getNodeType();
125 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
127 return CCharacterData::getOwnerDocument();
129 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
131 return CCharacterData::getParentNode();
133 virtual OUString SAL_CALL
getPrefix() override
135 return CCharacterData::getPrefix();
137 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
139 return CCharacterData::getPreviousSibling();
141 virtual sal_Bool SAL_CALL
hasAttributes() override
143 return CCharacterData::hasAttributes();
145 virtual sal_Bool SAL_CALL
hasChildNodes() override
147 return CCharacterData::hasChildNodes();
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
152 return CCharacterData::insertBefore(newChild
, refChild
);
154 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
156 return CCharacterData::isSupported(feature
, ver
);
158 virtual void SAL_CALL
normalize() override
160 CCharacterData::normalize();
162 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
164 return CCharacterData::removeChild(oldChild
);
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
169 return CCharacterData::replaceChild(newChild
, oldChild
);
171 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
) override
173 return CCharacterData::setNodeValue(nodeValue
);
175 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
177 return CCharacterData::setPrefix(prefix
);
183 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */