Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/unoxml/source/dom/entity.hxx
Line
Count
Source
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 <libxml/tree.h>
23
24
#include <sal/types.h>
25
26
#include <com/sun/star/uno/Reference.h>
27
#include <com/sun/star/xml/dom/XEntity.hpp>
28
29
#include <cppuhelper/implbase.hxx>
30
#include <node.hxx>
31
32
namespace DOM
33
{
34
    typedef ::cppu::ImplInheritanceHelper< CNode, css::xml::dom::XEntity > CEntity_Base;
35
36
    class CEntity
37
        : public CEntity_Base
38
    {
39
    private:
40
        friend class CDocument;
41
42
        xmlEntityPtr m_aEntityPtr;
43
44
        CEntity(CDocument const& rDocument, ::osl::Mutex const& rMutex,
45
                xmlEntityPtr const pEntity);
46
47
    public:
48
        virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType,
49
                        css::xml::dom::NodeType const*) override;
50
51
        /**
52
        For unparsed entities, the name of the notation for the entity.
53
        */
54
        virtual OUString SAL_CALL getNotationName() override;
55
56
        /**
57
        The public identifier associated with the entity, if specified.
58
        */
59
        virtual OUString SAL_CALL getPublicId() override;
60
61
        /**
62
        The system identifier associated with the entity, if specified.
63
        */
64
        virtual OUString SAL_CALL getSystemId() override;
65
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
72
0
    {
73
0
        return CNode::appendChild(newChild);
74
0
    }
75
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
76
0
    {
77
0
        return CNode::cloneNode(deep);
78
0
    }
79
    virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
80
0
    {
81
0
        return CNode::getAttributes();
82
0
    }
83
    virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
84
0
    {
85
0
        return CNode::getChildNodes();
86
0
    }
87
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
88
0
    {
89
0
        return CNode::getFirstChild();
90
0
    }
91
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
92
0
    {
93
0
        return CNode::getLastChild();
94
0
    }
95
    virtual OUString SAL_CALL getLocalName() override
96
0
    {
97
0
        return CNode::getLocalName();
98
0
    }
99
    virtual OUString SAL_CALL getNamespaceURI() override
100
0
    {
101
0
        return CNode::getNamespaceURI();
102
0
    }
103
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
104
0
    {
105
0
        return CNode::getNextSibling();
106
0
    }
107
    virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
108
0
    {
109
0
        return CNode::getNodeType();
110
0
    }
111
    virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
112
0
    {
113
0
        return CNode::getOwnerDocument();
114
0
    }
115
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
116
0
    {
117
0
        return CNode::getParentNode();
118
0
    }
119
    virtual OUString SAL_CALL getPrefix() override
120
0
    {
121
0
        return CNode::getPrefix();
122
0
    }
123
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
124
0
    {
125
0
        return CNode::getPreviousSibling();
126
0
    }
127
    virtual sal_Bool SAL_CALL hasAttributes() override
128
0
    {
129
0
        return CNode::hasAttributes();
130
0
    }
131
    virtual sal_Bool SAL_CALL hasChildNodes() override
132
0
    {
133
0
        return CNode::hasChildNodes();
134
0
    }
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
137
0
    {
138
0
        return CNode::insertBefore(newChild, refChild);
139
0
    }
140
    virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) override
141
0
    {
142
0
        return CNode::isSupported(feature, ver);
143
0
    }
144
    virtual void SAL_CALL normalize() override
145
0
    {
146
0
        CNode::normalize();
147
0
    }
148
    virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
149
0
    {
150
0
        return CNode::removeChild(oldChild);
151
0
    }
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
154
0
    {
155
0
        return CNode::replaceChild(newChild, oldChild);
156
0
    }
157
    virtual void SAL_CALL setNodeValue(const OUString& nodeValue) override
158
0
    {
159
0
        return CNode::setNodeValue(nodeValue);
160
0
    }
161
    virtual void SAL_CALL setPrefix(const OUString& prefix) override
162
0
    {
163
0
        return CNode::setPrefix(prefix);
164
0
    }
165
166
167
    };
168
}
169
170
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */