This file is indexed.

/usr/include/KF5/messageviewer/htmlblock.h is in libkf5messageviewer-dev 4:17.12.3-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
   Copyright (c) 2015 Sandro Knauß <sknauss@kde.org>

   This library is free software; you can redistribute it and/or modify it
   under the terms of the GNU Library General Public License as published by
   the Free Software Foundation; either version 2 of the License, or (at your
   option) any later version.

   This library is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
   License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to the
   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
   02110-1301, USA.
*/

#ifndef __MIMETREEPARSER_HTMLBLOCK_H__
#define __MIMETREEPARSER_HTMLBLOCK_H__

#include "messageviewer_export.h"

#include <QString>
#include <QSharedPointer>

namespace KMime {
class Content;
}

namespace MimeTreeParser {
class HtmlWriter;

class MESSAGEVIEWER_EXPORT HTMLBlock
{
public:
    typedef QSharedPointer<HTMLBlock> Ptr;

    HTMLBlock();

    virtual ~HTMLBlock();

    QString enter();
    QString exit();
protected:
    QString dir() const;
    virtual QString enterString() const = 0;
    virtual QString exitString() const = 0;

private:
    bool entered;
};

// The attachment mark is a div that is placed around the attchment. It is used for drawing
// a yellow border around the attachment when scrolling to it. When scrolling to it, the border
// color of the div is changed, see KMReaderWin::scrollToAttachment().
class MESSAGEVIEWER_EXPORT AttachmentMarkBlock : public HTMLBlock
{
public:
    AttachmentMarkBlock(MimeTreeParser::HtmlWriter *writer, KMime::Content *node);
    virtual ~AttachmentMarkBlock();

protected:
    QString enterString() const override;
    QString exitString() const override;

private:
    void internalEnter();
    void internalExit();

    KMime::Content *mNode = nullptr;
    HtmlWriter *mWriter = nullptr;
};

// Make sure the whole content is relative, so that nothing is painted over the header
// if a malicious message uses absolute positioning.
// Also force word wrapping, which is useful for printing, see https://issues.kolab.org/issue3992.
class RootBlock : public HTMLBlock
{
public:
    RootBlock(MimeTreeParser::HtmlWriter *writer);
    virtual ~RootBlock();

protected:
    QString enterString() const override;
    QString exitString() const override;

private:
    void internalEnter();
    void internalExit();

    HtmlWriter *mWriter = nullptr;
};
}
#endif //__MIMETREEPARSER_HTMLBLOCK_H__