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<color_t> color;
51 bool operator==(
const font_t& other)
const;
52 bool operator!=(
const font_t& other)
const;
56 struct ORCUS_SPM_DLLPUBLIC
hash
58 std::size_t operator()(
const font_t& v)
const;
67 std::optional<fill_pattern_t> pattern_type;
68 std::optional<color_t> fg_color;
69 std::optional<color_t> bg_color;
80 std::optional<border_style_t> style;
81 std::optional<color_t> border_color;
82 std::optional<length_t> border_width;
110 std::optional<bool> locked;
111 std::optional<bool> hidden;
112 std::optional<bool> print_content;
113 std::optional<bool> formula_hidden;
124 std::optional<std::size_t> identifier;
125 std::optional<std::string_view> format_string;
160 bool apply_num_format:1;
164 bool apply_alignment:1;
165 bool apply_protection:1;
179 std::string_view name;
180 std::string_view display_name;
183 std::string_view parent_name;
189ORCUS_SPM_DLLPUBLIC std::ostream& operator<< (std::ostream& os,
const color_t& c);
200 std::unique_ptr<impl> mp_impl;
206 void reserve_font_store(
size_t n);
207 std::size_t append_font(
const font_t& font);
209 void reserve_fill_store(
size_t n);
210 std::size_t append_fill(
const fill_t& fill);
212 void reserve_border_store(
size_t n);
213 std::size_t append_border(
const border_t& border);
215 std::size_t append_protection(
const protection_t& protection);
217 void reserve_number_format_store(
size_t n);
220 void reserve_cell_style_format_store(
size_t n);
223 void reserve_cell_format_store(
size_t n);
226 void reserve_diff_cell_format_store(
size_t n);
229 void reserve_cell_style_store(
size_t n);
232 const font_t* get_font(
size_t index)
const;
233 const fill_t* get_fill(
size_t index)
const;
234 const border_t* get_border(
size_t index)
const;
238 const cell_format_t* get_cell_style_format(
size_t index)
const;
241 const cell_style_t* get_cell_style_by_xf(
size_t xfid)
const;
243 size_t get_font_count()
const;
244 size_t get_fill_count()
const;
245 size_t get_border_count()
const;
246 size_t get_protection_count()
const;
247 size_t get_number_format_count()
const;
248 size_t get_cell_formats_count()
const;
249 size_t get_cell_style_formats_count()
const;
250 size_t get_dxf_count()
const;
251 size_t get_cell_styles_count()
const;
256 void finalize_import();
Definition document.hpp:55
Definition styles.hpp:196
Definition styles.hpp:178
Definition document_types.hpp:21
Definition styles.hpp:109
Definition document_types.hpp:38
Definition document_types.hpp:59