8#ifndef INCLUDED_ORCUS_SPREADSHEET_STYLES_HPP
9#define INCLUDED_ORCUS_SPREADSHEET_STYLES_HPP
12#include "../measurement.hpp"
18namespace orcus {
namespace spreadsheet {
28 color_t(color_elem_t _red, color_elem_t _green, color_elem_t _blue);
29 color_t(color_elem_t _alpha, color_elem_t _red, color_elem_t _green, color_elem_t _blue);
33 bool operator==(
const color_t& other)
const;
34 bool operator!=(
const color_t& other)
const;
39 std::string_view name;
43 underline_t underline_style;
44 underline_width_t underline_width;
45 underline_mode_t underline_mode;
46 underline_type_t underline_type;
49 strikethrough_style_t strikethrough_style;
50 strikethrough_width_t strikethrough_width;
51 strikethrough_type_t strikethrough_type;
52 strikethrough_text_t strikethrough_text;
67 bool underline_style =
false;
68 bool underline_width =
false;
69 bool underline_mode =
false;
70 bool underline_type =
false;
71 bool underline_color =
false;
73 bool strikethrough_style =
false;
74 bool strikethrough_width =
false;
75 bool strikethrough_type =
false;
76 bool strikethrough_text =
false;
87 fill_pattern_t pattern_type;
100 bool pattern_type =
false;
101 bool fg_color =
false;
102 bool bg_color =
false;
113 border_style_t style;
127 bool border_color =
false;
128 bool border_width =
false;
189 bool print_content =
false;
190 bool formula_hidden =
false;
202 std::string_view format_string;
216 bool identifier =
false;
217 bool format_string =
false;
238 ver_alignment_t ver_align;
239 bool apply_num_format:1;
243 bool apply_alignment:1;
244 bool apply_protection:1;
252 std::string_view name;
255 std::string_view parent_name;
275using style_attrs_t = std::pair<T, typename detail::to_active_type<T>::type>;
277ORCUS_SPM_DLLPUBLIC std::ostream& operator<< (std::ostream& os,
const color_t& c);
282 std::unique_ptr<impl> mp_impl;
288 void reserve_font_store(
size_t n);
289 size_t append_font(
const font_t& font);
292 void reserve_fill_store(
size_t n);
293 size_t append_fill(
const fill_t& fill);
296 void reserve_border_store(
size_t n);
297 size_t append_border(
const border_t& border);
300 size_t append_protection(
const protection_t& protection);
303 void reserve_number_format_store(
size_t n);
307 void reserve_cell_style_format_store(
size_t n);
310 void reserve_cell_format_store(
size_t n);
313 void reserve_diff_cell_format_store(
size_t n);
316 void reserve_cell_style_store(
size_t n);
319 const font_t* get_font(
size_t index)
const;
320 const style_attrs_t<font_t>* get_font_state(
size_t index)
const;
322 const fill_t* get_fill(
size_t index)
const;
323 const style_attrs_t<fill_t>* get_fill_state(
size_t index)
const;
325 const border_t* get_border(
size_t index)
const;
326 const style_attrs_t<border_t>* get_border_state(
size_t index)
const;
329 const style_attrs_t<protection_t>* get_protection_state(
size_t index)
const;
332 const style_attrs_t<number_format_t>* get_number_format_state(
size_t index)
const;
335 const cell_format_t* get_cell_style_format(
size_t index)
const;
339 size_t get_font_count()
const;
340 size_t get_fill_count()
const;
341 size_t get_border_count()
const;
342 size_t get_protection_count()
const;
343 size_t get_number_format_count()
const;
344 size_t get_cell_formats_count()
const;
345 size_t get_cell_style_formats_count()
const;
346 size_t get_dxf_count()
const;
347 size_t get_cell_styles_count()
const;
Definition styles.hpp:280
Definition styles.hpp:155
Definition styles.hpp:125
Definition styles.hpp:112
Definition styles.hpp:138
Definition styles.hpp:251
Definition styles.hpp:264
Definition styles.hpp:186
Definition styles.hpp:172