2016-08-16 12:23:49 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <xlnt/utils/optional.hpp>
|
|
|
|
|
|
|
|
namespace xlnt {
|
|
|
|
|
|
|
|
class alignment;
|
|
|
|
class border;
|
|
|
|
class fill;
|
|
|
|
class font;
|
|
|
|
class number_format;
|
|
|
|
class protection;
|
|
|
|
|
|
|
|
namespace detail {
|
|
|
|
|
|
|
|
struct stylesheet;
|
|
|
|
|
|
|
|
struct style_impl
|
|
|
|
{
|
|
|
|
stylesheet *parent;
|
|
|
|
|
2018-07-03 10:05:07 +08:00
|
|
|
bool operator==(const style_impl& rhs) const
|
|
|
|
{
|
|
|
|
return name == rhs.name
|
|
|
|
&& formatting_record_id == rhs.formatting_record_id
|
|
|
|
&& custom_builtin == rhs.custom_builtin
|
|
|
|
&& hidden_style == rhs.hidden_style
|
|
|
|
&& builtin_id == rhs.builtin_id
|
|
|
|
&& outline_style == rhs.outline_style
|
|
|
|
&& alignment_id == rhs.alignment_id
|
|
|
|
&& alignment_applied == rhs.alignment_applied
|
|
|
|
&& border_id == rhs.border_id
|
|
|
|
&& border_applied == rhs.border_applied
|
|
|
|
&& fill_id == rhs.fill_id
|
|
|
|
&& fill_applied == rhs.fill_applied
|
|
|
|
&& font_id == rhs.font_id
|
|
|
|
&& font_applied == rhs.font_applied
|
|
|
|
&& number_format_id == rhs.number_format_id
|
|
|
|
&& number_format_applied == number_format_applied
|
|
|
|
&& protection_id == rhs.protection_id
|
|
|
|
&& protection_applied == rhs.protection_applied
|
|
|
|
&& pivot_button_ == rhs.pivot_button_
|
|
|
|
&& quote_prefix_ == rhs.quote_prefix_;
|
|
|
|
}
|
|
|
|
|
2016-08-16 12:23:49 +08:00
|
|
|
std::string name;
|
|
|
|
std::size_t formatting_record_id;
|
|
|
|
|
2017-03-26 22:30:26 +08:00
|
|
|
bool custom_builtin;
|
2016-08-16 12:23:49 +08:00
|
|
|
bool hidden_style;
|
|
|
|
|
2016-08-18 19:34:18 +08:00
|
|
|
optional<std::size_t> builtin_id;
|
2016-08-16 12:23:49 +08:00
|
|
|
optional<std::size_t> outline_style;
|
|
|
|
|
2016-11-08 10:11:30 +08:00
|
|
|
optional<std::size_t> alignment_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> alignment_applied;
|
2016-11-08 10:11:30 +08:00
|
|
|
|
|
|
|
optional<std::size_t> border_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> border_applied;
|
2016-11-08 10:11:30 +08:00
|
|
|
|
|
|
|
optional<std::size_t> fill_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> fill_applied;
|
2016-11-08 10:11:30 +08:00
|
|
|
|
|
|
|
optional<std::size_t> font_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> font_applied;
|
2016-11-08 10:11:30 +08:00
|
|
|
|
|
|
|
optional<std::size_t> number_format_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> number_format_applied;
|
2016-11-08 10:11:30 +08:00
|
|
|
|
|
|
|
optional<std::size_t> protection_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> protection_applied;
|
2017-02-15 05:02:51 +08:00
|
|
|
|
2017-02-19 10:33:59 +08:00
|
|
|
bool pivot_button_ = false;
|
|
|
|
bool quote_prefix_ = false;
|
2016-08-16 12:23:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace detail
|
|
|
|
} // namespace xlnt
|