xlnt/source/cell/comment.cpp

43 lines
668 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 std::string &text, const std::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()
{
}
std::string comment::get_author() const
{
return d_->author_;
2014-07-26 04:39:25 +08:00
}
std::string comment::get_text() const
{
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