use insert function instead of for loop
[LibreOffice.git] / include / oox / ppt / comments.hxx
blobfb858e83d021ce5eb6176896403d27b49eab351c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
11 #ifndef INCLUDED_OOX_PPT_COMMENTS_HXX
12 #define INCLUDED_OOX_PPT_COMMENTS_HXX
14 #include <vector>
16 #include <com/sun/star/util/DateTime.hpp>
17 #include <rtl/ustring.hxx>
18 #include <sal/types.h>
20 namespace oox::ppt {
22 struct CommentAuthor
24 OUString clrIdx;
25 OUString id;
26 OUString initials;
27 OUString lastIdx;
28 OUString name;
31 class CommentAuthorList
33 private:
34 std::vector<CommentAuthor> cmAuthorLst;
36 public:
37 void setValues(const CommentAuthorList& list);
39 void addAuthor(const CommentAuthor& _author)
41 cmAuthorLst.push_back(_author);
44 friend class Comment;
47 class Comment
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;
58 void setDateTime (const OUString& datetime);
60 public:
61 void setAuthorId(const OUString& _aId)
63 authorId = _aId;
65 void setdt(const OUString& _dt)
67 dt=_dt;
68 setDateTime(_dt);
70 void setidx(const OUString& _idx)
72 idx=_idx;
74 void setPoint(const OUString& _x, const OUString& _y)
76 x=_x;
77 y=_y;
79 void setText(const OUString& _text)
81 text = _text;
83 const OUString& get_text() const
85 return text;
87 const css::util::DateTime& getDateTime() const
89 return aDateTime;
91 sal_Int32 getIntX() const
93 return x.toInt32();
95 sal_Int32 getIntY() const
97 return y.toInt32();
99 OUString getAuthor ( const CommentAuthorList& list );
100 OUString getInitials ( const CommentAuthorList& list );
103 class CommentList
105 public:
106 std::vector<Comment> cmLst;
107 int getSize () const
109 return static_cast<int>(cmLst.size());
111 const Comment& getCommentAtIndex (int index);
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */