Orcus
Toggle main menu visibility
Loading...
Searching...
No Matches
include
orcus
spreadsheet
document_types.hpp
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
*/
7
8
#pragma once
9
10
#include "types.hpp"
11
#include <vector>
12
#include <optional>
13
14
namespace
orcus {
namespace
spreadsheet {
15
20
struct
ORCUS_SPM_DLLPUBLIC color_t
21
{
22
color_elem_t alpha;
23
color_elem_t red;
24
color_elem_t green;
25
color_elem_t blue;
26
27
color_t();
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);
30
31
void
reset();
32
33
bool
operator==(
const
color_t& other)
const
;
34
bool
operator!=(
const
color_t& other)
const
;
35
};
36
37
struct
ORCUS_SPM_DLLPUBLIC strikethrough_t
38
{
39
std::optional<strikethrough_style_t> style;
40
std::optional<strikethrough_type_t> type;
41
std::optional<strikethrough_width_t> width;
42
std::optional<strikethrough_text_t> text;
43
44
strikethrough_t();
45
strikethrough_t(
const
strikethrough_t& other);
46
~strikethrough_t();
47
48
strikethrough_t& operator=(
const
strikethrough_t& other);
49
50
bool
operator==(
const
strikethrough_t& other)
const
;
51
bool
operator!=(
const
strikethrough_t& other)
const
;
52
53
void
reset();
54
55
bool
has_value()
const
;
56
};
57
58
struct
ORCUS_SPM_DLLPUBLIC underline_t
59
{
60
std::optional<underline_style_t> style;
61
std::optional<underline_thickness_t> thickness;
62
std::optional<underline_spacing_t> spacing;
63
std::optional<underline_count_t> count;
64
std::optional<color_t> color;
65
66
underline_t();
67
underline_t(
const
underline_t& other);
68
~underline_t();
69
70
underline_t& operator=(
const
underline_t& other);
71
72
bool
operator==(
const
underline_t& other)
const
;
73
bool
operator!=(
const
underline_t& other)
const
;
74
75
void
reset();
76
77
bool
has_value()
const
;
78
};
79
84
struct
ORCUS_SPM_DLLPUBLIC format_run_t
85
{
87
std::size_t
pos
= 0;
89
std::size_t
size
= 0;
91
std::optional<std::string_view>
font
;
93
std::optional<double>
font_size
;
95
std::optional<color_t>
color
;
97
std::optional<bool>
bold
;
99
std::optional<bool>
italic
;
101
std::optional<bool>
superscript
;
103
std::optional<bool>
subscript
;
105
strikethrough_t
strikethrough
;
106
underline_t
underline;
107
108
format_run_t();
109
format_run_t(
const
format_run_t& other);
110
~format_run_t();
111
112
format_run_t& operator=(
const
format_run_t& other);
113
117
void
reset
();
118
124
bool
formatted
()
const
;
125
};
126
128
using
format_runs_t = std::vector<format_run_t>;
129
130
}}
// namespace orcus::spreadsheet
131
132
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::spreadsheet::format_run_t::strikethrough
strikethrough_t strikethrough
Definition
document_types.hpp:105
orcus::spreadsheet::format_run_t::italic
std::optional< bool > italic
Definition
document_types.hpp:99
orcus::spreadsheet::format_run_t::pos
std::size_t pos
Definition
document_types.hpp:87
orcus::spreadsheet::format_run_t::subscript
std::optional< bool > subscript
Definition
document_types.hpp:103
orcus::spreadsheet::format_run_t::formatted
bool formatted() const
orcus::spreadsheet::format_run_t::font
std::optional< std::string_view > font
Definition
document_types.hpp:91
orcus::spreadsheet::format_run_t::font_size
std::optional< double > font_size
Definition
document_types.hpp:93
orcus::spreadsheet::format_run_t::color
std::optional< color_t > color
Definition
document_types.hpp:95
orcus::spreadsheet::format_run_t::size
std::size_t size
Definition
document_types.hpp:89
orcus::spreadsheet::format_run_t::superscript
std::optional< bool > superscript
Definition
document_types.hpp:101
orcus::spreadsheet::format_run_t::bold
std::optional< bool > bold
Definition
document_types.hpp:97
orcus::spreadsheet::format_run_t::reset
void reset()
orcus::spreadsheet::strikethrough_t
Definition
document_types.hpp:38
orcus::spreadsheet::underline_t
Definition
document_types.hpp:59
Generated on
for Orcus by
1.17.0