2014-08-14 06:56:34 +08:00
|
|
|
#include <xlnt/worksheet/worksheet.hpp>
|
2014-05-31 06:42:25 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
#include "cell_impl.hpp"
|
|
|
|
#include "comment_impl.hpp"
|
|
|
|
|
2014-05-31 06:42:25 +08:00
|
|
|
namespace xlnt {
|
|
|
|
namespace detail {
|
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
cell_impl::cell_impl() : parent_(nullptr), type_(cell::type::null),
|
|
|
|
column_(1), row_(1), style_(nullptr), is_merged_(false),
|
|
|
|
is_date_(false), has_hyperlink_(false), xf_index_(0), comment_(nullptr)
|
2014-05-31 06:42:25 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
cell_impl::cell_impl(column_t column, row_t row)
|
|
|
|
: parent_(nullptr), type_(cell::type::null), column_(column), row_(row),
|
|
|
|
style_(nullptr), is_merged_(false), is_date_(false),
|
|
|
|
has_hyperlink_(false), xf_index_(0), comment_(nullptr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
cell_impl::cell_impl(worksheet_impl *parent, column_t column, row_t row)
|
|
|
|
: parent_(parent), type_(cell::type::null), column_(column), row_(row), style_(nullptr),
|
|
|
|
is_merged_(false), is_date_(false), has_hyperlink_(false), xf_index_(0), comment_(nullptr)
|
2014-05-31 06:42:25 +08:00
|
|
|
{
|
|
|
|
}
|
2014-06-13 05:04:37 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
cell_impl::cell_impl(const cell_impl &rhs)
|
2014-06-13 05:04:37 +08:00
|
|
|
{
|
|
|
|
*this = rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
cell_impl &cell_impl::operator=(const cell_impl &rhs)
|
|
|
|
{
|
|
|
|
parent_ = rhs.parent_;
|
2015-10-14 01:56:07 +08:00
|
|
|
value_numeric_ = rhs.value_numeric_;
|
|
|
|
value_string_ = rhs.value_string_;
|
2014-06-13 05:04:37 +08:00
|
|
|
hyperlink_ = rhs.hyperlink_;
|
2014-07-26 04:39:25 +08:00
|
|
|
formula_ = rhs.formula_;
|
|
|
|
column_ = rhs.column_;
|
|
|
|
row_ = rhs.row_;
|
2015-10-14 01:56:07 +08:00
|
|
|
is_merged_ = rhs.is_merged_;
|
2014-06-13 05:04:37 +08:00
|
|
|
is_date_ = rhs.is_date_;
|
|
|
|
has_hyperlink_ = rhs.has_hyperlink_;
|
2015-10-14 01:56:07 +08:00
|
|
|
type_ = rhs.type_;
|
|
|
|
|
|
|
|
if(rhs.style_ != nullptr)
|
|
|
|
{
|
|
|
|
style_.reset(new style(*rhs.style_));
|
|
|
|
}
|
|
|
|
|
|
|
|
if(rhs.comment_ != nullptr)
|
|
|
|
{
|
|
|
|
comment_.reset(new comment_impl(*rhs.comment_));
|
|
|
|
}
|
|
|
|
|
2014-06-13 05:04:37 +08:00
|
|
|
return *this;
|
|
|
|
}
|
2014-05-31 06:42:25 +08:00
|
|
|
|
|
|
|
} // namespace detail
|
|
|
|
} // namespace xlnt
|