Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/oox/ppt/comments.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
10
11
#ifndef INCLUDED_OOX_PPT_COMMENTS_HXX
12
#define INCLUDED_OOX_PPT_COMMENTS_HXX
13
14
#include <vector>
15
16
#include <com/sun/star/util/DateTime.hpp>
17
#include <rtl/ustring.hxx>
18
#include <sal/types.h>
19
20
namespace oox::ppt {
21
22
struct CommentAuthor
23
{
24
    OUString clrIdx;
25
    OUString id;
26
    OUString initials;
27
    OUString lastIdx;
28
    OUString name;
29
};
30
31
class CommentAuthorList
32
{
33
    private:
34
        std::vector<CommentAuthor> cmAuthorLst;
35
36
    public:
37
        void setValues(const CommentAuthorList& list);
38
39
        void addAuthor(const CommentAuthor& _author)
40
15
        {
41
15
            cmAuthorLst.push_back(_author);
42
15
        }
43
44
        friend class Comment;
45
};
46
47
class Comment
48
{
49
    private:
50
        OUString authorId;
51
        OUString dt;
52
        OUString idx;
53
        OUString x;
54
        OUString y;
55
        OUString text;
56
        css::util::DateTime aDateTime;
57
58
        void setDateTime (const OUString& datetime);
59
60
    public:
61
        void setAuthorId(const OUString& _aId)
62
56
        {
63
56
            authorId = _aId;
64
56
        }
65
        void setdt(const OUString& _dt)
66
56
        {
67
56
            dt=_dt;
68
56
            setDateTime(_dt);
69
56
        }
70
        void setidx(const OUString& _idx)
71
56
        {
72
56
            idx=_idx;
73
56
        }
74
        void setPoint(const OUString& _x, const OUString& _y)
75
56
        {
76
56
            x=_x;
77
56
            y=_y;
78
56
        }
79
        void setText(const OUString& _text)
80
56
        {
81
56
            text = _text;
82
56
        }
83
        const OUString& get_text() const
84
56
        {
85
56
            return text;
86
56
        }
87
        const css::util::DateTime& getDateTime() const
88
56
        {
89
56
            return aDateTime;
90
56
        }
91
        sal_Int32 getIntX() const
92
56
        {
93
56
            return x.toInt32();
94
56
        }
95
        sal_Int32 getIntY() const
96
56
        {
97
56
            return y.toInt32();
98
56
        }
99
        OUString getAuthor ( const CommentAuthorList& list );
100
        OUString getInitials ( const CommentAuthorList& list );
101
};
102
103
class CommentList
104
{
105
    public:
106
        std::vector<Comment> cmLst;
107
        int getSize () const
108
85
        {
109
85
            return static_cast<int>(cmLst.size());
110
85
        }
111
        const Comment& getCommentAtIndex (int index);
112
};
113
114
}
115
116
#endif
117
118
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */