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 <libxml/tree.h>
24 #include <com/sun/star/uno/Reference.h>
25 #include <com/sun/star/xml/dom/XEntityReference.hpp>
27 #include <cppuhelper/implbase.hxx>
32 typedef ::cppu::ImplInheritanceHelper
< CNode
, css::xml::dom::XEntityReference
>
33 CEntityReference_Base
;
35 class CEntityReference
36 : public CEntityReference_Base
39 friend class CDocument
;
42 CDocument
const& rDocument
, ::osl::Mutex
const& rMutex
,
43 xmlNodePtr
const pNode
);
46 virtual bool IsChildTypeAllowed(css::xml::dom::NodeType
const nodeType
,
47 css::xml::dom::NodeType
const*) override
;
49 // ---- resolve uno inheritance problems...
50 // overrides for XNode base
51 virtual OUString SAL_CALL
getNodeName() override
;
52 virtual OUString SAL_CALL
getNodeValue() override
;
53 // --- delegation for XNode base.
54 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
appendChild(const css::uno::Reference
< css::xml::dom::XNode
>& newChild
) override
56 return CNode::appendChild(newChild
);
58 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
cloneNode(sal_Bool deep
) override
60 return CNode::cloneNode(deep
);
62 virtual css::uno::Reference
< css::xml::dom::XNamedNodeMap
> SAL_CALL
getAttributes() override
64 return CNode::getAttributes();
66 virtual css::uno::Reference
< css::xml::dom::XNodeList
> SAL_CALL
getChildNodes() override
68 return CNode::getChildNodes();
70 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getFirstChild() override
72 return CNode::getFirstChild();
74 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getLastChild() override
76 return CNode::getLastChild();
78 virtual OUString SAL_CALL
getLocalName() override
80 return CNode::getLocalName();
82 virtual OUString SAL_CALL
getNamespaceURI() override
84 return CNode::getNamespaceURI();
86 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getNextSibling() override
88 return CNode::getNextSibling();
90 virtual css::xml::dom::NodeType SAL_CALL
getNodeType() override
92 return CNode::getNodeType();
94 virtual css::uno::Reference
< css::xml::dom::XDocument
> SAL_CALL
getOwnerDocument() override
96 return CNode::getOwnerDocument();
98 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getParentNode() override
100 return CNode::getParentNode();
102 virtual OUString SAL_CALL
getPrefix() override
104 return CNode::getPrefix();
106 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
getPreviousSibling() override
108 return CNode::getPreviousSibling();
110 virtual sal_Bool SAL_CALL
hasAttributes() override
112 return CNode::hasAttributes();
114 virtual sal_Bool SAL_CALL
hasChildNodes() override
116 return CNode::hasChildNodes();
118 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
insertBefore(
119 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& refChild
) override
121 return CNode::insertBefore(newChild
, refChild
);
123 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
) override
125 return CNode::isSupported(feature
, ver
);
127 virtual void SAL_CALL
normalize() override
131 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
removeChild(const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
133 return CNode::removeChild(oldChild
);
135 virtual css::uno::Reference
< css::xml::dom::XNode
> SAL_CALL
replaceChild(
136 const css::uno::Reference
< css::xml::dom::XNode
>& newChild
, const css::uno::Reference
< css::xml::dom::XNode
>& oldChild
) override
138 return CNode::replaceChild(newChild
, oldChild
);
140 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
) override
142 return CNode::setNodeValue(nodeValue
);
144 virtual void SAL_CALL
setPrefix(const OUString
& prefix
) override
146 return CNode::setPrefix(prefix
);
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */