xlnt/source/cell/comment.cpp

43 lines
644 B
C++
Raw Normal View History

#include <xlnt/cell/cell.hpp>
2015-10-15 06:05:13 +08:00
#include <xlnt/cell/comment.hpp>
#include "detail/comment_impl.hpp"
2014-07-26 04:39:25 +08:00
namespace xlnt {
comment::comment(detail::comment_impl *d) : d_(d)
{
}
comment::comment(cell parent, const string &text, const string &author) : d_(nullptr)
2014-07-26 04:39:25 +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
}
comment::comment() : d_(nullptr)
2014-07-26 04:39:25 +08:00
{
}
comment::~comment()
{
}
string comment::get_author() const
2014-07-26 04:39:25 +08:00
{
return d_->author_;
2014-07-26 04:39:25 +08:00
}
string comment::get_text() const
2014-07-26 04:39:25 +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