Coverage Report

Created: 2026-11-10 07:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/poppler/qt6/src/poppler-textbox.cc
Line
Count
Source
1
/* poppler-qt.h: qt interface to poppler
2
 * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
3
 * Copyright (C) 2006-2008, Albert Astals Cid <aacid@kde.org>
4
 * Copyright (C) 2008, Pino Toscano <pino@kde.org>
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2, or (at your option)
9
 * any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19
 */
20
21
#include "poppler-qt6.h"
22
#include "poppler-private.h"
23
24
namespace Poppler {
25
26
TextBox::TextBox(const QString &text, const QRectF &bBox)
27
12.4k
{
28
12.4k
    m_data = new TextBoxData();
29
12.4k
    m_data->text = text;
30
12.4k
    m_data->bBox = bBox;
31
12.4k
}
32
33
TextBox::~TextBox()
34
12.4k
{
35
12.4k
    delete m_data;
36
12.4k
}
37
38
QString TextBox::text() const
39
0
{
40
0
    return m_data->text;
41
0
}
42
43
QRectF TextBox::boundingBox() const
44
12.4k
{
45
12.4k
    return m_data->bBox;
46
12.4k
}
47
48
TextBox *TextBox::nextWord() const
49
0
{
50
0
    return m_data->nextWord;
51
0
}
52
53
QRectF TextBox::charBoundingBox(int i) const
54
0
{
55
0
    return m_data->charBBoxes.value(i);
56
0
}
57
58
bool TextBox::hasSpaceAfter() const
59
0
{
60
0
    return m_data->hasSpaceAfter;
61
0
}
62
63
}