2015-10-14 01:56:07 +08:00
|
|
|
#include <xlnt/cell/cell.hpp>
|
2015-10-15 06:05:13 +08:00
|
|
|
#include <xlnt/cell/comment.hpp>
|
2015-10-14 01:56:07 +08:00
|
|
|
|
|
|
|
#include "detail/comment_impl.hpp"
|
2014-07-26 04:39:25 +08:00
|
|
|
|
|
|
|
namespace xlnt {
|
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
comment::comment(detail::comment_impl *d) : d_(d)
|
|
|
|
{
|
|
|
|
}
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-11-05 07:45:03 +08:00
|
|
|
comment::comment(cell parent, const string &text, const string &author) : d_(nullptr)
|
2014-07-26 04:39:25 +08:00
|
|
|
{
|
2015-10-14 01:56:07 +08:00
|
|
|
d_ = parent.get_comment().d_;
|
2015-10-15 06:05:13 +08:00
|
|
|
d_->text_ = text;
|
|
|
|
d_->author_ = author;
|
2014-07-26 04:39:25 +08:00
|
|
|
}
|
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
comment::comment() : d_(nullptr)
|
2014-07-26 04:39:25 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
comment::~comment()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-11-05 07:45:03 +08:00
|
|
|
string comment::get_author() const
|
2014-07-26 04:39:25 +08:00
|
|
|
{
|
2015-10-14 01:56:07 +08:00
|
|
|
return d_->author_;
|
2014-07-26 04:39:25 +08:00
|
|
|
}
|
|
|
|
|
2015-11-05 07:45:03 +08:00
|
|
|
string comment::get_text() const
|
2014-07-26 04:39:25 +08:00
|
|
|
{
|
2015-10-14 01:56:07 +08:00
|
|
|
return d_->text_;
|
2014-07-26 04:39:25 +08:00
|
|
|
}
|
2015-10-15 06:05:13 +08:00
|
|
|
|
|
|
|
bool comment::operator==(const xlnt::comment &other) const
|
|
|
|
{
|
|
|
|
return d_ == other.d_;
|
|
|
|
}
|
2014-07-26 04:39:25 +08:00
|
|
|
|
|
|
|
} // namespace xlnt
|