2014-08-14 06:56:34 +08:00
|
|
|
#include <xlnt/styles/style.hpp>
|
2014-07-27 04:19:15 +08:00
|
|
|
|
|
|
|
namespace xlnt {
|
|
|
|
|
2014-07-30 06:01:54 +08:00
|
|
|
style::style(const style &rhs) : number_format_(rhs.number_format_), protection_(rhs.protection_)
|
2014-07-27 04:19:15 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void style::set_protection(xlnt::protection protection)
|
|
|
|
{
|
|
|
|
protection_ = protection;
|
|
|
|
}
|
|
|
|
|
|
|
|
void style::set_number_format(xlnt::number_format format)
|
|
|
|
{
|
|
|
|
number_format_ = format;
|
|
|
|
}
|
2015-10-14 01:56:07 +08:00
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
border &style::get_border()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return border_;
|
|
|
|
}
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
bool style::pivot_button()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return pivot_button_;
|
|
|
|
}
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
bool style::quote_prefix()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return quote_prefix_;
|
|
|
|
}
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
alignment &style::get_alignment()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return alignment_;
|
|
|
|
}
|
2014-07-27 04:19:15 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
fill &style::get_fill()
|
|
|
|
{
|
|
|
|
return fill_;
|
|
|
|
}
|
|
|
|
|
|
|
|
const fill &style::get_fill() const
|
|
|
|
{
|
|
|
|
return fill_;
|
|
|
|
}
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
font &style::get_font()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return font_;
|
|
|
|
}
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
protection &style::get_protection()
|
2015-10-14 01:56:07 +08:00
|
|
|
{
|
|
|
|
return protection_;
|
|
|
|
}
|
|
|
|
|
|
|
|
void style::set_pivot_button(bool pivot)
|
|
|
|
{
|
|
|
|
pivot_button_ = pivot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void style::set_quote_prefix(bool quote)
|
|
|
|
{
|
|
|
|
quote_prefix_ = quote;
|
|
|
|
}
|
|
|
|
|
2014-07-27 04:19:15 +08:00
|
|
|
} // namespace xlnt
|