Coverage Report

Created: 2026-03-31 11:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/unoxml/source/dom/text.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 <cppuhelper/implbase.hxx>
27
28
#include <com/sun/star/uno/Reference.h>
29
#include <com/sun/star/xml/dom/XNode.hpp>
30
#include <com/sun/star/xml/dom/XText.hpp>
31
32
#include "characterdata.hxx"
33
34
namespace DOM
35
{
36
    typedef ::cppu::ImplInheritanceHelper< CCharacterData, css::xml::dom::XText > CText_Base;
37
38
    class CText
39
        : public CText_Base
40
    {
41
    private:
42
        friend class CDocument;
43
44
    protected:
45
        CText(CDocument const& rDocument, ::osl::Mutex const& rMutex,
46
                css::xml::dom::NodeType const& reNodeType, xmlNodePtr const& rpNode);
47
        CText(CDocument const& rDocument, ::osl::Mutex const& rMutex,
48
                xmlNodePtr const pNode);
49
50
    public:
51
52
        virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler >& i_xHandler) override;
53
54
        virtual void fastSaxify( Context& io_rContext ) override;
55
56
         // Breaks this node into two nodes at the specified offset, keeping
57
         // both in the tree as siblings.
58
         virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL splitText(sal_Int32 offset) override;
59
60
61
         // --- delegations for XCharacterData
62
        virtual void SAL_CALL appendData(const OUString& arg) override
63
0
        {
64
0
            CCharacterData::appendData(arg);
65
0
        }
66
        virtual void SAL_CALL deleteData(sal_Int32 offset, sal_Int32 count) override
67
0
        {
68
0
            CCharacterData::deleteData(offset, count);
69
0
        }
70
        virtual OUString SAL_CALL getData() override
71
327k
        {
72
327k
            return CCharacterData::getData();
73
327k
        }
74
        virtual sal_Int32 SAL_CALL getLength() override
75
0
        {
76
0
            return CCharacterData::getLength();
77
0
        }
78
        virtual void SAL_CALL insertData(sal_Int32 offset, const OUString& arg) override
79
0
        {
80
0
            CCharacterData::insertData(offset, arg);
81
0
        }
82
        virtual void SAL_CALL replaceData(sal_Int32 offset, sal_Int32 count, const OUString& arg) override
83
0
        {
84
0
            CCharacterData::replaceData(offset, count, arg);
85
0
        }
86
        virtual void SAL_CALL setData(const OUString& data) override
87
8.88k
        {
88
8.88k
            CCharacterData::setData(data);
89
8.88k
        }
90
        virtual OUString SAL_CALL subStringData(sal_Int32 offset, sal_Int32 count) override
91
0
        {
92
0
            return CCharacterData::subStringData(offset, count);
93
0
        }
94
95
96
         // --- overrides for XNode base
97
        virtual OUString SAL_CALL getNodeName() override;
98
99
        // --- resolve uno inheritance problems...
100
        // --- delegation for XNode base.
101
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL appendChild(const css::uno::Reference< css::xml::dom::XNode >& newChild) override
102
0
        {
103
0
            return CCharacterData::appendChild(newChild);
104
0
        }
105
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
106
0
        {
107
0
            return CCharacterData::cloneNode(deep);
108
0
        }
109
        virtual css::uno::Reference< css::xml::dom::XNamedNodeMap > SAL_CALL getAttributes() override
110
0
        {
111
0
            return CCharacterData::getAttributes();
112
0
        }
113
        virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getChildNodes() override
114
0
        {
115
0
            return CCharacterData::getChildNodes();
116
0
        }
117
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getFirstChild() override
118
0
        {
119
0
            return CCharacterData::getFirstChild();
120
0
        }
121
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getLastChild() override
122
0
        {
123
0
            return CCharacterData::getLastChild();
124
0
        }
125
        virtual OUString SAL_CALL getLocalName() override
126
0
        {
127
0
            return CCharacterData::getLocalName();
128
0
        }
129
        virtual OUString SAL_CALL getNamespaceURI() override
130
0
        {
131
0
            return CCharacterData::getNamespaceURI();
132
0
        }
133
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getNextSibling() override
134
0
        {
135
0
            return CCharacterData::getNextSibling();
136
0
        }
137
        virtual css::xml::dom::NodeType SAL_CALL getNodeType() override
138
69.4k
        {
139
69.4k
            return CCharacterData::getNodeType();
140
69.4k
        }
141
        virtual OUString SAL_CALL getNodeValue() override
142
69.4k
        {
143
69.4k
            return CCharacterData::getNodeValue();
144
69.4k
        }
145
        virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getOwnerDocument() override
146
0
        {
147
0
            return CCharacterData::getOwnerDocument();
148
0
        }
149
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getParentNode() override
150
0
        {
151
0
            return CCharacterData::getParentNode();
152
0
        }
153
        virtual OUString SAL_CALL getPrefix() override
154
0
        {
155
0
            return CCharacterData::getPrefix();
156
0
        }
157
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getPreviousSibling() override
158
0
        {
159
0
            return CCharacterData::getPreviousSibling();
160
0
        }
161
        virtual sal_Bool SAL_CALL hasAttributes() override
162
0
        {
163
0
            return CCharacterData::hasAttributes();
164
0
        }
165
        virtual sal_Bool SAL_CALL hasChildNodes() override
166
0
        {
167
0
            return CCharacterData::hasChildNodes();
168
0
        }
169
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL insertBefore(
170
                const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& refChild) override
171
0
        {
172
0
            return CCharacterData::insertBefore(newChild, refChild);
173
0
        }
174
        virtual sal_Bool SAL_CALL isSupported(const OUString& feature, const OUString& ver) override
175
0
        {
176
0
            return CCharacterData::isSupported(feature, ver);
177
0
        }
178
        virtual void SAL_CALL normalize() override
179
0
        {
180
0
            CCharacterData::normalize();
181
0
        }
182
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL removeChild(const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
183
0
        {
184
0
            return CCharacterData::removeChild(oldChild);
185
0
        }
186
        virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL replaceChild(
187
                const css::uno::Reference< css::xml::dom::XNode >& newChild, const css::uno::Reference< css::xml::dom::XNode >& oldChild) override
188
0
        {
189
0
            return CCharacterData::replaceChild(newChild, oldChild);
190
0
        }
191
        virtual void SAL_CALL setNodeValue(const OUString& nodeValue) override
192
8.88k
        {
193
8.88k
            return CCharacterData::setNodeValue(nodeValue);
194
8.88k
        }
195
        virtual void SAL_CALL setPrefix(const OUString& prefix) override
196
0
        {
197
0
            return CCharacterData::setPrefix(prefix);
198
0
        }
199
200
    };
201
}
202
203
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */