8#ifndef INCLUDED_ORCUS_SPREADSHEET_STYLES_HPP
9#define INCLUDED_ORCUS_SPREADSHEET_STYLES_HPP
12#include "../measurement.hpp"
13#include "document_types.hpp"
19namespace orcus {
namespace spreadsheet {
28 std::optional<std::string_view> name;
29 std::optional<std::string_view> name_asian;
30 std::optional<std::string_view> name_complex;
31 std::optional<double> size;
32 std::optional<double> size_asian;
33 std::optional<double> size_complex;
34 std::optional<bool> bold;
35 std::optional<bool> bold_asian;
36 std::optional<bool> bold_complex;
37 std::optional<bool> italic;
38 std::optional<bool> italic_asian;
39 std::optional<bool> italic_complex;
40 std::optional<underline_t> underline_style;
41 std::optional<underline_width_t> underline_width;
42 std::optional<underline_mode_t> underline_mode;
43 std::optional<underline_type_t> underline_type;
44 std::optional<color_t> underline_color;
45 std::optional<color_t> color;
46 std::optional<strikethrough_style_t> strikethrough_style;
47 std::optional<strikethrough_width_t> strikethrough_width;
48 std::optional<strikethrough_type_t> strikethrough_type;
49 std::optional<strikethrough_text_t> strikethrough_text;
57 bool operator==(
const font_t& other)
const;
58 bool operator!=(
const font_t& other)
const;
62 struct ORCUS_SPM_DLLPUBLIC
hash
64 std::size_t operator()(
const font_t& v)
const;
73 std::optional<fill_pattern_t> pattern_type;
74 std::optional<color_t> fg_color;
75 std::optional<color_t> bg_color;
86 std::optional<border_style_t> style;
87 std::optional<color_t> border_color;
88 std::optional<length_t> border_width;
116 std::optional<bool> locked;
117 std::optional<bool> hidden;
118 std::optional<bool> print_content;
119 std::optional<bool> formula_hidden;
130 std::optional<std::size_t> identifier;
131 std::optional<std::string_view> format_string;
166 bool apply_num_format:1;
170 bool apply_alignment:1;
171 bool apply_protection:1;
185 std::string_view name;
186 std::string_view display_name;
189 std::string_view parent_name;
195ORCUS_SPM_DLLPUBLIC std::ostream& operator<< (std::ostream& os,
const color_t& c);
206 std::unique_ptr<impl> mp_impl;
212 void reserve_font_store(
size_t n);
213 std::size_t append_font(
const font_t& font);
215 void reserve_fill_store(
size_t n);
216 std::size_t append_fill(
const fill_t& fill);
218 void reserve_border_store(
size_t n);
219 std::size_t append_border(
const border_t& border);
221 std::size_t append_protection(
const protection_t& protection);
223 void reserve_number_format_store(
size_t n);
226 void reserve_cell_style_format_store(
size_t n);
229 void reserve_cell_format_store(
size_t n);
232 void reserve_diff_cell_format_store(
size_t n);
235 void reserve_cell_style_store(
size_t n);
238 const font_t* get_font(
size_t index)
const;
239 const fill_t* get_fill(
size_t index)
const;
240 const border_t* get_border(
size_t index)
const;
244 const cell_format_t* get_cell_style_format(
size_t index)
const;
247 const cell_style_t* get_cell_style_by_xf(
size_t xfid)
const;
249 size_t get_font_count()
const;
250 size_t get_fill_count()
const;
251 size_t get_border_count()
const;
252 size_t get_protection_count()
const;
253 size_t get_number_format_count()
const;
254 size_t get_cell_formats_count()
const;
255 size_t get_cell_style_formats_count()
const;
256 size_t get_dxf_count()
const;
257 size_t get_cell_styles_count()
const;
262 void finalize_import();
Definition document.hpp:54
Definition styles.hpp:202
Definition styles.hpp:184
Definition document_types.hpp:20
Definition styles.hpp:115