1 |
frodo |
2 |
/* |
2 |
|
|
data.h - Part of psiconv, a PSION 5 file formats converter |
3 |
frodo |
63 |
Copyright (c) 1999, 2000 Frodo Looijaard <frodol@dds.nl> |
4 |
frodo |
2 |
|
5 |
|
|
This program is free software; you can redistribute it and/or modify |
6 |
|
|
it under the terms of the GNU General Public License as published by |
7 |
|
|
the Free Software Foundation; either version 2 of the License, or |
8 |
|
|
(at your option) any later version. |
9 |
|
|
|
10 |
|
|
This program is distributed in the hope that it will be useful, |
11 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
|
GNU General Public License for more details. |
14 |
|
|
|
15 |
|
|
You should have received a copy of the GNU General Public License |
16 |
|
|
along with this program; if not, write to the Free Software |
17 |
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 |
|
|
*/ |
19 |
|
|
|
20 |
|
|
/* This file contains the declarations of all types that are used to |
21 |
|
|
represent the Word file. Variables of these types are written by the |
22 |
|
|
parse routines, and read by the generation routines. */ |
23 |
|
|
|
24 |
|
|
#ifndef PSICONV_DATA_H |
25 |
|
|
#define PSICONV_DATA_H |
26 |
|
|
|
27 |
frodo |
58 |
#include <psiconv/general.h> |
28 |
|
|
#include <psiconv/list.h> |
29 |
frodo |
2 |
|
30 |
|
|
/* All types which end on _t are plain types; all other types are pointers |
31 |
|
|
to structs */ |
32 |
|
|
|
33 |
frodo |
55 |
#ifdef __cplusplus |
34 |
|
|
extern "C" { |
35 |
|
|
#endif /* __cplusplus */ |
36 |
|
|
|
37 |
frodo |
167 |
/* Forward declaration (for psiconv_embedded_object_section) */ |
38 |
frodo |
159 |
typedef struct psiconv_file_s *psiconv_file; |
39 |
|
|
|
40 |
frodo |
101 |
typedef double psiconv_float_t; |
41 |
frodo |
55 |
|
42 |
frodo |
2 |
typedef enum psiconv_file_type { |
43 |
|
|
psiconv_unknown_file, |
44 |
|
|
psiconv_word_file, |
45 |
|
|
psiconv_texted_file, |
46 |
frodo |
12 |
psiconv_mbm_file, |
47 |
frodo |
41 |
psiconv_sketch_file, |
48 |
frodo |
94 |
psiconv_clipart_file, |
49 |
|
|
psiconv_sheet_file |
50 |
frodo |
2 |
} psiconv_file_type_t; |
51 |
|
|
|
52 |
|
|
/* Length indicators */ |
53 |
|
|
typedef psiconv_u32 psiconv_S_t; |
54 |
|
|
typedef psiconv_u32 psiconv_X_t; |
55 |
|
|
|
56 |
|
|
/* A string */ |
57 |
|
|
typedef char *psiconv_string_t; |
58 |
|
|
|
59 |
|
|
/* In the Psion file, these are identical; but we translate them to more |
60 |
|
|
human-readable quantities */ |
61 |
|
|
typedef float psiconv_length_t; /* For offsets in centimeters */ |
62 |
|
|
typedef float psiconv_size_t; /* For sizes in points */ |
63 |
|
|
|
64 |
|
|
/* Some enums */ |
65 |
|
|
typedef enum psiconv_bool |
66 |
|
|
{ |
67 |
|
|
psiconv_bool_false, |
68 |
|
|
psiconv_bool_true |
69 |
|
|
} psiconv_bool_t; |
70 |
|
|
|
71 |
frodo |
94 |
typedef enum psiconv_triple |
72 |
|
|
{ |
73 |
|
|
psiconv_triple_on, |
74 |
|
|
psiconv_triple_off, |
75 |
|
|
psiconv_triple_auto |
76 |
|
|
} psiconv_triple_t; |
77 |
|
|
|
78 |
frodo |
2 |
typedef enum psiconv_super_sub |
79 |
|
|
{ psiconv_normalscript, |
80 |
|
|
psiconv_superscript, |
81 |
|
|
psiconv_subscript |
82 |
|
|
} psiconv_super_sub_t; |
83 |
|
|
|
84 |
|
|
typedef enum psiconv_justify_hor |
85 |
|
|
{ psiconv_justify_left, |
86 |
|
|
psiconv_justify_centre, |
87 |
|
|
psiconv_justify_right, |
88 |
|
|
psiconv_justify_full |
89 |
|
|
} psiconv_justify_hor_t; |
90 |
|
|
|
91 |
|
|
typedef enum psiconv_justify_ver |
92 |
|
|
{ psiconv_justify_top, |
93 |
|
|
psiconv_justify_middle, |
94 |
|
|
psiconv_justify_bottom |
95 |
|
|
} psiconv_justify_ver_t; |
96 |
|
|
|
97 |
|
|
typedef enum psiconv_border_kind |
98 |
|
|
{ psiconv_border_none, |
99 |
|
|
psiconv_border_solid, |
100 |
|
|
psiconv_border_double, |
101 |
|
|
psiconv_border_dotted, |
102 |
frodo |
67 |
psiconv_border_dashed, |
103 |
|
|
psiconv_border_dotdashed, |
104 |
|
|
psiconv_border_dotdotdashed |
105 |
frodo |
2 |
} psiconv_border_kind_t; |
106 |
|
|
|
107 |
frodo |
90 |
typedef enum psiconv_screenfont |
108 |
|
|
{ |
109 |
|
|
psiconv_font_misc, |
110 |
|
|
psiconv_font_sansserif, |
111 |
|
|
psiconv_font_nonprop, |
112 |
|
|
psiconv_font_serif |
113 |
|
|
} psiconv_screenfont_t; |
114 |
|
|
|
115 |
frodo |
2 |
/* Colors. |
116 |
|
|
black: 0x00 0x00 0x00 |
117 |
|
|
white: 0xff 0xff 0xff */ |
118 |
frodo |
56 |
typedef struct psiconv_color_s |
119 |
frodo |
2 |
{ |
120 |
|
|
psiconv_u8 red; |
121 |
|
|
psiconv_u8 green; |
122 |
|
|
psiconv_u8 blue; |
123 |
|
|
} * psiconv_color; |
124 |
|
|
|
125 |
frodo |
56 |
typedef struct psiconv_font_s |
126 |
frodo |
2 |
{ |
127 |
|
|
char *name; |
128 |
frodo |
90 |
psiconv_screenfont_t screenfont; |
129 |
frodo |
2 |
} *psiconv_font; |
130 |
|
|
|
131 |
frodo |
56 |
typedef struct psiconv_border_s |
132 |
frodo |
2 |
{ |
133 |
|
|
psiconv_border_kind_t kind; |
134 |
|
|
psiconv_size_t thickness; /* Set to 1/20 for non-solid lines */ |
135 |
|
|
psiconv_color color; |
136 |
|
|
} *psiconv_border; |
137 |
|
|
|
138 |
frodo |
56 |
typedef struct psiconv_bullet_s |
139 |
frodo |
2 |
{ |
140 |
|
|
psiconv_bool_t on; |
141 |
|
|
psiconv_size_t font_size; |
142 |
|
|
psiconv_u8 character; |
143 |
|
|
psiconv_bool_t indent; |
144 |
|
|
psiconv_color color; |
145 |
|
|
psiconv_font font; |
146 |
|
|
} *psiconv_bullet; |
147 |
|
|
|
148 |
|
|
typedef enum psiconv_tab_kind |
149 |
|
|
{ |
150 |
|
|
psiconv_tab_left, |
151 |
|
|
psiconv_tab_centre, |
152 |
|
|
psiconv_tab_right |
153 |
|
|
} psiconv_tab_kind_t; |
154 |
|
|
|
155 |
frodo |
56 |
typedef struct psiconv_tab_s |
156 |
frodo |
2 |
{ |
157 |
|
|
psiconv_length_t location; |
158 |
|
|
psiconv_tab_kind_t kind; |
159 |
|
|
} *psiconv_tab; |
160 |
|
|
|
161 |
|
|
|
162 |
|
|
typedef psiconv_list psiconv_tab_list; /* of struct psiconv_tab */ |
163 |
|
|
|
164 |
frodo |
56 |
typedef struct psiconv_all_tabs_s |
165 |
frodo |
2 |
{ |
166 |
|
|
psiconv_length_t normal; |
167 |
|
|
psiconv_tab_list extras; |
168 |
|
|
} *psiconv_all_tabs; |
169 |
|
|
|
170 |
frodo |
56 |
typedef struct psiconv_character_layout_s |
171 |
frodo |
2 |
{ |
172 |
|
|
psiconv_color color; |
173 |
|
|
psiconv_color back_color; |
174 |
|
|
psiconv_size_t font_size; |
175 |
|
|
psiconv_bool_t italic; |
176 |
|
|
psiconv_bool_t bold; |
177 |
|
|
psiconv_super_sub_t super_sub; |
178 |
|
|
psiconv_bool_t underline; |
179 |
frodo |
67 |
psiconv_bool_t strikethrough; |
180 |
frodo |
2 |
psiconv_font font; |
181 |
|
|
} *psiconv_character_layout; |
182 |
|
|
|
183 |
frodo |
56 |
typedef struct psiconv_paragraph_layout_s |
184 |
frodo |
2 |
{ |
185 |
|
|
psiconv_color back_color; |
186 |
|
|
psiconv_length_t indent_left; |
187 |
|
|
psiconv_length_t indent_right; |
188 |
|
|
psiconv_length_t indent_first; |
189 |
|
|
psiconv_justify_hor_t justify_hor; |
190 |
|
|
psiconv_justify_ver_t justify_ver; |
191 |
frodo |
67 |
psiconv_size_t linespacing; |
192 |
|
|
psiconv_bool_t linespacing_exact; |
193 |
|
|
psiconv_size_t space_above; |
194 |
|
|
psiconv_size_t space_below; |
195 |
|
|
psiconv_bool_t keep_together; |
196 |
|
|
psiconv_bool_t keep_with_next; |
197 |
frodo |
2 |
psiconv_bool_t on_next_page; |
198 |
|
|
psiconv_bool_t no_widow_protection; |
199 |
frodo |
104 |
psiconv_bool_t wrap_to_fit_cell; |
200 |
frodo |
2 |
psiconv_length_t border_distance; |
201 |
|
|
psiconv_bullet bullet; |
202 |
|
|
psiconv_border left_border; |
203 |
|
|
psiconv_border right_border; |
204 |
|
|
psiconv_border top_border; |
205 |
|
|
psiconv_border bottom_border; |
206 |
|
|
psiconv_all_tabs tabs; |
207 |
|
|
} *psiconv_paragraph_layout; |
208 |
|
|
|
209 |
frodo |
56 |
typedef struct psiconv_header_section_s |
210 |
frodo |
2 |
{ |
211 |
|
|
psiconv_u32 uid1; |
212 |
|
|
psiconv_u32 uid2; |
213 |
|
|
psiconv_u32 uid3; |
214 |
|
|
psiconv_u32 checksum; |
215 |
|
|
psiconv_file_type_t file; |
216 |
|
|
} *psiconv_header_section; |
217 |
|
|
|
218 |
frodo |
56 |
typedef struct psiconv_section_table_entry_s |
219 |
frodo |
2 |
{ |
220 |
|
|
psiconv_u32 id; |
221 |
|
|
psiconv_u32 offset; |
222 |
|
|
} *psiconv_section_table_entry; |
223 |
|
|
|
224 |
|
|
typedef psiconv_list psiconv_section_table_section; |
225 |
|
|
/* Of struct sectiontable_entry */ |
226 |
|
|
|
227 |
frodo |
56 |
typedef struct psiconv_application_id_section_s |
228 |
frodo |
2 |
{ |
229 |
|
|
psiconv_u32 id; |
230 |
|
|
psiconv_string_t name; |
231 |
|
|
} *psiconv_application_id_section; |
232 |
|
|
|
233 |
frodo |
159 |
typedef struct psiconv_object_icon_section_s |
234 |
|
|
{ |
235 |
|
|
psiconv_length_t icon_width; |
236 |
|
|
psiconv_length_t icon_height; |
237 |
|
|
psiconv_string_t icon_name; |
238 |
|
|
} *psiconv_object_icon_section; |
239 |
|
|
|
240 |
|
|
typedef struct psiconv_object_display_section_s |
241 |
|
|
{ |
242 |
|
|
psiconv_bool_t show_icon; |
243 |
|
|
psiconv_length_t width; |
244 |
|
|
psiconv_length_t height; |
245 |
|
|
} *psiconv_object_display_section; |
246 |
|
|
|
247 |
frodo |
167 |
typedef struct psiconv_embedded_object_section_s |
248 |
frodo |
159 |
{ |
249 |
|
|
psiconv_object_icon_section icon; |
250 |
|
|
psiconv_object_display_section display; |
251 |
|
|
psiconv_file object; |
252 |
frodo |
167 |
} *psiconv_embedded_object_section; |
253 |
frodo |
159 |
|
254 |
frodo |
56 |
typedef struct psiconv_in_line_layout_s |
255 |
frodo |
2 |
{ |
256 |
|
|
psiconv_character_layout layout; |
257 |
|
|
int length; |
258 |
frodo |
159 |
/* If object is NULL, this does not apply to an object */ |
259 |
frodo |
167 |
psiconv_embedded_object_section object; |
260 |
frodo |
159 |
psiconv_length_t object_width; |
261 |
|
|
psiconv_length_t object_height; |
262 |
frodo |
2 |
} *psiconv_in_line_layout; |
263 |
|
|
|
264 |
|
|
typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
265 |
|
|
|
266 |
|
|
typedef enum psiconv_replacement_type |
267 |
|
|
{ |
268 |
|
|
psiconv_replace_time, |
269 |
|
|
psiconv_replace_date, |
270 |
|
|
psiconv_replace_pagenr, |
271 |
|
|
psiconv_replace_nr_of_pages, |
272 |
|
|
psiconv_replace_filename |
273 |
|
|
} psiconv_replacement_type_t; |
274 |
|
|
|
275 |
frodo |
56 |
typedef struct psiconv_replacement_s |
276 |
frodo |
2 |
{ |
277 |
|
|
int offset; |
278 |
|
|
int cur_len; |
279 |
|
|
psiconv_replacement_type_t type; |
280 |
|
|
} *psiconv_replacement; |
281 |
|
|
|
282 |
|
|
typedef psiconv_list psiconv_replacements; /* of struct replacement */ |
283 |
|
|
|
284 |
frodo |
56 |
typedef struct psiconv_paragraph_s |
285 |
frodo |
2 |
{ |
286 |
|
|
char *text; |
287 |
|
|
psiconv_character_layout base_character; |
288 |
|
|
psiconv_paragraph_layout base_paragraph; |
289 |
|
|
psiconv_s16 base_style; |
290 |
|
|
psiconv_in_line_layouts in_lines; |
291 |
|
|
psiconv_replacements replacements; |
292 |
|
|
} *psiconv_paragraph; |
293 |
|
|
|
294 |
|
|
typedef psiconv_list psiconv_text_and_layout; /* Of struct paragraphs */ |
295 |
|
|
|
296 |
frodo |
56 |
typedef struct psiconv_texted_section_s |
297 |
frodo |
2 |
{ |
298 |
|
|
psiconv_text_and_layout paragraphs; |
299 |
|
|
} *psiconv_texted_section; |
300 |
|
|
|
301 |
frodo |
56 |
typedef struct psiconv_page_header_s |
302 |
frodo |
2 |
{ |
303 |
|
|
psiconv_bool_t on_first_page; |
304 |
|
|
psiconv_paragraph_layout base_paragraph_layout; |
305 |
|
|
psiconv_character_layout base_character_layout; |
306 |
|
|
psiconv_texted_section text; |
307 |
|
|
} *psiconv_page_header; |
308 |
|
|
|
309 |
frodo |
56 |
typedef struct psiconv_page_layout_section_s |
310 |
frodo |
2 |
{ |
311 |
|
|
psiconv_u32 first_page_nr; |
312 |
|
|
psiconv_length_t header_dist; |
313 |
|
|
psiconv_length_t footer_dist; |
314 |
|
|
psiconv_length_t left_margin; |
315 |
|
|
psiconv_length_t right_margin; |
316 |
|
|
psiconv_length_t top_margin; |
317 |
|
|
psiconv_length_t bottom_margin; |
318 |
|
|
psiconv_length_t page_width; |
319 |
|
|
psiconv_length_t page_height; |
320 |
|
|
psiconv_page_header header; |
321 |
|
|
psiconv_page_header footer; |
322 |
frodo |
76 |
psiconv_bool_t landscape; |
323 |
frodo |
2 |
} * psiconv_page_layout_section; |
324 |
|
|
|
325 |
frodo |
56 |
typedef struct psiconv_word_status_section_s |
326 |
frodo |
2 |
{ |
327 |
|
|
psiconv_bool_t show_tabs; |
328 |
|
|
psiconv_bool_t show_spaces; |
329 |
|
|
psiconv_bool_t show_paragraph_ends; |
330 |
|
|
psiconv_bool_t show_line_breaks; |
331 |
|
|
psiconv_bool_t show_hard_minus; |
332 |
|
|
psiconv_bool_t show_hard_space; |
333 |
|
|
psiconv_bool_t show_full_pictures; |
334 |
|
|
psiconv_bool_t show_full_graphs; |
335 |
|
|
psiconv_bool_t show_top_toolbar; |
336 |
|
|
psiconv_bool_t show_side_toolbar; |
337 |
|
|
psiconv_bool_t fit_lines_to_screen; |
338 |
|
|
psiconv_u32 cursor_position; |
339 |
|
|
psiconv_u32 display_size; |
340 |
|
|
} *psiconv_word_status_section; |
341 |
|
|
|
342 |
frodo |
56 |
typedef struct psiconv_word_style_s |
343 |
frodo |
2 |
{ |
344 |
|
|
psiconv_character_layout character; |
345 |
|
|
psiconv_paragraph_layout paragraph; |
346 |
|
|
psiconv_u8 hotkey; |
347 |
|
|
psiconv_string_t name; |
348 |
|
|
psiconv_bool_t built_in; |
349 |
frodo |
28 |
psiconv_u32 outline_level; |
350 |
frodo |
2 |
} *psiconv_word_style; |
351 |
|
|
|
352 |
|
|
typedef psiconv_list psiconv_word_style_list; /* Of style */ |
353 |
|
|
|
354 |
frodo |
56 |
typedef struct psiconv_word_styles_section_s |
355 |
frodo |
2 |
{ |
356 |
|
|
psiconv_word_style normal; |
357 |
|
|
psiconv_word_style_list styles; |
358 |
|
|
} *psiconv_word_styles_section; |
359 |
|
|
|
360 |
frodo |
56 |
typedef struct psiconv_word_f_s |
361 |
|
|
{ |
362 |
frodo |
2 |
psiconv_page_layout_section page_sec; |
363 |
|
|
psiconv_text_and_layout paragraphs; |
364 |
|
|
psiconv_word_status_section status_sec; |
365 |
|
|
psiconv_word_styles_section styles_sec; |
366 |
|
|
} *psiconv_word_f; |
367 |
|
|
|
368 |
frodo |
56 |
typedef struct psiconv_texted_f_s |
369 |
|
|
{ |
370 |
frodo |
2 |
psiconv_page_layout_section page_sec; |
371 |
|
|
psiconv_texted_section texted_sec; |
372 |
|
|
} *psiconv_texted_f; |
373 |
|
|
|
374 |
frodo |
42 |
typedef psiconv_list psiconv_jumptable_section; /* of psiconv_u32 */ |
375 |
frodo |
12 |
|
376 |
frodo |
11 |
/* Normalized values [0..1] for each component |
377 |
|
|
Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
378 |
frodo |
56 |
typedef struct psiconv_paint_data_section_s |
379 |
|
|
{ |
380 |
frodo |
11 |
psiconv_u32 xsize; |
381 |
|
|
psiconv_u32 ysize; |
382 |
frodo |
25 |
psiconv_length_t pic_xsize; /* 0 if not specified */ |
383 |
|
|
psiconv_length_t pic_ysize; /* 0 if not specified */ |
384 |
frodo |
11 |
float *red; |
385 |
|
|
float *green; |
386 |
|
|
float *blue; |
387 |
|
|
} *psiconv_paint_data_section; |
388 |
|
|
|
389 |
frodo |
12 |
typedef psiconv_list psiconv_pictures; |
390 |
|
|
/* of struct psiconv_paint_data_section */ |
391 |
|
|
|
392 |
frodo |
56 |
typedef struct psiconv_mbm_f_s |
393 |
|
|
{ |
394 |
frodo |
12 |
psiconv_pictures sections; |
395 |
|
|
} *psiconv_mbm_f; |
396 |
|
|
|
397 |
frodo |
163 |
/* Read the Psiconv file format documentation for a complete discription. |
398 |
|
|
Basic idea: a picture has a certain display size. Within it, the pixel |
399 |
|
|
data begins at a certain offset. Around it, there is an empty form. |
400 |
|
|
The first eight values are before magnification and cuts. |
401 |
frodo |
24 |
Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
402 |
|
|
cuts everything away. */ |
403 |
frodo |
56 |
typedef struct psiconv_sketch_section_s |
404 |
|
|
{ |
405 |
frodo |
163 |
psiconv_u16 displayed_xsize; |
406 |
|
|
psiconv_u16 displayed_ysize; |
407 |
|
|
psiconv_u16 picture_data_x_offset; |
408 |
|
|
psiconv_u16 picture_data_y_offset; |
409 |
frodo |
24 |
psiconv_u16 form_xsize; |
410 |
|
|
psiconv_u16 form_ysize; |
411 |
frodo |
163 |
psiconv_u16 displayed_size_x_offset; |
412 |
|
|
psiconv_u16 displayed_size_y_offset; |
413 |
|
|
float magnification_x; /* computed relative to first eight values */ |
414 |
|
|
float magnification_y; /* computed relative to first eight values */ |
415 |
|
|
float cut_left; /* computed relative to first eight values */ |
416 |
|
|
float cut_right; /* computed relative to first eight values */ |
417 |
|
|
float cut_top; /* computed relative to first eight values */ |
418 |
|
|
float cut_bottom; /* computed relative to first eight values */ |
419 |
frodo |
24 |
psiconv_paint_data_section picture; |
420 |
|
|
} *psiconv_sketch_section; |
421 |
|
|
|
422 |
frodo |
56 |
typedef struct psiconv_sketch_f_s |
423 |
|
|
{ |
424 |
frodo |
24 |
psiconv_sketch_section sketch_sec; |
425 |
|
|
} *psiconv_sketch_f; |
426 |
|
|
|
427 |
frodo |
56 |
typedef struct psiconv_clipart_section_s |
428 |
|
|
{ |
429 |
frodo |
41 |
/* Perhaps later on some currently unknown stuff. */ |
430 |
|
|
psiconv_paint_data_section picture; |
431 |
|
|
} * psiconv_clipart_section; |
432 |
|
|
|
433 |
|
|
typedef psiconv_list psiconv_cliparts; /* of struct psiconv_clipart_section */ |
434 |
|
|
|
435 |
frodo |
56 |
typedef struct psiconv_clipart_f_s |
436 |
|
|
{ |
437 |
frodo |
41 |
psiconv_cliparts sections; |
438 |
|
|
} *psiconv_clipart_f; |
439 |
|
|
|
440 |
frodo |
102 |
typedef struct psiconv_sheet_ref_s |
441 |
|
|
{ |
442 |
|
|
psiconv_s16 offset; |
443 |
|
|
psiconv_bool_t absolute; |
444 |
|
|
} psiconv_sheet_ref_t; |
445 |
|
|
|
446 |
|
|
typedef struct psiconv_sheet_cell_reference_s |
447 |
|
|
{ |
448 |
|
|
psiconv_sheet_ref_t row; |
449 |
|
|
psiconv_sheet_ref_t column; |
450 |
|
|
} psiconv_sheet_cell_reference_t; |
451 |
|
|
|
452 |
|
|
typedef struct psiconv_sheet_cell_block_s |
453 |
|
|
{ |
454 |
|
|
psiconv_sheet_cell_reference_t first; |
455 |
|
|
psiconv_sheet_cell_reference_t last; |
456 |
|
|
} psiconv_sheet_cell_block_t; |
457 |
|
|
|
458 |
frodo |
110 |
typedef enum psiconv_cell_type |
459 |
|
|
{ |
460 |
|
|
psiconv_cell_blank, |
461 |
|
|
psiconv_cell_int, |
462 |
|
|
psiconv_cell_bool, |
463 |
|
|
psiconv_cell_error, |
464 |
|
|
psiconv_cell_float, |
465 |
|
|
psiconv_cell_string |
466 |
|
|
} psiconv_cell_type_t; |
467 |
|
|
|
468 |
|
|
typedef enum psiconv_sheet_errorcode |
469 |
|
|
{ |
470 |
|
|
psiconv_sheet_error_none, |
471 |
|
|
psiconv_sheet_error_null, |
472 |
|
|
psiconv_sheet_error_divzero, |
473 |
|
|
psiconv_sheet_error_value, |
474 |
|
|
psiconv_sheet_error_reference, |
475 |
|
|
psiconv_sheet_error_name, |
476 |
|
|
psiconv_sheet_error_number, |
477 |
|
|
psiconv_sheet_error_notavail |
478 |
|
|
} psiconv_sheet_errorcode_t; |
479 |
|
|
|
480 |
frodo |
111 |
typedef enum psiconv_sheet_numberformat_code |
481 |
frodo |
110 |
{ |
482 |
|
|
psiconv_numberformat_general, |
483 |
|
|
psiconv_numberformat_fixeddecimal, |
484 |
|
|
psiconv_numberformat_scientific, |
485 |
|
|
psiconv_numberformat_currency, |
486 |
|
|
psiconv_numberformat_percent, |
487 |
|
|
psiconv_numberformat_triads, |
488 |
|
|
psiconv_numberformat_boolean, |
489 |
|
|
psiconv_numberformat_text, |
490 |
frodo |
122 |
psiconv_numberformat_date_dmm, |
491 |
|
|
psiconv_numberformat_date_mmd, |
492 |
frodo |
110 |
psiconv_numberformat_date_ddmmyy, |
493 |
|
|
psiconv_numberformat_date_mmddyy, |
494 |
|
|
psiconv_numberformat_date_yymmdd, |
495 |
frodo |
122 |
psiconv_numberformat_date_dmmm, |
496 |
|
|
psiconv_numberformat_date_dmmmyy, |
497 |
frodo |
110 |
psiconv_numberformat_date_ddmmmyy, |
498 |
|
|
psiconv_numberformat_date_mmm, |
499 |
|
|
psiconv_numberformat_date_monthname, |
500 |
|
|
psiconv_numberformat_date_mmmyy, |
501 |
|
|
psiconv_numberformat_date_monthnameyy, |
502 |
frodo |
122 |
psiconv_numberformat_date_monthnamedyyyy, |
503 |
frodo |
110 |
psiconv_numberformat_datetime_ddmmyyyyhhii, |
504 |
|
|
psiconv_numberformat_datetime_ddmmyyyyHHii, |
505 |
|
|
psiconv_numberformat_datetime_mmddyyyyhhii, |
506 |
|
|
psiconv_numberformat_datetime_mmddyyyyHHii, |
507 |
|
|
psiconv_numberformat_datetime_yyyymmddhhii, |
508 |
|
|
psiconv_numberformat_datetime_yyyymmddHHii, |
509 |
|
|
psiconv_numberformat_time_hhii, |
510 |
|
|
psiconv_numberformat_time_hhiiss, |
511 |
|
|
psiconv_numberformat_time_HHii, |
512 |
|
|
psiconv_numberformat_time_HHiiss |
513 |
frodo |
111 |
} psiconv_sheet_numberformat_code_t; |
514 |
frodo |
110 |
|
515 |
frodo |
111 |
typedef struct psiconv_sheet_numberformat_s |
516 |
frodo |
110 |
{ |
517 |
frodo |
111 |
psiconv_sheet_numberformat_code_t code; |
518 |
frodo |
110 |
psiconv_u8 decimal; |
519 |
frodo |
111 |
} *psiconv_sheet_numberformat; |
520 |
frodo |
110 |
|
521 |
frodo |
111 |
typedef struct psiconv_sheet_cell_layout_s |
522 |
|
|
{ |
523 |
|
|
psiconv_character_layout character; |
524 |
|
|
psiconv_paragraph_layout paragraph; |
525 |
|
|
psiconv_sheet_numberformat numberformat; |
526 |
|
|
} * psiconv_sheet_cell_layout; |
527 |
|
|
|
528 |
frodo |
110 |
typedef struct psiconv_sheet_cell_s |
529 |
|
|
{ |
530 |
|
|
psiconv_u16 column; |
531 |
|
|
psiconv_u16 row; |
532 |
|
|
psiconv_cell_type_t type; |
533 |
|
|
union { |
534 |
|
|
psiconv_u32 dat_int; |
535 |
|
|
double dat_float; |
536 |
|
|
char *dat_string; |
537 |
frodo |
129 |
psiconv_bool_t dat_bool; |
538 |
|
|
psiconv_sheet_errorcode_t dat_error; |
539 |
frodo |
110 |
} data; |
540 |
frodo |
111 |
psiconv_sheet_cell_layout layout; |
541 |
frodo |
110 |
psiconv_bool_t calculated; |
542 |
|
|
psiconv_u32 ref_formula; |
543 |
|
|
} *psiconv_sheet_cell; |
544 |
|
|
|
545 |
|
|
typedef psiconv_list psiconv_sheet_cell_list; |
546 |
|
|
|
547 |
frodo |
94 |
typedef struct psiconv_sheet_status_section_s |
548 |
|
|
{ |
549 |
|
|
psiconv_bool_t show_graph; |
550 |
|
|
psiconv_u32 cursor_row; |
551 |
|
|
psiconv_u32 cursor_column; |
552 |
|
|
psiconv_bool_t show_top_sheet_toolbar; |
553 |
|
|
psiconv_bool_t show_side_sheet_toolbar; |
554 |
|
|
psiconv_bool_t show_top_graph_toolbar; |
555 |
|
|
psiconv_bool_t show_side_graph_toolbar; |
556 |
|
|
psiconv_u32 sheet_display_size; |
557 |
|
|
psiconv_u32 graph_display_size; |
558 |
|
|
psiconv_triple_t show_horizontal_scrollbar; |
559 |
|
|
psiconv_triple_t show_vertical_scrollbar; |
560 |
|
|
} *psiconv_sheet_status_section; |
561 |
|
|
|
562 |
frodo |
98 |
typedef enum psiconv_formula_type |
563 |
frodo |
97 |
{ |
564 |
frodo |
99 |
psiconv_formula_unknown, |
565 |
|
|
psiconv_formula_op_lt, |
566 |
|
|
psiconv_formula_op_le, |
567 |
|
|
psiconv_formula_op_gt, |
568 |
|
|
psiconv_formula_op_ge, |
569 |
|
|
psiconv_formula_op_ne, |
570 |
|
|
psiconv_formula_op_eq, |
571 |
|
|
psiconv_formula_op_add, |
572 |
|
|
psiconv_formula_op_sub, |
573 |
|
|
psiconv_formula_op_mul, |
574 |
|
|
psiconv_formula_op_div, |
575 |
|
|
psiconv_formula_op_pow, |
576 |
|
|
psiconv_formula_op_pos, |
577 |
|
|
psiconv_formula_op_neg, |
578 |
frodo |
107 |
psiconv_formula_op_not, |
579 |
|
|
psiconv_formula_op_and, |
580 |
|
|
psiconv_formula_op_or, |
581 |
frodo |
99 |
psiconv_formula_op_con, |
582 |
|
|
psiconv_formula_op_bra, |
583 |
|
|
psiconv_formula_mark_eof, |
584 |
|
|
psiconv_formula_dat_float, |
585 |
|
|
psiconv_formula_dat_int, |
586 |
|
|
psiconv_formula_dat_var, |
587 |
|
|
psiconv_formula_dat_string, |
588 |
|
|
psiconv_formula_dat_cellref, |
589 |
|
|
psiconv_formula_dat_cellblock, |
590 |
|
|
psiconv_formula_dat_vcellblock, |
591 |
|
|
psiconv_formula_mark_opsep, |
592 |
|
|
psiconv_formula_mark_opend, |
593 |
|
|
psiconv_formula_fun_false, |
594 |
|
|
psiconv_formula_fun_if, |
595 |
|
|
psiconv_formula_fun_true, |
596 |
|
|
psiconv_formula_fun_cell, |
597 |
|
|
psiconv_formula_fun_errortype, |
598 |
|
|
psiconv_formula_fun_isblank, |
599 |
|
|
psiconv_formula_fun_iserr, |
600 |
|
|
psiconv_formula_fun_iserror, |
601 |
|
|
psiconv_formula_fun_islogical, |
602 |
|
|
psiconv_formula_fun_isna, |
603 |
|
|
psiconv_formula_fun_isnontext, |
604 |
|
|
psiconv_formula_fun_isnumber, |
605 |
|
|
psiconv_formula_fun_istext, |
606 |
|
|
psiconv_formula_fun_n, |
607 |
|
|
psiconv_formula_fun_type, |
608 |
|
|
psiconv_formula_fun_address, |
609 |
|
|
psiconv_formula_fun_column, |
610 |
|
|
psiconv_formula_fun_columns, |
611 |
|
|
psiconv_formula_fun_hlookup, |
612 |
|
|
psiconv_formula_fun_index, |
613 |
|
|
psiconv_formula_fun_indirect, |
614 |
|
|
psiconv_formula_fun_lookup, |
615 |
|
|
psiconv_formula_fun_offset, |
616 |
|
|
psiconv_formula_fun_row, |
617 |
|
|
psiconv_formula_fun_rows, |
618 |
|
|
psiconv_formula_fun_vlookup, |
619 |
|
|
psiconv_formula_fun_char, |
620 |
|
|
psiconv_formula_fun_code, |
621 |
|
|
psiconv_formula_fun_exact, |
622 |
|
|
psiconv_formula_fun_find, |
623 |
|
|
psiconv_formula_fun_left, |
624 |
|
|
psiconv_formula_fun_len, |
625 |
|
|
psiconv_formula_fun_lower, |
626 |
|
|
psiconv_formula_fun_mid, |
627 |
|
|
psiconv_formula_fun_proper, |
628 |
|
|
psiconv_formula_fun_replace, |
629 |
|
|
psiconv_formula_fun_rept, |
630 |
|
|
psiconv_formula_fun_right, |
631 |
|
|
psiconv_formula_fun_string, |
632 |
|
|
psiconv_formula_fun_t, |
633 |
|
|
psiconv_formula_fun_trim, |
634 |
|
|
psiconv_formula_fun_upper, |
635 |
|
|
psiconv_formula_fun_value, |
636 |
|
|
psiconv_formula_fun_date, |
637 |
|
|
psiconv_formula_fun_datevalue, |
638 |
|
|
psiconv_formula_fun_day, |
639 |
|
|
psiconv_formula_fun_hour, |
640 |
|
|
psiconv_formula_fun_minute, |
641 |
|
|
psiconv_formula_fun_month, |
642 |
|
|
psiconv_formula_fun_now, |
643 |
|
|
psiconv_formula_fun_second, |
644 |
|
|
psiconv_formula_fun_today, |
645 |
|
|
psiconv_formula_fun_time, |
646 |
|
|
psiconv_formula_fun_timevalue, |
647 |
|
|
psiconv_formula_fun_year, |
648 |
|
|
psiconv_formula_fun_abs, |
649 |
|
|
psiconv_formula_fun_acos, |
650 |
|
|
psiconv_formula_fun_asin, |
651 |
|
|
psiconv_formula_fun_atan, |
652 |
|
|
psiconv_formula_fun_atan2, |
653 |
|
|
psiconv_formula_fun_cos, |
654 |
|
|
psiconv_formula_fun_degrees, |
655 |
|
|
psiconv_formula_fun_exp, |
656 |
|
|
psiconv_formula_fun_fact, |
657 |
|
|
psiconv_formula_fun_int, |
658 |
|
|
psiconv_formula_fun_ln, |
659 |
|
|
psiconv_formula_fun_log10, |
660 |
|
|
psiconv_formula_fun_mod, |
661 |
|
|
psiconv_formula_fun_pi, |
662 |
|
|
psiconv_formula_fun_radians, |
663 |
|
|
psiconv_formula_fun_rand, |
664 |
|
|
psiconv_formula_fun_round, |
665 |
|
|
psiconv_formula_fun_sign, |
666 |
|
|
psiconv_formula_fun_sin, |
667 |
|
|
psiconv_formula_fun_sqrt, |
668 |
|
|
psiconv_formula_fun_sumproduct, |
669 |
|
|
psiconv_formula_fun_tan, |
670 |
|
|
psiconv_formula_fun_trunc, |
671 |
|
|
psiconv_formula_fun_cterm, |
672 |
|
|
psiconv_formula_fun_ddb, |
673 |
|
|
psiconv_formula_fun_fv, |
674 |
|
|
psiconv_formula_fun_irr, |
675 |
|
|
psiconv_formula_fun_npv, |
676 |
|
|
psiconv_formula_fun_pmt, |
677 |
|
|
psiconv_formula_fun_pv, |
678 |
|
|
psiconv_formula_fun_rate, |
679 |
|
|
psiconv_formula_fun_sln, |
680 |
|
|
psiconv_formula_fun_syd, |
681 |
|
|
psiconv_formula_fun_term, |
682 |
|
|
psiconv_formula_fun_combin, |
683 |
|
|
psiconv_formula_fun_permut, |
684 |
|
|
psiconv_formula_vfn_average, |
685 |
|
|
psiconv_formula_vfn_choose, |
686 |
|
|
psiconv_formula_vfn_count, |
687 |
|
|
psiconv_formula_vfn_counta, |
688 |
|
|
psiconv_formula_vfn_countblank, |
689 |
|
|
psiconv_formula_vfn_max, |
690 |
|
|
psiconv_formula_vfn_min, |
691 |
|
|
psiconv_formula_vfn_product, |
692 |
|
|
psiconv_formula_vfn_stdevp, |
693 |
|
|
psiconv_formula_vfn_stdev, |
694 |
|
|
psiconv_formula_vfn_sum, |
695 |
|
|
psiconv_formula_vfn_sumsq, |
696 |
|
|
psiconv_formula_vfn_varp, |
697 |
|
|
psiconv_formula_vfn_var |
698 |
frodo |
98 |
} psiconv_formula_type_t; |
699 |
frodo |
97 |
|
700 |
frodo |
98 |
typedef psiconv_list psiconv_formula_list; /* Of struct psiconv_formula_s */ |
701 |
frodo |
97 |
|
702 |
frodo |
98 |
typedef struct psiconv_formula_s |
703 |
|
|
{ |
704 |
|
|
psiconv_formula_type_t type; |
705 |
|
|
union { |
706 |
frodo |
99 |
psiconv_u32 dat_int; |
707 |
|
|
double dat_float; |
708 |
|
|
char *dat_string; |
709 |
frodo |
102 |
psiconv_sheet_cell_reference_t dat_cellref; |
710 |
|
|
psiconv_sheet_cell_block_t dat_cellblock; |
711 |
frodo |
99 |
psiconv_formula_list fun_operands; |
712 |
frodo |
129 |
psiconv_u32 dat_variable; |
713 |
frodo |
98 |
} data; |
714 |
|
|
} *psiconv_formula; |
715 |
|
|
|
716 |
frodo |
128 |
typedef struct psiconv_sheet_line_s |
717 |
|
|
{ |
718 |
|
|
psiconv_u32 position; |
719 |
|
|
psiconv_sheet_cell_layout layout; |
720 |
|
|
} *psiconv_sheet_line; |
721 |
|
|
|
722 |
|
|
typedef psiconv_list psiconv_sheet_line_list; |
723 |
|
|
/* Of struct psiconv_sheet_line_s */ |
724 |
|
|
|
725 |
frodo |
134 |
typedef struct psiconv_sheet_grid_size_s |
726 |
|
|
{ |
727 |
|
|
psiconv_u32 line_number; |
728 |
|
|
psiconv_length_t size; |
729 |
|
|
} *psiconv_sheet_grid_size; |
730 |
|
|
|
731 |
|
|
typedef psiconv_list psiconv_sheet_grid_size_list; |
732 |
|
|
/* Of struct psiconv_sheet_grid_size_s */ |
733 |
|
|
|
734 |
|
|
typedef psiconv_list psiconv_sheet_grid_break_list; /* of psiconv_u32 */ |
735 |
|
|
|
736 |
|
|
typedef struct psiconv_sheet_grid_section_s |
737 |
|
|
{ |
738 |
|
|
psiconv_bool_t show_column_titles; |
739 |
|
|
psiconv_bool_t show_row_titles; |
740 |
|
|
psiconv_bool_t show_vertical_grid; |
741 |
|
|
psiconv_bool_t show_horizontal_grid; |
742 |
|
|
psiconv_bool_t freeze_rows; |
743 |
|
|
psiconv_bool_t freeze_columns; |
744 |
|
|
psiconv_u32 frozen_rows; |
745 |
|
|
psiconv_u32 frozen_columns; |
746 |
|
|
psiconv_u32 first_unfrozen_row_displayed; |
747 |
|
|
psiconv_u32 first_unfrozen_column_displayed; |
748 |
|
|
psiconv_bool_t show_page_breaks; |
749 |
|
|
psiconv_u32 first_row; |
750 |
|
|
psiconv_u32 first_column; |
751 |
|
|
psiconv_u32 last_row; |
752 |
|
|
psiconv_u32 last_column; |
753 |
|
|
psiconv_length_t default_row_height; |
754 |
|
|
psiconv_length_t default_column_width; |
755 |
|
|
psiconv_sheet_grid_size_list row_heights; |
756 |
|
|
psiconv_sheet_grid_size_list column_heights; |
757 |
|
|
psiconv_sheet_grid_break_list row_page_breaks; |
758 |
|
|
psiconv_sheet_grid_break_list column_page_breaks; |
759 |
|
|
} *psiconv_sheet_grid_section; |
760 |
|
|
|
761 |
frodo |
111 |
typedef struct psiconv_sheet_worksheet_s |
762 |
frodo |
110 |
{ |
763 |
frodo |
111 |
psiconv_sheet_cell_layout default_layout; |
764 |
frodo |
110 |
psiconv_sheet_cell_list cells; |
765 |
frodo |
111 |
psiconv_bool_t show_zeros; |
766 |
frodo |
128 |
psiconv_sheet_line_list row_default_layouts; |
767 |
|
|
psiconv_sheet_line_list col_default_layouts; |
768 |
frodo |
134 |
psiconv_sheet_grid_section grid; |
769 |
frodo |
111 |
} *psiconv_sheet_worksheet; |
770 |
frodo |
110 |
|
771 |
frodo |
111 |
typedef psiconv_list psiconv_sheet_worksheet_list; |
772 |
frodo |
129 |
/* of struct psiconv_sheet_worksheet_s */ |
773 |
frodo |
111 |
|
774 |
frodo |
129 |
typedef enum psiconv_variable_type |
775 |
|
|
{ |
776 |
|
|
psiconv_var_int, |
777 |
|
|
psiconv_var_float, |
778 |
|
|
psiconv_var_string, |
779 |
|
|
psiconv_var_cellref, |
780 |
|
|
psiconv_var_cellblock |
781 |
|
|
} psiconv_variable_type_t; |
782 |
|
|
|
783 |
|
|
typedef struct psiconv_sheet_variable_s |
784 |
|
|
{ |
785 |
|
|
psiconv_u32 number; |
786 |
|
|
char *name; |
787 |
|
|
psiconv_variable_type_t type; |
788 |
|
|
union { |
789 |
|
|
psiconv_s32 dat_int; |
790 |
|
|
double dat_float; |
791 |
|
|
char *dat_string; |
792 |
|
|
psiconv_sheet_cell_reference_t dat_cellref; |
793 |
|
|
psiconv_sheet_cell_block_t dat_cellblock; |
794 |
|
|
} data; |
795 |
|
|
} *psiconv_sheet_variable; |
796 |
|
|
|
797 |
|
|
typedef psiconv_list psiconv_sheet_variable_list; |
798 |
|
|
/* of struct psiconv_sheet_variable_s */ |
799 |
|
|
|
800 |
|
|
typedef struct psiconv_sheet_name_section_s |
801 |
|
|
{ |
802 |
|
|
char *name; |
803 |
|
|
} *psiconv_sheet_name_section; |
804 |
|
|
|
805 |
|
|
typedef struct psiconv_sheet_info_section_s |
806 |
|
|
{ |
807 |
|
|
psiconv_bool_t auto_recalc; |
808 |
|
|
} *psiconv_sheet_info_section; |
809 |
|
|
|
810 |
frodo |
95 |
typedef struct psiconv_sheet_workbook_section_s |
811 |
|
|
{ |
812 |
frodo |
98 |
psiconv_formula_list formulas; |
813 |
frodo |
111 |
psiconv_sheet_worksheet_list worksheets; |
814 |
frodo |
129 |
psiconv_sheet_variable_list variables; |
815 |
|
|
psiconv_sheet_info_section info; |
816 |
|
|
psiconv_sheet_name_section name; |
817 |
frodo |
95 |
} *psiconv_sheet_workbook_section; |
818 |
|
|
|
819 |
frodo |
94 |
typedef struct psiconv_sheet_f_s |
820 |
|
|
{ |
821 |
|
|
psiconv_page_layout_section page_sec; |
822 |
|
|
psiconv_sheet_status_section status_sec; |
823 |
frodo |
95 |
psiconv_sheet_workbook_section workbook_sec; |
824 |
frodo |
94 |
} *psiconv_sheet_f; |
825 |
|
|
|
826 |
frodo |
159 |
/* NB: psiconv_file is already defined above */ |
827 |
|
|
struct psiconv_file_s |
828 |
frodo |
56 |
{ |
829 |
frodo |
2 |
psiconv_file_type_t type; |
830 |
|
|
void *file; |
831 |
frodo |
159 |
}; |
832 |
frodo |
2 |
|
833 |
|
|
|
834 |
|
|
/* UID1 */ |
835 |
|
|
#define PSICONV_ID_PSION5 0x10000037 |
836 |
frodo |
41 |
#define PSICONV_ID_CLIPART 0x10000041 |
837 |
frodo |
2 |
/* UID2 */ |
838 |
|
|
#define PSICONV_ID_DATA_FILE 0x1000006D |
839 |
frodo |
12 |
#define PSICONV_ID_MBM_FILE 0x10000042 |
840 |
frodo |
2 |
/* UID3 */ |
841 |
|
|
#define PSICONV_ID_WORD 0x1000007F |
842 |
|
|
#define PSICONV_ID_TEXTED 0x10000085 |
843 |
frodo |
24 |
#define PSICONV_ID_SKETCH 0x1000007D |
844 |
frodo |
94 |
#define PSICONV_ID_SHEET 0x10000088 |
845 |
frodo |
2 |
|
846 |
|
|
/* Section table ids */ |
847 |
|
|
#define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 |
848 |
|
|
#define PSICONV_ID_APPL_ID_SECTION 0x10000089 |
849 |
|
|
#define PSICONV_ID_TEXT_SECTION 0x10000106 |
850 |
|
|
#define PSICONV_ID_LAYOUT_SECTION 0x10000143 |
851 |
|
|
#define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 |
852 |
|
|
#define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
853 |
|
|
#define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
854 |
frodo |
24 |
#define PSICONV_ID_SKETCH_SECTION 0x1000007D |
855 |
frodo |
94 |
#define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F |
856 |
frodo |
95 |
#define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D |
857 |
frodo |
110 |
#define PSICONV_ID_SHEET_GRAPH_SECTION 0x10000121 |
858 |
frodo |
2 |
|
859 |
|
|
/* Other ids */ |
860 |
frodo |
76 |
#define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd |
861 |
|
|
#define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e |
862 |
frodo |
2 |
#define PSICONV_ID_TEXTED_BODY 0x1000005c |
863 |
|
|
#define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 |
864 |
|
|
#define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 |
865 |
|
|
#define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
866 |
|
|
#define PSICONV_ID_TEXTED_TEXT 0x10000064 |
867 |
|
|
#define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
868 |
|
|
#define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
869 |
frodo |
43 |
#define PSICONV_ID_CLIPART_ITEM 0x10000040 |
870 |
frodo |
160 |
#define PSICONV_ID_OBJECT 0x10000051 |
871 |
|
|
#define PSICONV_ID_OBJECT_DISPLAY_SECTION 0x10000146 |
872 |
|
|
#define PSICONV_ID_OBJECT_ICON_SECTION 0x1000012A |
873 |
|
|
#define PSICONV_ID_OBJECT_SECTION_TABLE_SECTION 0x10000144 |
874 |
frodo |
2 |
|
875 |
|
|
|
876 |
frodo |
62 |
/* Return a clean layout_status. You can modify it at will. Returns NULL |
877 |
|
|
if there is not enough memory. */ |
878 |
frodo |
2 |
extern psiconv_character_layout psiconv_basic_character_layout(void); |
879 |
|
|
|
880 |
frodo |
62 |
/* Return a clean layout_status. You can modify it at will. Returns NULL |
881 |
|
|
if there is not enough memory. */ |
882 |
frodo |
2 |
extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); |
883 |
|
|
|
884 |
|
|
/* Clone a layout_status: the new copy is completely independent of the |
885 |
frodo |
62 |
original one. Returns NULL if there is not enough memory. */ |
886 |
frodo |
2 |
extern psiconv_paragraph_layout psiconv_clone_paragraph_layout |
887 |
|
|
(psiconv_paragraph_layout ls); |
888 |
|
|
|
889 |
|
|
extern psiconv_character_layout psiconv_clone_character_layout |
890 |
|
|
(psiconv_character_layout ls); |
891 |
|
|
|
892 |
frodo |
62 |
/* Get a numbered style. Returns NULL if the style is unknown. */ |
893 |
frodo |
2 |
extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
894 |
frodo |
128 |
/* Get a numbered formula. Returns NULL if the style is unknown. */ |
895 |
frodo |
125 |
extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); |
896 |
frodo |
2 |
|
897 |
frodo |
128 |
/* Return the default layout */ |
898 |
|
|
extern psiconv_sheet_cell_layout psiconv_get_default_layout |
899 |
|
|
(psiconv_sheet_line_list row_defaults, |
900 |
|
|
psiconv_sheet_line_list col_defaults, |
901 |
|
|
psiconv_sheet_cell_layout cell_default, |
902 |
|
|
int row,int col); |
903 |
|
|
|
904 |
frodo |
2 |
extern void psiconv_free_color(psiconv_color color); |
905 |
|
|
extern void psiconv_free_border(psiconv_border border); |
906 |
|
|
extern void psiconv_free_bullet(psiconv_bullet bullet); |
907 |
|
|
extern void psiconv_free_font(psiconv_font font); |
908 |
|
|
extern void psiconv_free_tab(psiconv_tab tab); |
909 |
|
|
extern void psiconv_free_tabs(psiconv_all_tabs tabs); |
910 |
|
|
extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
911 |
|
|
extern void psiconv_free_character_layout(psiconv_character_layout layout); |
912 |
|
|
extern void psiconv_free_word_style(psiconv_word_style style); |
913 |
|
|
extern void psiconv_free_word_styles_section |
914 |
|
|
(psiconv_word_styles_section styles); |
915 |
frodo |
98 |
extern void psiconv_free_formula(psiconv_formula formula); |
916 |
|
|
extern void psiconv_free_formula_list(psiconv_formula_list list); |
917 |
frodo |
94 |
extern void psiconv_free_sheet_status_section |
918 |
|
|
(psiconv_sheet_status_section section); |
919 |
frodo |
111 |
extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout); |
920 |
frodo |
134 |
extern void psiconv_free_sheet_grid_break_list |
921 |
|
|
(psiconv_sheet_grid_break_list list); |
922 |
|
|
extern void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s); |
923 |
|
|
extern void psiconv_free_sheet_grid_size_list |
924 |
|
|
(psiconv_sheet_grid_size_list list); |
925 |
|
|
extern void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec); |
926 |
frodo |
111 |
extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet); |
927 |
|
|
extern void psiconv_free_sheet_worksheet_list |
928 |
|
|
(psiconv_sheet_worksheet_list list); |
929 |
|
|
|
930 |
frodo |
94 |
extern void psiconv_free_sheet_f(psiconv_sheet_f file); |
931 |
frodo |
110 |
extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); |
932 |
|
|
extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); |
933 |
frodo |
111 |
extern void psiconv_free_sheet_numberformat |
934 |
|
|
(psiconv_sheet_numberformat numberformat); |
935 |
frodo |
128 |
extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list); |
936 |
|
|
extern void psiconv_free_sheet_line(psiconv_sheet_line line); |
937 |
frodo |
129 |
extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); |
938 |
|
|
extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); |
939 |
|
|
extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); |
940 |
|
|
extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); |
941 |
frodo |
171 |
extern void psiconv_free_sheet_workbook_section |
942 |
|
|
(psiconv_sheet_workbook_section section); |
943 |
frodo |
2 |
extern void psiconv_free_header_section(psiconv_header_section header); |
944 |
|
|
extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
945 |
|
|
extern void psiconv_free_section_table_section |
946 |
|
|
(psiconv_section_table_section section); |
947 |
|
|
extern void psiconv_free_application_id_section |
948 |
|
|
(psiconv_application_id_section section); |
949 |
frodo |
159 |
extern void psiconv_free_object_display_section |
950 |
|
|
(psiconv_object_display_section section); |
951 |
|
|
extern void psiconv_free_object_icon_section |
952 |
|
|
(psiconv_object_icon_section section); |
953 |
frodo |
167 |
extern void psiconv_free_embedded_object_section |
954 |
|
|
(psiconv_embedded_object_section object); |
955 |
frodo |
2 |
extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
956 |
|
|
extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
957 |
|
|
extern void psiconv_free_replacement(psiconv_replacement replacement); |
958 |
|
|
extern void psiconv_free_replacements(psiconv_replacements replacements); |
959 |
|
|
extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |
960 |
|
|
extern void psiconv_free_text_and_layout(psiconv_text_and_layout text); |
961 |
|
|
extern void psiconv_free_texted_section(psiconv_texted_section section); |
962 |
|
|
extern void psiconv_free_page_header(psiconv_page_header header); |
963 |
|
|
extern void psiconv_free_page_layout_section |
964 |
|
|
(psiconv_page_layout_section section); |
965 |
|
|
extern void psiconv_free_word_status_section |
966 |
|
|
(psiconv_word_status_section section); |
967 |
|
|
extern void psiconv_free_word_f(psiconv_word_f file); |
968 |
frodo |
12 |
extern void psiconv_free_texted_f(psiconv_texted_f file); |
969 |
|
|
extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
970 |
|
|
extern void psiconv_free_pictures(psiconv_pictures section); |
971 |
frodo |
42 |
extern void psiconv_free_jumptable_section |
972 |
|
|
(psiconv_jumptable_section section); |
973 |
frodo |
12 |
extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
974 |
frodo |
24 |
extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
975 |
|
|
extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
976 |
frodo |
41 |
extern void psiconv_free_clipart_section(psiconv_clipart_section section); |
977 |
|
|
extern void psiconv_free_cliparts(psiconv_cliparts section); |
978 |
|
|
extern void psiconv_free_clipart_f(psiconv_clipart_f file); |
979 |
frodo |
24 |
|
980 |
frodo |
2 |
extern void psiconv_free_file(psiconv_file file); |
981 |
|
|
|
982 |
frodo |
78 |
extern int psiconv_compare_color(const psiconv_color value1, |
983 |
|
|
const psiconv_color value2); |
984 |
|
|
extern int psiconv_compare_font(const psiconv_font value1, |
985 |
|
|
const psiconv_font value2); |
986 |
|
|
extern int psiconv_compare_border(const psiconv_border value1, |
987 |
|
|
const psiconv_border value2); |
988 |
|
|
extern int psiconv_compare_bullet(const psiconv_bullet value1, |
989 |
|
|
const psiconv_bullet value2); |
990 |
|
|
extern int psiconv_compare_tab(const psiconv_tab value1, |
991 |
|
|
const psiconv_tab value2); |
992 |
|
|
extern int psiconv_compare_all_tabs(const psiconv_all_tabs value1, |
993 |
|
|
const psiconv_all_tabs value2); |
994 |
|
|
extern int psiconv_compare_paragraph_layout |
995 |
|
|
(const psiconv_paragraph_layout value1, |
996 |
|
|
const psiconv_paragraph_layout value2); |
997 |
|
|
|
998 |
|
|
extern int psiconv_compare_character_layout |
999 |
|
|
(const psiconv_character_layout value1, |
1000 |
|
|
const psiconv_character_layout value2); |
1001 |
|
|
|
1002 |
frodo |
87 |
/* Get a newly allocated file with sensible defaults, ready to generate. */ |
1003 |
|
|
extern psiconv_file psiconv_empty_file(psiconv_file_type_t type); |
1004 |
frodo |
78 |
|
1005 |
frodo |
87 |
|
1006 |
frodo |
55 |
#ifdef __cplusplus |
1007 |
|
|
} |
1008 |
|
|
#endif /* __cplusplus */ |
1009 |
frodo |
2 |
|
1010 |
|
|
#endif /* def PSICONV_DATA_H */ |