Orcus
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 #ifndef ORCUS_SPREADSHEET_TYPES_HPP
9 #define ORCUS_SPREADSHEET_TYPES_HPP
10 
11 #include "../env.hpp"
12 #include <cstdlib>
13 
14 // NB: This header should only use primitive data types and enums.
15 
16 namespace orcus { namespace spreadsheet {
17 
18 typedef int row_t;
19 typedef int col_t;
20 typedef int sheet_t;
21 typedef unsigned char color_elem_t;
22 typedef unsigned short col_width_t;
23 typedef unsigned short row_height_t;
24 
25 ORCUS_DLLPUBLIC col_width_t get_default_column_width();
26 ORCUS_DLLPUBLIC row_height_t get_default_row_height();
27 
28 enum class border_direction_t
29 {
30  unknown = 0,
31  top,
32  bottom,
33  left,
34  right,
35  diagonal
36 };
37 
38 enum class border_style_t
39 {
40  unknown = 0,
41  none,
42  dash_dot,
43  dash_dot_dot,
44  dashed,
45  dotted,
46  double_border,
47  hair,
48  medium,
49  medium_dash_dot,
50  medium_dash_dot_dot,
51  medium_dashed,
52  slant_dash_dot,
53  thick,
54  thin
55 };
56 
57 enum class formula_grammar_t
58 {
59  unknown = 0,
60  xlsx_2007,
61  xlsx_2010,
62  ods,
63  gnumeric
64 };
65 
66 enum class formula_t
67 {
68  array,
69  data_table,
70  normal,
71  shared
72 };
73 
74 enum class underline_t
75 {
76  none = 0,
77  single_line,
78  single_accounting, // unique to xlsx
79  double_line,
80  double_accounting // unique to xlsx
81 };
82 
83 enum class hor_alignment_t
84 {
85  unknown = 0,
86  left,
87  center,
88  right,
89  justified,
90  distributed,
91  filled
92 };
93 
94 enum class ver_alignment_t
95 {
96  unknown = 0,
97  top,
98  middle,
99  bottom,
100  justified,
101  distributed
102 };
103 
109 enum class data_table_type_t
110 {
111  column,
112  row,
113  both
114 };
115 
119 enum class totals_row_function_t
120 {
121  none = 0,
122  sum,
123  minimum,
124  maximum,
125  average,
126  count,
127  count_numbers,
128  standard_deviation,
129  variance,
130  custom
131 };
132 
133 enum class conditional_format_t
134 {
135  unknown = 0,
136  condition,
137  date,
138  formula,
139  colorscale,
140  databar,
141  iconset
142 };
143 
144 enum class condition_operator_t
145 {
146  unknown = 0,
147  equal,
148  less,
149  greater,
150  greater_equal,
151  less_equal,
152  not_equal,
153  between,
154  not_between,
155  duplicate,
156  unique,
157  top_n,
158  bottom_n,
159  above_average,
160  below_average,
161  above_equal_average,
162  below_equal_average,
163  contains_error,
164  contains_no_error,
165  begins_with,
166  ends_with,
167  contains,
168  contains_blanks,
169  not_contains,
170  expression
171 };
172 
173 enum class condition_type_t
174 {
175  unknown = 0,
176  value,
177  automatic,
178  max,
179  min,
180  formula,
181  percent,
182  percentile
183 };
184 
185 enum class condition_date_t
186 {
187  unknown = 0,
188  today,
189  yesterday,
190  tomorrow,
191  last_7_days,
192  this_week,
193  next_week,
194  last_week,
195  this_month,
196  next_month,
197  last_month,
198  this_year,
199  next_year,
200  last_year,
201 };
202 
203 enum class databar_axis_t
204 {
205  none = 0,
206  middle,
207  automatic
208 };
209 
214 ORCUS_DLLPUBLIC totals_row_function_t to_totals_row_function_enum(const char* p, size_t n);
215 
216 }}
217 
218 #endif
219 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: base64.hpp:15