Bump version to 24.04.3.4
[LibreOffice.git] / unoxml / source / dom / entity.hxx
blob2668adb68701ca41585688970c15606aa016c186
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #pragma once
22 #include <libxml/tree.h>
24 #include <sal/types.h>
26 #include <com/sun/star/uno/Reference.h>
27 #include <com/sun/star/xml/dom/XEntity.hpp>
29 #include <cppuhelper/implbase.hxx>
30 #include <node.hxx>
32 namespace DOM
34 typedef ::cppu::ImplInheritanceHelper< CNode, css::xml::dom::XEntity > CEntity_Base;
36 class CEntity
37 : public CEntity_Base
39 private:
40 friend class CDocument;
42 xmlEntityPtr m_aEntityPtr;
44 CEntity(CDocument const& rDocument, ::osl::Mutex const& rMutex,
45 xmlEntityPtr const pEntity);
47 public:
48 virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType,
49 css::xml::dom::NodeType const*) override;
51 /**
52 For unparsed entities, the name of the notation for the entity.
54 virtual OUString SAL_CALL getNotationName() override;
56 /**
57 The public identifier associated with the entity, if specified.
59 virtual OUString SAL_CALL getPublicId() override;
61 /**
62 The system identifier associated with the entity, if specified.
64 virtual OUString SAL_CALL getSystemId() override;
66 // ---- resolve uno inheritance problems...
67 // overrides for XNode base
68 virtual OUString SAL_CALL getNodeName() override;
69 virtual OUString SAL_CALL getNodeValue() override;
70 // --- delegation for XNode base.
71 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) override
73 return CNode::appendChild(newChild);
75 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
77 return CNode::cloneNode(deep);
79 virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
81 return CNode::getAttributes();
83 virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
85 return CNode::getChildNodes();
87 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
89 return CNode::getFirstChild();
91 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
93 return CNode::getLastChild();
95 virtual OUString SAL_CALL getLocalName() override
97 return CNode::getLocalName();
99 virtual OUString SAL_CALL getNamespaceURI() override
101 return CNode::getNamespaceURI();
103 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
105 return CNode::getNextSibling();
107 virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
109 return CNode::getNodeType();
111 virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
113 return CNode::getOwnerDocument();
115 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
117 return CNode::getParentNode();
119 virtual OUString SAL_CALL getPrefix() override
121 return CNode::getPrefix();
123 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
125 return CNode::getPreviousSibling();
127 virtual sal_Bool SAL_CALL hasAttributes() override
129 return CNode::hasAttributes();
131 virtual sal_Bool SAL_CALL hasChildNodes() override
133 return CNode::hasChildNodes();
135 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
136 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) override
138 return CNode::insertBefore(newChild, refChild);
140 virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) override
142 return CNode::isSupported(feature, ver);
144 virtual void SAL_CALL normalize() override
146 CNode::normalize();
148 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
150 return CNode::removeChild(oldChild);
152 virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
153 const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
155 return CNode::replaceChild(newChild, oldChild);
157 virtual void SAL_CALL setNodeValue(const OUString& nodeValue) override
159 return CNode::setNodeValue(nodeValue);
161 virtual void SAL_CALL setPrefix(const OUString& prefix) override
163 return CNode::setPrefix(prefix);
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */