2016-08-16 12:23:49 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
#include <xlnt/styles/alignment.hpp>
|
|
|
|
#include <xlnt/styles/border.hpp>
|
|
|
|
#include <xlnt/styles/fill.hpp>
|
|
|
|
#include <xlnt/styles/font.hpp>
|
|
|
|
#include <xlnt/styles/number_format.hpp>
|
|
|
|
#include <xlnt/styles/protection.hpp>
|
|
|
|
#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 format_impl
|
|
|
|
{
|
|
|
|
stylesheet *parent;
|
|
|
|
|
2016-08-18 19:34:18 +08:00
|
|
|
std::size_t id;
|
|
|
|
|
2016-08-19 10:11:59 +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
|
|
|
|
2016-08-19 10:11:59 +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
|
|
|
|
2016-08-19 10:11:59 +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
|
|
|
|
2016-08-19 10:11:59 +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
|
|
|
|
2016-08-19 10:11:59 +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
|
|
|
|
2016-08-19 10:11:59 +08:00
|
|
|
optional<std::size_t> protection_id;
|
2018-04-25 05:58:17 +08:00
|
|
|
optional<bool> protection_applied;
|
2016-08-18 19:34:18 +08:00
|
|
|
|
2017-02-19 10:33:59 +08:00
|
|
|
bool pivot_button_ = false;
|
|
|
|
bool quote_prefix_ = false;
|
2017-02-15 05:02:51 +08:00
|
|
|
|
2016-08-18 19:34:18 +08:00
|
|
|
optional<std::string> style;
|
2017-02-15 05:02:51 +08:00
|
|
|
|
2016-11-10 08:52:18 +08:00
|
|
|
std::size_t references = 0;
|
2017-02-15 05:02:51 +08:00
|
|
|
|
2016-11-08 10:11:30 +08:00
|
|
|
XLNT_API friend bool operator==(const format_impl &left, const format_impl &right)
|
|
|
|
{
|
|
|
|
return left.parent == right.parent
|
|
|
|
&& left.alignment_id == right.alignment_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.alignment_applied == right.alignment_applied
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.border_id == right.border_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.border_applied == right.border_applied
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.fill_id == right.fill_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.fill_applied == right.fill_applied
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.font_id == right.font_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.font_applied == right.font_applied
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.number_format_id == right.number_format_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.number_format_applied == right.number_format_applied
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.protection_id == right.protection_id
|
2017-03-31 11:52:57 +08:00
|
|
|
&& left.protection_applied == right.protection_applied
|
|
|
|
&& left.pivot_button_ == right.pivot_button_
|
|
|
|
&& left.quote_prefix_ == right.quote_prefix_
|
2016-11-08 10:11:30 +08:00
|
|
|
&& left.style == right.style;
|
|
|
|
}
|
2016-08-16 12:23:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace detail
|
|
|
|
} // namespace xlnt
|