LibreOffice Module oox (master)  1
comments.hxx
Go to the documentation of this file.
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 
23 {
24  OUString clrIdx;
25  OUString id;
26  OUString initials;
27  OUString lastIdx;
28  OUString name;
29 };
30 
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  {
41  cmAuthorLst.push_back(_author);
42  }
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  {
63  authorId = _aId;
64  }
65  void setdt(const OUString& _dt)
66  {
67  dt=_dt;
68  setDateTime(_dt);
69  }
70  void setidx(const OUString& _idx)
71  {
72  idx=_idx;
73  }
74  void setPoint(const OUString& _x, const OUString& _y)
75  {
76  x=_x;
77  y=_y;
78  }
79  void setText(const OUString& _text)
80  {
81  text = _text;
82  }
83  const OUString& get_text() const
84  {
85  return text;
86  }
87  const css::util::DateTime& getDateTime() const
88  {
89  return aDateTime;
90  }
91  sal_Int32 getIntX() const
92  {
93  return x.toInt32();
94  }
95  sal_Int32 getIntY() const
96  {
97  return y.toInt32();
98  }
99  OUString getAuthor ( const CommentAuthorList& list );
100 };
101 
103 {
104  public:
105  std::vector<Comment> cmLst;
106  int getSize () const
107  {
108  return static_cast<int>(cmLst.size());
109  }
110  const Comment& getCommentAtIndex (int index);
111 };
112 
113 }
114 
115 #endif
116 
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & get_text() const
Definition: comments.hxx:83
void setAuthorId(const OUString &_aId)
Definition: comments.hxx:61
OUString authorId
Definition: comments.hxx:50
sal_Int32 getIntY() const
Definition: comments.hxx:95
std::vector< Comment > cmLst
Definition: comments.hxx:105
void setText(const OUString &_text)
Definition: comments.hxx:79
sal_Int32 getIntX() const
Definition: comments.hxx:91
void setdt(const OUString &_dt)
Definition: comments.hxx:65
OUString getAuthor(const CommentAuthorList &list)
Definition: comments.cxx:64
std::vector< CommentAuthor > cmAuthorLst
Definition: comments.hxx:34
int getSize() const
Definition: comments.hxx:106
void setPoint(const OUString &_x, const OUString &_y)
Definition: comments.hxx:74
const css::util::DateTime & getDateTime() const
Definition: comments.hxx:87
const Comment & getCommentAtIndex(int index)
Definition: comments.cxx:75
void setValues(const CommentAuthorList &list)
Definition: comments.cxx:16
void setidx(const OUString &_idx)
Definition: comments.hxx:70
void setDateTime(const OUString &datetime)
Definition: comments.cxx:32
void addAuthor(const CommentAuthor &_author)
Definition: comments.hxx:39
css::util::DateTime aDateTime
Definition: comments.hxx:56