1 | /* |
1 | /* |
2 | data.h - Part of psiconv, a PSION 5 file formats converter |
2 | data.h - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 1999 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 1999-2004 Frodo Looijaard <frodol@dds.nl> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
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 |
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 |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
16 | along with this program; if not, write to the Free Software |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 | */ |
18 | */ |
19 | |
19 | |
20 | /* This file contains the declarations of all types that are used to |
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 |
21 | represent the Psion files. Variables of these types are written by the |
22 | parse routines, and read by the generation routines. */ |
22 | parse routines, and read by the generation routines. |
|
|
23 | |
|
|
24 | Mostly, the data structures reflect the file format documentation, |
|
|
25 | as included in the formats directory. When in doubt, refer there. */ |
23 | |
26 | |
24 | #ifndef PSICONV_DATA_H |
27 | #ifndef PSICONV_DATA_H |
25 | #define PSICONV_DATA_H |
28 | #define PSICONV_DATA_H |
26 | |
29 | |
27 | #include "general.h" |
30 | #include <psiconv/general.h> |
28 | #include "list.h" |
31 | #include <psiconv/list.h> |
29 | |
32 | |
30 | /* All types which end on _t are plain types; all other types are pointers |
33 | /* All types which end on _t are plain types; all other types are pointers |
31 | to structs */ |
34 | to structs. */ |
32 | |
35 | |
|
|
36 | #ifdef __cplusplus |
|
|
37 | extern "C" { |
|
|
38 | #endif /* __cplusplus */ |
|
|
39 | |
|
|
40 | /* Forward declaration (for psiconv_embedded_object_section) */ |
|
|
41 | typedef struct psiconv_file_s *psiconv_file; |
|
|
42 | |
|
|
43 | |
|
|
44 | /* Enums and simple types */ |
|
|
45 | |
|
|
46 | |
|
|
47 | /* Floating point number representation */ |
|
|
48 | typedef double psiconv_float_t; |
|
|
49 | |
|
|
50 | /* The supported file types. */ |
33 | typedef enum psiconv_file_type { |
51 | typedef enum psiconv_file_type { |
34 | psiconv_unknown_file, |
52 | psiconv_unknown_file, |
35 | psiconv_word_file, |
53 | psiconv_word_file, |
36 | psiconv_texted_file, |
54 | psiconv_texted_file, |
37 | psiconv_mbm_file, |
55 | psiconv_mbm_file, |
38 | psiconv_sketch_file |
56 | psiconv_sketch_file, |
|
|
57 | psiconv_clipart_file, |
|
|
58 | psiconv_sheet_file |
39 | } psiconv_file_type_t; |
59 | } psiconv_file_type_t; |
40 | |
60 | |
41 | /* Length indicators */ |
61 | /* String representation. A string is an array of UCS2 characters, terminated |
|
|
62 | by a 0. So they are just like normal C strings, except that they are built |
|
|
63 | of psiconv_ucs2 elements instead of char elements. |
|
|
64 | The psiconv_ucs2 type holds 16 bits; see unicode.h for more information. */ |
42 | typedef psiconv_u32 psiconv_S_t; |
65 | typedef psiconv_ucs2 *psiconv_string_t; |
43 | typedef psiconv_u32 psiconv_X_t; |
|
|
44 | |
66 | |
45 | /* A string */ |
67 | /* Represent lengths (in centimeters) and sizes (in points). |
46 | typedef char *psiconv_string_t; |
|
|
47 | |
|
|
48 | /* In the Psion file, these are identical; but we translate them to more |
68 | In the Psion file, these are identical; but we translate them to more |
49 | human-readable quantities */ |
69 | human-readable quantities */ |
50 | typedef float psiconv_length_t; /* For offsets in centimeters */ |
70 | typedef float psiconv_length_t; /* For offsets in centimeters */ |
51 | typedef float psiconv_size_t; /* For sizes in points */ |
71 | typedef float psiconv_size_t; /* For sizes in points */ |
52 | |
72 | |
53 | /* Some enums */ |
73 | /* Represent booleans. As false is zero in the enum, you can still do things |
|
|
74 | like { if (test) ... } instead of { if (test == psiconv_bool_true) ... }. |
|
|
75 | Choose whatever style suits you best. */ |
54 | typedef enum psiconv_bool |
76 | typedef enum psiconv_bool |
55 | { |
77 | { |
56 | psiconv_bool_false, |
78 | psiconv_bool_false, |
57 | psiconv_bool_true |
79 | psiconv_bool_true |
58 | } psiconv_bool_t; |
80 | } psiconv_bool_t; |
59 | |
81 | |
|
|
82 | /* Some kind of three-valued boolean, used at several places. */ |
|
|
83 | typedef enum psiconv_triple |
|
|
84 | { |
|
|
85 | psiconv_triple_on, |
|
|
86 | psiconv_triple_off, |
|
|
87 | psiconv_triple_auto |
|
|
88 | } psiconv_triple_t; |
|
|
89 | |
|
|
90 | /* Text can be in superscript or subscript or neither, but never both |
|
|
91 | superscript and subscript at once. Also, super-superscript and things |
|
|
92 | like that do not exist in the Psion world. */ |
60 | typedef enum psiconv_super_sub |
93 | typedef enum psiconv_super_sub |
61 | { psiconv_normalscript, |
94 | { psiconv_normalscript, |
62 | psiconv_superscript, |
95 | psiconv_superscript, |
63 | psiconv_subscript |
96 | psiconv_subscript |
64 | } psiconv_super_sub_t; |
97 | } psiconv_super_sub_t; |
65 | |
98 | |
|
|
99 | /* Horizontal justification. */ |
66 | typedef enum psiconv_justify_hor |
100 | typedef enum psiconv_justify_hor |
67 | { psiconv_justify_left, |
101 | { psiconv_justify_left, |
68 | psiconv_justify_centre, |
102 | psiconv_justify_centre, |
69 | psiconv_justify_right, |
103 | psiconv_justify_right, |
70 | psiconv_justify_full |
104 | psiconv_justify_full |
71 | } psiconv_justify_hor_t; |
105 | } psiconv_justify_hor_t; |
72 | |
106 | |
|
|
107 | /* Vertical justification. */ |
73 | typedef enum psiconv_justify_ver |
108 | typedef enum psiconv_justify_ver |
74 | { psiconv_justify_top, |
109 | { psiconv_justify_top, |
75 | psiconv_justify_middle, |
110 | psiconv_justify_middle, |
76 | psiconv_justify_bottom |
111 | psiconv_justify_bottom |
77 | } psiconv_justify_ver_t; |
112 | } psiconv_justify_ver_t; |
78 | |
113 | |
|
|
114 | /* Borders around text fields. */ |
79 | typedef enum psiconv_border_kind |
115 | typedef enum psiconv_border_kind |
80 | { psiconv_border_none, |
116 | { psiconv_border_none, /* No border */ |
81 | psiconv_border_solid, |
117 | psiconv_border_solid, /* Single line */ |
82 | psiconv_border_double, |
118 | psiconv_border_double, /* Double line */ |
83 | psiconv_border_dotted, |
119 | psiconv_border_dotted, /* Dotted line: . . . . . */ |
84 | psiconv_border_striped, |
120 | psiconv_border_dashed, /* Dashed line: _ _ _ _ _ */ |
85 | psiconv_border_dotstripe, |
121 | psiconv_border_dotdashed, /* Dotted/dashed line: _ . _ . _ */ |
86 | psiconv_border_dotdotstripe |
122 | psiconv_border_dotdotdashed /* Dotted/dashed line: . . _ . . _ */ |
87 | } psiconv_border_kind_t; |
123 | } psiconv_border_kind_t; |
88 | |
124 | |
89 | /* Colors. |
125 | /* Though each printer driver has its own fonts for printing, they are |
|
|
126 | represented on the Psion screen by a few built-in fonts. */ |
|
|
127 | typedef enum psiconv_screenfont |
|
|
128 | { |
|
|
129 | psiconv_font_misc, /* Nonproportional symbols, like Wingbat? */ |
|
|
130 | psiconv_font_sansserif, /* Proportional sans-serif, like Arial */ |
|
|
131 | psiconv_font_nonprop, /* Nonproportional, like Courier */ |
|
|
132 | psiconv_font_serif /* Proportional serifed, like Times */ |
|
|
133 | } psiconv_screenfont_t; |
|
|
134 | |
|
|
135 | |
|
|
136 | /* The kind of tab. Note that decimal tabs are not supported by the Psion. */ |
|
|
137 | typedef enum psiconv_tab_kind |
|
|
138 | { |
|
|
139 | psiconv_tab_left, /* Left tab */ |
|
|
140 | psiconv_tab_centre, /* Centre tab */ |
|
|
141 | psiconv_tab_right /* Right tab */ |
|
|
142 | } psiconv_tab_kind_t; |
|
|
143 | |
|
|
144 | /* When text has to be replaced, the kind of replacement to do |
|
|
145 | (not yet implemented!) */ |
|
|
146 | typedef enum psiconv_replacement_type |
|
|
147 | { |
|
|
148 | psiconv_replace_time, |
|
|
149 | psiconv_replace_date, |
|
|
150 | psiconv_replace_pagenr, |
|
|
151 | psiconv_replace_nr_of_pages, |
|
|
152 | psiconv_replace_filename |
|
|
153 | } psiconv_replacement_type_t; |
|
|
154 | |
|
|
155 | |
|
|
156 | /* Here starts the struct definitions */ |
|
|
157 | |
|
|
158 | /* The color of a single pixel, in RGB format. |
90 | black: 0x00 0x00 0x00 |
159 | Black: 0x00 0x00 0x00 |
91 | white: 0xff 0xff 0xff */ |
160 | White: 0xff 0xff 0xff */ |
92 | typedef struct psiconv_color |
161 | typedef struct psiconv_color_s |
93 | { |
162 | { |
94 | psiconv_u8 red; |
163 | psiconv_u8 red; |
95 | psiconv_u8 green; |
164 | psiconv_u8 green; |
96 | psiconv_u8 blue; |
165 | psiconv_u8 blue; |
97 | } * psiconv_color; |
166 | } * psiconv_color; |
98 | |
167 | |
|
|
168 | |
|
|
169 | /* Complete font information: both a printer font and a corresponding screen |
|
|
170 | font to display it. */ |
99 | typedef struct psiconv_font |
171 | typedef struct psiconv_font_s |
100 | { |
172 | { |
101 | char *name; |
173 | psiconv_string_t name; /* Printer font */ |
102 | psiconv_u8 screenfont; |
174 | psiconv_screenfont_t screenfont; /* Screen font */ |
103 | } *psiconv_font; |
175 | } *psiconv_font; |
104 | |
176 | |
|
|
177 | /* Complete border information */ |
105 | typedef struct psiconv_border |
178 | typedef struct psiconv_border_s |
106 | { |
179 | { |
107 | psiconv_border_kind_t kind; |
180 | psiconv_border_kind_t kind; /* Border kind */ |
108 | psiconv_size_t thickness; /* Set to 1/20 for non-solid lines */ |
181 | psiconv_size_t thickness; /* Set to 1/20 for non-solid lines */ |
109 | psiconv_color color; |
182 | psiconv_color color; /* Border color */ |
110 | } *psiconv_border; |
183 | } *psiconv_border; |
111 | |
184 | |
|
|
185 | /* Complete bullet information. |
|
|
186 | The interaction of left and first line indentation and bullets is quite |
|
|
187 | complicated. |
|
|
188 | |
|
|
189 | BULLET FIRST BULLET FIRST LINE NEXT LINES |
|
|
190 | |
|
|
191 | None = 0 - Left+First Left |
|
|
192 | > 0 - Left+First Left |
|
|
193 | < 0 - Left+First Left |
|
|
194 | |
|
|
195 | Indent Off = 0 Left Left(+Bullet) Left |
|
|
196 | > 0 Left Left+First Left |
|
|
197 | < 0 Left+First Left+First(+Bullet) Left |
|
|
198 | |
|
|
199 | Indent On = 0 Left Left(+Bullet) Left |
|
|
200 | > 0 Left Left+First Left+First |
|
|
201 | < 0 Left+First Left Left |
|
|
202 | */ |
112 | typedef struct psiconv_bullet |
203 | typedef struct psiconv_bullet_s |
113 | { |
204 | { |
114 | psiconv_bool_t on; |
205 | psiconv_bool_t on; /* Whether the bullet is shown */ |
115 | psiconv_size_t font_size; |
206 | psiconv_size_t font_size; /* Bullet font size */ |
116 | psiconv_u8 character; |
207 | psiconv_ucs2 character; /* Bullet character */ |
117 | psiconv_bool_t indent; |
208 | psiconv_bool_t indent; /* Whether to indent (see above */ |
118 | psiconv_color color; |
209 | psiconv_color color; /* Bullet color */ |
119 | psiconv_font font; |
210 | psiconv_font font; /* Bullet font */ |
120 | } *psiconv_bullet; |
211 | } *psiconv_bullet; |
121 | |
212 | |
122 | typedef enum psiconv_tab_kind |
213 | /* Complete single tab information */ |
123 | { |
|
|
124 | psiconv_tab_left, |
|
|
125 | psiconv_tab_centre, |
|
|
126 | psiconv_tab_right |
|
|
127 | } psiconv_tab_kind_t; |
|
|
128 | |
|
|
129 | typedef struct psiconv_tab |
214 | typedef struct psiconv_tab_s |
130 | { |
215 | { |
131 | psiconv_length_t location; |
216 | psiconv_length_t location; /* The indentation level */ |
132 | psiconv_tab_kind_t kind; |
217 | psiconv_tab_kind_t kind; /* Tab kind */ |
133 | } *psiconv_tab; |
218 | } *psiconv_tab; |
134 | |
219 | |
135 | |
220 | /* A list of tabs */ |
136 | typedef psiconv_list psiconv_tab_list; /* of struct psiconv_tab */ |
221 | typedef psiconv_list psiconv_tab_list; /* of struct psiconv_tab_s */ |
137 | |
222 | |
|
|
223 | /* Information about all tabs. |
|
|
224 | Normal tabs start after the rightmost extra tab */ |
138 | typedef struct psiconv_all_tabs |
225 | typedef struct psiconv_all_tabs_s |
139 | { |
226 | { |
140 | psiconv_length_t normal; |
227 | psiconv_length_t normal; /* Normal tab distance */ |
141 | psiconv_tab_list extras; |
228 | psiconv_tab_list extras; /* Additional defined tabs */ |
142 | } *psiconv_all_tabs; |
229 | } *psiconv_all_tabs; |
143 | |
230 | |
|
|
231 | /* Character layout. |
|
|
232 | This structure holds all layout information that can be applied on the |
|
|
233 | character level (as opposed to layouts that only apply to whole |
|
|
234 | paragraphs). |
|
|
235 | Note that at all times, this structure holds the complete layout |
|
|
236 | information; we do not use incremental layouts, unlike the Psion |
|
|
237 | file format itself. So if an italic text is also underlined, the |
|
|
238 | character_layout will have both set for that region. */ |
144 | typedef struct psiconv_character_layout |
239 | typedef struct psiconv_character_layout_s |
145 | { |
240 | { |
146 | psiconv_color color; |
241 | psiconv_color color; /* Character color */ |
147 | psiconv_color back_color; |
242 | psiconv_color back_color; /* Background color */ |
148 | psiconv_size_t font_size; |
243 | psiconv_size_t font_size; /* Font size */ |
149 | psiconv_bool_t italic; |
244 | psiconv_bool_t italic; /* Use italics? */ |
150 | psiconv_bool_t bold; |
245 | psiconv_bool_t bold; /* Use bold? */ |
151 | psiconv_super_sub_t super_sub; |
246 | psiconv_super_sub_t super_sub; /* Use super/subscript? */ |
152 | psiconv_bool_t underline; |
247 | psiconv_bool_t underline; /* Underline? */ |
153 | psiconv_bool_t strike_out; |
248 | psiconv_bool_t strikethrough; /* Strike through? */ |
154 | psiconv_font font; |
249 | psiconv_font font; /* Character font */ |
155 | } *psiconv_character_layout; |
250 | } *psiconv_character_layout; |
156 | |
251 | |
|
|
252 | /* Paragraph layout. |
|
|
253 | This structure holds all layout information that can be applied on the |
|
|
254 | paragraph level (as opposed to layouts that also apply to single |
|
|
255 | characters). |
|
|
256 | Note that at all times, this structure holds the complete layout |
|
|
257 | information; we do not use incremental layouts, unlike the Psion |
|
|
258 | file format itself. |
|
|
259 | Linespacing is the amount of vertical space between lines. If |
|
|
260 | linespacing_exact is set, this amount is used even if that would make |
|
|
261 | text overlap; if it is not set, a greater distance is used if text would |
|
|
262 | otherwise overlap. |
|
|
263 | Several booleans determine where page breaks may be set. keep_together |
|
|
264 | forbids page breaks in the middle of the paragraph; keep_with_next |
|
|
265 | forbids page breaks between this and the next paragraph. on_next_page |
|
|
266 | forces a pagebreak before the paragraph. no_widow_protection allows |
|
|
267 | one single line of the paragraph on a page, and the rest on another page. |
|
|
268 | Sheet cell text normally does not wrap; wrap_to_fit_cell allows this. */ |
157 | typedef struct psiconv_paragraph_layout |
269 | typedef struct psiconv_paragraph_layout_s |
158 | { |
270 | { |
159 | psiconv_color back_color; |
271 | psiconv_color back_color; /* Background color */ |
160 | psiconv_length_t indent_left; |
272 | psiconv_length_t indent_left; /* Left indentation (except first line) */ |
161 | psiconv_length_t indent_right; |
273 | psiconv_length_t indent_right; /* Right indentation */ |
162 | psiconv_length_t indent_first; |
274 | psiconv_length_t indent_first; /* First line left indentation */ |
163 | psiconv_justify_hor_t justify_hor; |
275 | psiconv_justify_hor_t justify_hor; /* Horizontal justification */ |
164 | psiconv_justify_ver_t justify_ver; |
276 | psiconv_justify_ver_t justify_ver; /* Vertical justification */ |
165 | psiconv_size_t interline; |
277 | psiconv_size_t linespacing; /* The linespacing */ |
166 | psiconv_bool_t interline_exact; |
278 | psiconv_bool_t linespacing_exact; /* Is linespacing exact or the minimum? */ |
167 | psiconv_size_t top_space; |
279 | psiconv_size_t space_above; /* Vertical space before the paragraph */ |
168 | psiconv_size_t bottom_space; |
280 | psiconv_size_t space_below; /* Vertical space after the paragraph */ |
169 | psiconv_bool_t on_one_page; |
281 | psiconv_bool_t keep_together; /* Keep lines on one page? */ |
170 | psiconv_bool_t together_with; /* What the heck is this? */ |
282 | psiconv_bool_t keep_with_next; /* Disallow pagebreak after paragraph? */ |
171 | psiconv_bool_t on_next_page; |
283 | psiconv_bool_t on_next_page; /* Force page break before paragraph? */ |
172 | psiconv_bool_t no_widow_protection; |
284 | psiconv_bool_t no_widow_protection; /* Undo widow protection? */ |
173 | psiconv_length_t border_distance; |
285 | psiconv_bool_t wrap_to_fit_cell; /* Wrap sheet cell text? */ |
174 | psiconv_bullet bullet; |
286 | psiconv_length_t border_distance; /* Distance to borders */ |
175 | psiconv_border left_border; |
287 | psiconv_bullet bullet; /* Bullet information */ |
176 | psiconv_border right_border; |
288 | psiconv_border left_border; /* Left border information */ |
177 | psiconv_border top_border; |
289 | psiconv_border right_border; /* Right border information */ |
178 | psiconv_border bottom_border; |
290 | psiconv_border top_border; /* Top border information */ |
179 | psiconv_all_tabs tabs; |
291 | psiconv_border bottom_border; /* Bottom border information */ |
|
|
292 | psiconv_all_tabs tabs; /* All tab information */ |
180 | } *psiconv_paragraph_layout; |
293 | } *psiconv_paragraph_layout; |
181 | |
294 | |
|
|
295 | /* A Header Section. |
|
|
296 | It contains the three UIDs and the checksum, and the type of file. |
|
|
297 | As the type of file uniquely defines the UIDs, and as the UIDs determine |
|
|
298 | the checksum, this is never included in a regular psiconv_file structure. |
|
|
299 | It can be used to read the header section separately, though. */ |
182 | typedef struct psiconv_header_section |
300 | typedef struct psiconv_header_section_s |
183 | { |
301 | { |
184 | psiconv_u32 uid1; |
302 | psiconv_u32 uid1; |
185 | psiconv_u32 uid2; |
303 | psiconv_u32 uid2; |
186 | psiconv_u32 uid3; |
304 | psiconv_u32 uid3; |
187 | psiconv_u32 checksum; |
305 | psiconv_u32 checksum; |
188 | psiconv_file_type_t file; |
306 | psiconv_file_type_t file; |
189 | } *psiconv_header_section; |
307 | } *psiconv_header_section; |
190 | |
308 | |
|
|
309 | /* A Section Table Section entry. |
|
|
310 | Each entry has a UID and an offset. |
|
|
311 | This is never included in a regular psiconv_file structure, as the |
|
|
312 | information is too low-level. It is used internally, though. */ |
191 | typedef struct psiconv_section_table_entry |
313 | typedef struct psiconv_section_table_entry_s |
192 | { |
314 | { |
193 | psiconv_u32 id; |
315 | psiconv_u32 id; /* Section UID */ |
194 | psiconv_u32 offset; |
316 | psiconv_u32 offset; /* Section offset within the file */ |
195 | } *psiconv_section_table_entry; |
317 | } *psiconv_section_table_entry; |
196 | |
318 | |
|
|
319 | /* A Section Table Section. |
|
|
320 | A list of sections and their offsets. |
|
|
321 | It is simply a list of Section Table Section Entries. |
|
|
322 | This is never included in a regular psiconv_file structure, as the |
|
|
323 | information is too low-level. It is used internally, though. */ |
197 | typedef psiconv_list psiconv_section_table_section; |
324 | typedef psiconv_list psiconv_section_table_section; |
198 | /* Of struct sectiontable_entry */ |
325 | /* Of struct psiconv_sectiontable_entry_s */ |
199 | |
326 | |
|
|
327 | /* An Application ID Section. |
|
|
328 | The type of file. |
|
|
329 | Never included in a regular psiconv_file structure, because it is too |
|
|
330 | low-level. You can always recover it if you know the file type. Used |
|
|
331 | internally. |
|
|
332 | The name should probably be case-insensitive. */ |
200 | typedef struct psiconv_application_id_section |
333 | typedef struct psiconv_application_id_section_s |
201 | { |
334 | { |
202 | psiconv_u32 id; |
335 | psiconv_u32 id; /* File type UID */ |
203 | psiconv_string_t name; |
336 | psiconv_string_t name; /* File type name */ |
204 | } *psiconv_application_id_section; |
337 | } *psiconv_application_id_section; |
205 | |
338 | |
|
|
339 | /* An Object Icon Section. |
|
|
340 | The icon used for an embedded object. */ |
|
|
341 | typedef struct psiconv_object_icon_section_s |
|
|
342 | { |
|
|
343 | psiconv_length_t icon_width; /* Icon width */ |
|
|
344 | psiconv_length_t icon_height; /* Icon height */ |
|
|
345 | psiconv_string_t icon_name; /* Icon name */ |
|
|
346 | } *psiconv_object_icon_section; |
|
|
347 | |
|
|
348 | /* An Object Display Section. |
|
|
349 | How an embedded icon should be displayed. |
|
|
350 | The sizes are computed after cropping or resizing; if the object is shown |
|
|
351 | as an icon, the icon sizes are used here. */ |
|
|
352 | typedef struct psiconv_object_display_section_s |
|
|
353 | { |
|
|
354 | psiconv_bool_t show_icon; /* Show an icon or the whole file? */ |
|
|
355 | psiconv_length_t width; /* Object display width */ |
|
|
356 | psiconv_length_t height; /* Object display height */ |
|
|
357 | } *psiconv_object_display_section; |
|
|
358 | |
|
|
359 | /* An Embedded Object Section. |
|
|
360 | All data about an embedded object. |
|
|
361 | An object is another psiconv_file, which is embedded in the current |
|
|
362 | file. Objects can also be embedded in each other, of course. */ |
|
|
363 | typedef struct psiconv_embedded_object_section_s |
|
|
364 | { |
|
|
365 | psiconv_object_icon_section icon; /* Icon information */ |
|
|
366 | psiconv_object_display_section display; /* Display information */ |
|
|
367 | psiconv_file object; /* The object itself */ |
|
|
368 | } *psiconv_embedded_object_section; |
|
|
369 | |
|
|
370 | /* Inline character-level layout information. |
|
|
371 | Information how some characters should be laid out. |
|
|
372 | Note that, though you can choose specific layouts for an object, this |
|
|
373 | will probably not affect the object's rendering. |
|
|
374 | Usually, object will be NULL, and the object_width and object_height |
|
|
375 | will be ignored. |
|
|
376 | The object sizes are the same as in the Object Display Section, so |
|
|
377 | this information seems to be redundant. */ |
206 | typedef struct psiconv_in_line_layout |
378 | typedef struct psiconv_in_line_layout_s |
207 | { |
379 | { |
208 | psiconv_character_layout layout; |
380 | psiconv_character_layout layout; /* Layout information */ |
209 | int length; |
381 | int length; /* Number of characters */ |
|
|
382 | psiconv_embedded_object_section object; /* Embedded object or NULL */ |
|
|
383 | psiconv_length_t object_width; /* Object display width */ |
|
|
384 | psiconv_length_t object_height; /* Object display height */ |
210 | } *psiconv_in_line_layout; |
385 | } *psiconv_in_line_layout; |
211 | |
386 | |
|
|
387 | /* Inline character information for a whole line. |
|
|
388 | A list of inline character information */ |
212 | typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ |
389 | typedef psiconv_list psiconv_in_line_layouts; |
|
|
390 | /* of struct psiconv_in_line_layout_s */ |
213 | |
391 | |
214 | typedef enum psiconv_replacement_type |
392 | /* What to replace where in text. Not yet implemented! |
215 | { |
393 | (not yet implemented!) */ |
216 | psiconv_replace_time, |
|
|
217 | psiconv_replace_date, |
|
|
218 | psiconv_replace_pagenr, |
|
|
219 | psiconv_replace_nr_of_pages, |
|
|
220 | psiconv_replace_filename |
|
|
221 | } psiconv_replacement_type_t; |
|
|
222 | |
|
|
223 | typedef struct psiconv_replacement |
394 | typedef struct psiconv_replacement_s |
224 | { |
395 | { |
225 | int offset; |
396 | int offset; /* Offset in text */ |
226 | int cur_len; |
397 | int cur_len; /* Length of text to replace */ |
227 | psiconv_replacement_type_t type; |
398 | psiconv_replacement_type_t type; /* Kind of replacement */ |
228 | } *psiconv_replacement; |
399 | } *psiconv_replacement; |
229 | |
400 | |
|
|
401 | /* A list of replacements */ |
230 | typedef psiconv_list psiconv_replacements; /* of struct replacement */ |
402 | typedef psiconv_list psiconv_replacements; /* of struct psiconv_replacement_s */ |
231 | |
403 | |
|
|
404 | /* A paragraph of text. |
|
|
405 | Layout and actual paragraph text are combined here, even though |
|
|
406 | they are seperated in the Psion file format. |
|
|
407 | The base style is referred to, but the base_character and |
|
|
408 | base_paragraph have all style settings already incorporated. |
|
|
409 | The base style can be found using the psiconv_get_style function. |
|
|
410 | The in_lines are either an empty list, or they should apply to exactly |
|
|
411 | the number of characters in this paragraph */ |
232 | typedef struct psiconv_paragraph |
412 | typedef struct psiconv_paragraph_s |
233 | { |
413 | { |
234 | char *text; |
414 | psiconv_string_t text; /* Paragraph text */ |
235 | psiconv_character_layout base_character; |
415 | psiconv_character_layout base_character; /* Base character layout */ |
236 | psiconv_paragraph_layout base_paragraph; |
416 | psiconv_paragraph_layout base_paragraph; /* Base paragraph layout */ |
237 | psiconv_s16 base_style; |
417 | psiconv_s16 base_style; /* Paragraph style */ |
238 | psiconv_in_line_layouts in_lines; |
418 | psiconv_in_line_layouts in_lines; /* In-paragraph layout */ |
239 | psiconv_replacements replacements; |
419 | psiconv_replacements replacements; /* Replacements like the date */ |
240 | } *psiconv_paragraph; |
420 | } *psiconv_paragraph; |
241 | |
421 | |
|
|
422 | /* A collection of text paragraphs */ |
242 | typedef psiconv_list psiconv_text_and_layout; /* Of struct paragraphs */ |
423 | typedef psiconv_list psiconv_text_and_layout; |
|
|
424 | /* Of struct psiconv_paragraph_s */ |
243 | |
425 | |
|
|
426 | /* A TextEd Section. |
|
|
427 | Text and simple layout, without styles. */ |
244 | typedef struct psiconv_texted_section |
428 | typedef struct psiconv_texted_section_s |
245 | { |
429 | { |
246 | psiconv_text_and_layout paragraphs; |
430 | psiconv_text_and_layout paragraphs; |
247 | } *psiconv_texted_section; |
431 | } *psiconv_texted_section; |
248 | |
432 | |
|
|
433 | /* A Page Header. |
|
|
434 | All information about a page header or footer. |
|
|
435 | An explicit base paragraph and character layout is found; this is used |
|
|
436 | as a sort of base style, on which all further formatting is based */ |
249 | typedef struct psiconv_page_header |
437 | typedef struct psiconv_page_header_s |
250 | { |
438 | { |
251 | psiconv_bool_t on_first_page; |
439 | psiconv_bool_t on_first_page; /* Display on first page? */ |
252 | psiconv_paragraph_layout base_paragraph_layout; |
440 | psiconv_paragraph_layout base_paragraph_layout; /* Base paragraph layout */ |
253 | psiconv_character_layout base_character_layout; |
441 | psiconv_character_layout base_character_layout; /* Base character layout */ |
254 | psiconv_texted_section text; |
442 | psiconv_texted_section text; /* The actual text */ |
255 | } *psiconv_page_header; |
443 | } *psiconv_page_header; |
256 | |
444 | |
|
|
445 | /* A Page Layout Section |
|
|
446 | All information about the layout of a page. |
|
|
447 | Margins, page size, the header, the footer and page numbers */ |
257 | typedef struct psiconv_page_layout_section |
448 | typedef struct psiconv_page_layout_section_s |
258 | { |
449 | { |
259 | psiconv_u32 first_page_nr; |
450 | psiconv_u32 first_page_nr; /* Page numbers start counting here */ |
260 | psiconv_length_t header_dist; |
451 | psiconv_length_t header_dist; /* Distance of header to text */ |
261 | psiconv_length_t footer_dist; |
452 | psiconv_length_t footer_dist; /* Distance of footer to text */ |
262 | psiconv_length_t left_margin; |
453 | psiconv_length_t left_margin; /* Left margin */ |
263 | psiconv_length_t right_margin; |
454 | psiconv_length_t right_margin; /* Right margin */ |
264 | psiconv_length_t top_margin; |
455 | psiconv_length_t top_margin; /* Top margin */ |
265 | psiconv_length_t bottom_margin; |
456 | psiconv_length_t bottom_margin; /* Bottom margin */ |
266 | psiconv_length_t page_width; |
457 | psiconv_length_t page_width; /* Page width */ |
267 | psiconv_length_t page_height; |
458 | psiconv_length_t page_height; /* Page height */ |
268 | psiconv_page_header header; |
459 | psiconv_page_header header; /* Header information */ |
269 | psiconv_page_header footer; |
460 | psiconv_page_header footer; /* Footer information */ |
|
|
461 | psiconv_bool_t landscape; /* Landscape orientation? */ |
270 | } * psiconv_page_layout_section; |
462 | } * psiconv_page_layout_section; |
271 | |
463 | |
|
|
464 | /* A Word Status Section |
|
|
465 | Settings of the Word program. |
|
|
466 | Several whitespace and related characters can be explicitely shown. |
|
|
467 | Embedded pictures and graphs can be iconized or displayed full. |
|
|
468 | Toolbars can be shown or hidden. |
|
|
469 | Long lines can be wrapped, or you have to use scrolling. |
|
|
470 | The cursor position is the character number of the text. |
|
|
471 | Zoom level: 1000 is "normal" */ |
272 | typedef struct psiconv_word_status_section |
472 | typedef struct psiconv_word_status_section_s |
273 | { |
473 | { |
274 | psiconv_bool_t show_tabs; |
474 | psiconv_bool_t show_tabs; /* Show tabs? */ |
275 | psiconv_bool_t show_spaces; |
475 | psiconv_bool_t show_spaces; /* Show spaces? */ |
276 | psiconv_bool_t show_paragraph_ends; |
476 | psiconv_bool_t show_paragraph_ends; /* Show paragraph ends? */ |
277 | psiconv_bool_t show_line_breaks; |
477 | psiconv_bool_t show_line_breaks; /* Show line breaks */ |
278 | psiconv_bool_t show_hard_minus; |
478 | psiconv_bool_t show_hard_minus; /* Show hard dashes? */ |
279 | psiconv_bool_t show_hard_space; |
479 | psiconv_bool_t show_hard_space; /* Show hard spaces? */ |
280 | psiconv_bool_t show_full_pictures; |
480 | psiconv_bool_t show_full_pictures; /* Show embedded pictures (or iconize)? */ |
281 | psiconv_bool_t show_full_graphs; |
481 | psiconv_bool_t show_full_graphs; /* Show embedded graphs (or iconize)? */ |
282 | psiconv_bool_t show_top_toolbar; |
482 | psiconv_bool_t show_top_toolbar; /* Show top toolbar? */ |
283 | psiconv_bool_t show_side_toolbar; |
483 | psiconv_bool_t show_side_toolbar; /* Show side toolbar? */ |
284 | psiconv_bool_t fit_lines_to_screen; |
484 | psiconv_bool_t fit_lines_to_screen; /* Wrap lines? */ |
285 | psiconv_u32 cursor_position; |
485 | psiconv_u32 cursor_position; /* Cursor position (character number) */ |
286 | psiconv_u32 display_size; |
486 | psiconv_u32 display_size; /* Zooming level */ |
287 | } *psiconv_word_status_section; |
487 | } *psiconv_word_status_section; |
288 | |
488 | |
|
|
489 | /* A Word Style. |
|
|
490 | All information about a single Style. |
|
|
491 | A builtin style may not be changed in the Word program. |
|
|
492 | Outline level is zero if unused. |
|
|
493 | The name may be NULL for the normal style! */ |
289 | typedef struct psiconv_word_style |
494 | typedef struct psiconv_word_style_s |
290 | { |
495 | { |
291 | psiconv_character_layout character; |
496 | psiconv_character_layout character; /* character-level layout */ |
292 | psiconv_paragraph_layout paragraph; |
497 | psiconv_paragraph_layout paragraph; /* paragraph-level layout */ |
293 | psiconv_u8 hotkey; |
498 | psiconv_ucs2 hotkey; /* The hotkey */ |
294 | psiconv_string_t name; |
499 | psiconv_string_t name; /* Style name */ |
295 | psiconv_bool_t built_in; |
500 | psiconv_bool_t built_in; /* Builtin style? */ |
|
|
501 | psiconv_u32 outline_level; /* Outline level */ |
296 | } *psiconv_word_style; |
502 | } *psiconv_word_style; |
297 | |
503 | |
|
|
504 | /* A list of Word Styles */ |
298 | typedef psiconv_list psiconv_word_style_list; /* Of style */ |
505 | typedef psiconv_list psiconv_word_style_list; |
|
|
506 | /* Of struct psiconv_word_style_s */ |
299 | |
507 | |
|
|
508 | /* A Word Styles Section |
|
|
509 | All information about styles. |
|
|
510 | Note that the name of the normal style is NULL! */ |
300 | typedef struct psiconv_word_styles_section |
511 | typedef struct psiconv_word_styles_section_s |
301 | { |
512 | { |
302 | psiconv_word_style normal; |
513 | psiconv_word_style normal; /* The normal (unspecified) style */ |
303 | psiconv_word_style_list styles; |
514 | psiconv_word_style_list styles; /* All other defined styles */ |
304 | } *psiconv_word_styles_section; |
515 | } *psiconv_word_styles_section; |
305 | |
516 | |
|
|
517 | /* A Word File |
|
|
518 | All information about a Word File. |
|
|
519 | Note that a section can be NULL if it is not present. */ |
306 | typedef struct psiconv_word_f { |
520 | typedef struct psiconv_word_f_s |
|
|
521 | { |
307 | psiconv_page_layout_section page_sec; |
522 | psiconv_page_layout_section page_sec; /* Page layout */ |
308 | psiconv_text_and_layout paragraphs; |
523 | psiconv_text_and_layout paragraphs; /* Text and text layout */ |
309 | psiconv_word_status_section status_sec; |
524 | psiconv_word_status_section status_sec; /* Internal Word program settings */ |
310 | psiconv_word_styles_section styles_sec; |
525 | psiconv_word_styles_section styles_sec; /* Styles */ |
311 | } *psiconv_word_f; |
526 | } *psiconv_word_f; |
312 | |
527 | |
|
|
528 | /* A TextEd File |
|
|
529 | All information about a TextEd File. |
|
|
530 | Note that a section can be NULL if it is not present. */ |
313 | typedef struct psiconv_texted_f { |
531 | typedef struct psiconv_texted_f_s |
|
|
532 | { |
314 | psiconv_page_layout_section page_sec; |
533 | psiconv_page_layout_section page_sec; /* Page layout */ |
315 | psiconv_texted_section texted_sec; |
534 | psiconv_texted_section texted_sec; /* Text and text layout */ |
316 | } *psiconv_texted_f; |
535 | } *psiconv_texted_f; |
317 | |
536 | |
|
|
537 | /* A Jumptable Section. |
|
|
538 | A simple list of offsets. |
|
|
539 | This is never included in a regular psiconv_file structure, as the |
|
|
540 | information is too low-level. It is used internally, though. */ |
318 | typedef psiconv_list psiconv_mbm_jumptable_section; /* of psiconv_u32 */ |
541 | typedef psiconv_list psiconv_jumptable_section; /* of psiconv_u32 */ |
319 | |
542 | |
|
|
543 | /* A Paint Data Section |
|
|
544 | A collection of pixels. |
320 | /* Normalized values [0..1] for each component |
545 | Normalized values [0..1] for each color component. |
321 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
546 | Origin is (x,y)=(0,0), to get pixel at (X,Y) use index [Y*xsize+X] */ |
322 | typedef struct psiconv_paint_data_section { |
547 | typedef struct psiconv_paint_data_section_s |
323 | psiconv_u32 xsize; |
548 | { |
324 | psiconv_u32 ysize; |
549 | psiconv_u32 xsize; /* Number of pixels in a row */ |
325 | float *red; |
550 | psiconv_u32 ysize; /* Number of pixels in a column */ |
|
|
551 | psiconv_length_t pic_xsize; /* 0 if not specified */ |
|
|
552 | psiconv_length_t pic_ysize; /* 0 if not specified */ |
|
|
553 | float *red; |
326 | float *green; |
554 | float *green; |
327 | float *blue; |
555 | float *blue; |
328 | } *psiconv_paint_data_section; |
556 | } *psiconv_paint_data_section; |
329 | |
557 | |
|
|
558 | /* A collection of Paint Data Sections */ |
330 | typedef psiconv_list psiconv_pictures; |
559 | typedef psiconv_list psiconv_pictures; |
331 | /* of struct psiconv_paint_data_section */ |
560 | /* of struct psiconv_paint_data_section_s */ |
332 | |
561 | |
|
|
562 | /* A MBM file |
|
|
563 | All information about a MBM file |
|
|
564 | MBM files contain one or more pictures. */ |
333 | typedef struct psiconv_mbm_f { |
565 | typedef struct psiconv_mbm_f_s |
|
|
566 | { |
334 | psiconv_pictures sections; |
567 | psiconv_pictures sections; |
335 | } *psiconv_mbm_f; |
568 | } *psiconv_mbm_f; |
336 | |
569 | |
337 | /* This is a little intricated. A picture may be embedded in a larger form. |
570 | /* Read the Psiconv file format documentation for a complete discription. |
338 | A form is empty, except for the picture. The form has size form_{x,y}size, |
571 | Basic idea: a picture has a certain display size. Within it, the pixel |
339 | and the picture is at offset picture_{x,y}_offset within the form. The |
572 | data begins at a certain offset. Around it, there is an empty form. |
340 | picture itself has size picture_{x,y}size. |
573 | The first eight values are before magnification and cuts. |
341 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
574 | Cuts are always <= 1.0; a cut of 0.0 cuts nothing away, a cut of 1.0 |
342 | cuts everything away. */ |
575 | cuts everything away. */ |
343 | typedef struct psiconv_sketch_section { |
576 | typedef struct psiconv_sketch_section_s |
|
|
577 | { |
|
|
578 | psiconv_u16 displayed_xsize; |
|
|
579 | psiconv_u16 displayed_ysize; |
|
|
580 | psiconv_u16 picture_data_x_offset; |
|
|
581 | psiconv_u16 picture_data_y_offset; |
344 | psiconv_u16 form_xsize; |
582 | psiconv_u16 form_xsize; |
345 | psiconv_u16 form_ysize; |
583 | psiconv_u16 form_ysize; |
346 | psiconv_u16 picture_x_offset; |
584 | psiconv_u16 displayed_size_x_offset; |
347 | psiconv_u16 picture_y_offset; |
585 | psiconv_u16 displayed_size_y_offset; |
348 | psiconv_u16 picture_xsize; |
|
|
349 | psiconv_u16 picture_ysize; |
|
|
350 | float magnification_x; /* computed relative to first six values */ |
586 | float magnification_x; /* computed relative to first eight values */ |
351 | float magnification_y; /* computed relative to first six values */ |
587 | float magnification_y; /* computed relative to first eight values */ |
352 | float cut_left; /* computed relative to first six values */ |
588 | float cut_left; /* computed relative to first eight values */ |
353 | float cut_right; /* computed relative to first six values */ |
589 | float cut_right; /* computed relative to first eight values */ |
354 | float cut_top; /* computed relative to first six values */ |
590 | float cut_top; /* computed relative to first eight values */ |
355 | float cut_bottom; /* computed relative to first six values */ |
591 | float cut_bottom; /* computed relative to first eight values */ |
356 | psiconv_paint_data_section picture; |
592 | psiconv_paint_data_section picture; |
357 | } *psiconv_sketch_section; |
593 | } *psiconv_sketch_section; |
358 | |
594 | |
359 | typedef struct psiconv_sketch_f { |
595 | typedef struct psiconv_sketch_f_s |
|
|
596 | { |
360 | psiconv_sketch_section sketch_sec; |
597 | psiconv_sketch_section sketch_sec; |
361 | } *psiconv_sketch_f; |
598 | } *psiconv_sketch_f; |
362 | |
599 | |
|
|
600 | typedef struct psiconv_clipart_section_s |
|
|
601 | { |
|
|
602 | /* Perhaps later on some currently unknown stuff. */ |
|
|
603 | psiconv_paint_data_section picture; |
|
|
604 | } * psiconv_clipart_section; |
|
|
605 | |
|
|
606 | typedef psiconv_list psiconv_cliparts; /* of struct psiconv_clipart_section_s */ |
|
|
607 | |
|
|
608 | typedef struct psiconv_clipart_f_s |
|
|
609 | { |
|
|
610 | psiconv_cliparts sections; |
|
|
611 | } *psiconv_clipart_f; |
|
|
612 | |
|
|
613 | typedef struct psiconv_sheet_ref_s |
|
|
614 | { |
|
|
615 | psiconv_s16 offset; |
|
|
616 | psiconv_bool_t absolute; |
|
|
617 | } psiconv_sheet_ref_t; |
|
|
618 | |
|
|
619 | typedef struct psiconv_sheet_cell_reference_s |
|
|
620 | { |
|
|
621 | psiconv_sheet_ref_t row; |
|
|
622 | psiconv_sheet_ref_t column; |
|
|
623 | } psiconv_sheet_cell_reference_t; |
|
|
624 | |
|
|
625 | typedef struct psiconv_sheet_cell_block_s |
|
|
626 | { |
|
|
627 | psiconv_sheet_cell_reference_t first; |
|
|
628 | psiconv_sheet_cell_reference_t last; |
|
|
629 | } psiconv_sheet_cell_block_t; |
|
|
630 | |
|
|
631 | typedef enum psiconv_cell_type |
|
|
632 | { |
|
|
633 | psiconv_cell_blank, |
|
|
634 | psiconv_cell_int, |
|
|
635 | psiconv_cell_bool, |
|
|
636 | psiconv_cell_error, |
|
|
637 | psiconv_cell_float, |
|
|
638 | psiconv_cell_string |
|
|
639 | } psiconv_cell_type_t; |
|
|
640 | |
|
|
641 | typedef enum psiconv_sheet_errorcode |
|
|
642 | { |
|
|
643 | psiconv_sheet_error_none, |
|
|
644 | psiconv_sheet_error_null, |
|
|
645 | psiconv_sheet_error_divzero, |
|
|
646 | psiconv_sheet_error_value, |
|
|
647 | psiconv_sheet_error_reference, |
|
|
648 | psiconv_sheet_error_name, |
|
|
649 | psiconv_sheet_error_number, |
|
|
650 | psiconv_sheet_error_notavail |
|
|
651 | } psiconv_sheet_errorcode_t; |
|
|
652 | |
|
|
653 | typedef enum psiconv_sheet_numberformat_code |
|
|
654 | { |
|
|
655 | psiconv_numberformat_general, |
|
|
656 | psiconv_numberformat_fixeddecimal, |
|
|
657 | psiconv_numberformat_scientific, |
|
|
658 | psiconv_numberformat_currency, |
|
|
659 | psiconv_numberformat_percent, |
|
|
660 | psiconv_numberformat_triads, |
|
|
661 | psiconv_numberformat_boolean, |
|
|
662 | psiconv_numberformat_text, |
|
|
663 | psiconv_numberformat_date_dmm, |
|
|
664 | psiconv_numberformat_date_mmd, |
|
|
665 | psiconv_numberformat_date_ddmmyy, |
|
|
666 | psiconv_numberformat_date_mmddyy, |
|
|
667 | psiconv_numberformat_date_yymmdd, |
|
|
668 | psiconv_numberformat_date_dmmm, |
|
|
669 | psiconv_numberformat_date_dmmmyy, |
|
|
670 | psiconv_numberformat_date_ddmmmyy, |
|
|
671 | psiconv_numberformat_date_mmm, |
|
|
672 | psiconv_numberformat_date_monthname, |
|
|
673 | psiconv_numberformat_date_mmmyy, |
|
|
674 | psiconv_numberformat_date_monthnameyy, |
|
|
675 | psiconv_numberformat_date_monthnamedyyyy, |
|
|
676 | psiconv_numberformat_datetime_ddmmyyyyhhii, |
|
|
677 | psiconv_numberformat_datetime_ddmmyyyyHHii, |
|
|
678 | psiconv_numberformat_datetime_mmddyyyyhhii, |
|
|
679 | psiconv_numberformat_datetime_mmddyyyyHHii, |
|
|
680 | psiconv_numberformat_datetime_yyyymmddhhii, |
|
|
681 | psiconv_numberformat_datetime_yyyymmddHHii, |
|
|
682 | psiconv_numberformat_time_hhii, |
|
|
683 | psiconv_numberformat_time_hhiiss, |
|
|
684 | psiconv_numberformat_time_HHii, |
|
|
685 | psiconv_numberformat_time_HHiiss |
|
|
686 | } psiconv_sheet_numberformat_code_t; |
|
|
687 | |
|
|
688 | typedef struct psiconv_sheet_numberformat_s |
|
|
689 | { |
|
|
690 | psiconv_sheet_numberformat_code_t code; |
|
|
691 | psiconv_u8 decimal; |
|
|
692 | } *psiconv_sheet_numberformat; |
|
|
693 | |
|
|
694 | typedef struct psiconv_sheet_cell_layout_s |
|
|
695 | { |
|
|
696 | psiconv_character_layout character; |
|
|
697 | psiconv_paragraph_layout paragraph; |
|
|
698 | psiconv_sheet_numberformat numberformat; |
|
|
699 | } * psiconv_sheet_cell_layout; |
|
|
700 | |
|
|
701 | typedef struct psiconv_sheet_cell_s |
|
|
702 | { |
|
|
703 | psiconv_u16 column; |
|
|
704 | psiconv_u16 row; |
|
|
705 | psiconv_cell_type_t type; |
|
|
706 | union { |
|
|
707 | psiconv_u32 dat_int; |
|
|
708 | double dat_float; |
|
|
709 | psiconv_string_t dat_string; |
|
|
710 | psiconv_bool_t dat_bool; |
|
|
711 | psiconv_sheet_errorcode_t dat_error; |
|
|
712 | } data; |
|
|
713 | psiconv_sheet_cell_layout layout; |
|
|
714 | psiconv_bool_t calculated; |
|
|
715 | psiconv_u32 ref_formula; |
|
|
716 | } *psiconv_sheet_cell; |
|
|
717 | |
|
|
718 | typedef psiconv_list psiconv_sheet_cell_list; |
|
|
719 | /* Of struct psiconv_sheet_cell_s */ |
|
|
720 | |
|
|
721 | typedef struct psiconv_sheet_status_section_s |
|
|
722 | { |
|
|
723 | psiconv_bool_t show_graph; |
|
|
724 | psiconv_u32 cursor_row; |
|
|
725 | psiconv_u32 cursor_column; |
|
|
726 | psiconv_bool_t show_top_sheet_toolbar; |
|
|
727 | psiconv_bool_t show_side_sheet_toolbar; |
|
|
728 | psiconv_bool_t show_top_graph_toolbar; |
|
|
729 | psiconv_bool_t show_side_graph_toolbar; |
|
|
730 | psiconv_u32 sheet_display_size; |
|
|
731 | psiconv_u32 graph_display_size; |
|
|
732 | psiconv_triple_t show_horizontal_scrollbar; |
|
|
733 | psiconv_triple_t show_vertical_scrollbar; |
|
|
734 | } *psiconv_sheet_status_section; |
|
|
735 | |
|
|
736 | typedef enum psiconv_formula_type |
|
|
737 | { |
|
|
738 | psiconv_formula_unknown, |
|
|
739 | psiconv_formula_op_lt, |
|
|
740 | psiconv_formula_op_le, |
|
|
741 | psiconv_formula_op_gt, |
|
|
742 | psiconv_formula_op_ge, |
|
|
743 | psiconv_formula_op_ne, |
|
|
744 | psiconv_formula_op_eq, |
|
|
745 | psiconv_formula_op_add, |
|
|
746 | psiconv_formula_op_sub, |
|
|
747 | psiconv_formula_op_mul, |
|
|
748 | psiconv_formula_op_div, |
|
|
749 | psiconv_formula_op_pow, |
|
|
750 | psiconv_formula_op_pos, |
|
|
751 | psiconv_formula_op_neg, |
|
|
752 | psiconv_formula_op_not, |
|
|
753 | psiconv_formula_op_and, |
|
|
754 | psiconv_formula_op_or, |
|
|
755 | psiconv_formula_op_con, |
|
|
756 | psiconv_formula_op_bra, |
|
|
757 | psiconv_formula_mark_eof, |
|
|
758 | psiconv_formula_dat_float, |
|
|
759 | psiconv_formula_dat_int, |
|
|
760 | psiconv_formula_dat_var, |
|
|
761 | psiconv_formula_dat_string, |
|
|
762 | psiconv_formula_dat_cellref, |
|
|
763 | psiconv_formula_dat_cellblock, |
|
|
764 | psiconv_formula_dat_vcellblock, |
|
|
765 | psiconv_formula_mark_opsep, |
|
|
766 | psiconv_formula_mark_opend, |
|
|
767 | psiconv_formula_fun_false, |
|
|
768 | psiconv_formula_fun_if, |
|
|
769 | psiconv_formula_fun_true, |
|
|
770 | psiconv_formula_fun_cell, |
|
|
771 | psiconv_formula_fun_errortype, |
|
|
772 | psiconv_formula_fun_isblank, |
|
|
773 | psiconv_formula_fun_iserr, |
|
|
774 | psiconv_formula_fun_iserror, |
|
|
775 | psiconv_formula_fun_islogical, |
|
|
776 | psiconv_formula_fun_isna, |
|
|
777 | psiconv_formula_fun_isnontext, |
|
|
778 | psiconv_formula_fun_isnumber, |
|
|
779 | psiconv_formula_fun_istext, |
|
|
780 | psiconv_formula_fun_n, |
|
|
781 | psiconv_formula_fun_type, |
|
|
782 | psiconv_formula_fun_address, |
|
|
783 | psiconv_formula_fun_column, |
|
|
784 | psiconv_formula_fun_columns, |
|
|
785 | psiconv_formula_fun_hlookup, |
|
|
786 | psiconv_formula_fun_index, |
|
|
787 | psiconv_formula_fun_indirect, |
|
|
788 | psiconv_formula_fun_lookup, |
|
|
789 | psiconv_formula_fun_offset, |
|
|
790 | psiconv_formula_fun_row, |
|
|
791 | psiconv_formula_fun_rows, |
|
|
792 | psiconv_formula_fun_vlookup, |
|
|
793 | psiconv_formula_fun_char, |
|
|
794 | psiconv_formula_fun_code, |
|
|
795 | psiconv_formula_fun_exact, |
|
|
796 | psiconv_formula_fun_find, |
|
|
797 | psiconv_formula_fun_left, |
|
|
798 | psiconv_formula_fun_len, |
|
|
799 | psiconv_formula_fun_lower, |
|
|
800 | psiconv_formula_fun_mid, |
|
|
801 | psiconv_formula_fun_proper, |
|
|
802 | psiconv_formula_fun_replace, |
|
|
803 | psiconv_formula_fun_rept, |
|
|
804 | psiconv_formula_fun_right, |
|
|
805 | psiconv_formula_fun_string, |
|
|
806 | psiconv_formula_fun_t, |
|
|
807 | psiconv_formula_fun_trim, |
|
|
808 | psiconv_formula_fun_upper, |
|
|
809 | psiconv_formula_fun_value, |
|
|
810 | psiconv_formula_fun_date, |
|
|
811 | psiconv_formula_fun_datevalue, |
|
|
812 | psiconv_formula_fun_day, |
|
|
813 | psiconv_formula_fun_hour, |
|
|
814 | psiconv_formula_fun_minute, |
|
|
815 | psiconv_formula_fun_month, |
|
|
816 | psiconv_formula_fun_now, |
|
|
817 | psiconv_formula_fun_second, |
|
|
818 | psiconv_formula_fun_today, |
|
|
819 | psiconv_formula_fun_time, |
|
|
820 | psiconv_formula_fun_timevalue, |
|
|
821 | psiconv_formula_fun_year, |
|
|
822 | psiconv_formula_fun_abs, |
|
|
823 | psiconv_formula_fun_acos, |
|
|
824 | psiconv_formula_fun_asin, |
|
|
825 | psiconv_formula_fun_atan, |
|
|
826 | psiconv_formula_fun_atan2, |
|
|
827 | psiconv_formula_fun_cos, |
|
|
828 | psiconv_formula_fun_degrees, |
|
|
829 | psiconv_formula_fun_exp, |
|
|
830 | psiconv_formula_fun_fact, |
|
|
831 | psiconv_formula_fun_int, |
|
|
832 | psiconv_formula_fun_ln, |
|
|
833 | psiconv_formula_fun_log10, |
|
|
834 | psiconv_formula_fun_mod, |
|
|
835 | psiconv_formula_fun_pi, |
|
|
836 | psiconv_formula_fun_radians, |
|
|
837 | psiconv_formula_fun_rand, |
|
|
838 | psiconv_formula_fun_round, |
|
|
839 | psiconv_formula_fun_sign, |
|
|
840 | psiconv_formula_fun_sin, |
|
|
841 | psiconv_formula_fun_sqrt, |
|
|
842 | psiconv_formula_fun_sumproduct, |
|
|
843 | psiconv_formula_fun_tan, |
|
|
844 | psiconv_formula_fun_trunc, |
|
|
845 | psiconv_formula_fun_cterm, |
|
|
846 | psiconv_formula_fun_ddb, |
|
|
847 | psiconv_formula_fun_fv, |
|
|
848 | psiconv_formula_fun_irr, |
|
|
849 | psiconv_formula_fun_npv, |
|
|
850 | psiconv_formula_fun_pmt, |
|
|
851 | psiconv_formula_fun_pv, |
|
|
852 | psiconv_formula_fun_rate, |
|
|
853 | psiconv_formula_fun_sln, |
|
|
854 | psiconv_formula_fun_syd, |
|
|
855 | psiconv_formula_fun_term, |
|
|
856 | psiconv_formula_fun_combin, |
|
|
857 | psiconv_formula_fun_permut, |
|
|
858 | psiconv_formula_vfn_average, |
|
|
859 | psiconv_formula_vfn_choose, |
|
|
860 | psiconv_formula_vfn_count, |
|
|
861 | psiconv_formula_vfn_counta, |
|
|
862 | psiconv_formula_vfn_countblank, |
|
|
863 | psiconv_formula_vfn_max, |
|
|
864 | psiconv_formula_vfn_min, |
|
|
865 | psiconv_formula_vfn_product, |
|
|
866 | psiconv_formula_vfn_stdevp, |
|
|
867 | psiconv_formula_vfn_stdev, |
|
|
868 | psiconv_formula_vfn_sum, |
|
|
869 | psiconv_formula_vfn_sumsq, |
|
|
870 | psiconv_formula_vfn_varp, |
|
|
871 | psiconv_formula_vfn_var |
|
|
872 | } psiconv_formula_type_t; |
|
|
873 | |
|
|
874 | typedef psiconv_list psiconv_formula_list; /* Of struct psiconv_formula_s */ |
|
|
875 | |
363 | typedef struct psiconv_file { |
876 | typedef struct psiconv_formula_s |
|
|
877 | { |
|
|
878 | psiconv_formula_type_t type; |
|
|
879 | union { |
|
|
880 | psiconv_u32 dat_int; |
|
|
881 | double dat_float; |
|
|
882 | psiconv_string_t dat_string; |
|
|
883 | psiconv_sheet_cell_reference_t dat_cellref; |
|
|
884 | psiconv_sheet_cell_block_t dat_cellblock; |
|
|
885 | psiconv_formula_list fun_operands; |
|
|
886 | psiconv_u32 dat_variable; |
|
|
887 | } data; |
|
|
888 | } *psiconv_formula; |
|
|
889 | |
|
|
890 | typedef struct psiconv_sheet_line_s |
|
|
891 | { |
|
|
892 | psiconv_u32 position; |
|
|
893 | psiconv_sheet_cell_layout layout; |
|
|
894 | } *psiconv_sheet_line; |
|
|
895 | |
|
|
896 | typedef psiconv_list psiconv_sheet_line_list; |
|
|
897 | /* Of struct psiconv_sheet_line_s */ |
|
|
898 | |
|
|
899 | typedef struct psiconv_sheet_grid_size_s |
|
|
900 | { |
|
|
901 | psiconv_u32 line_number; |
|
|
902 | psiconv_length_t size; |
|
|
903 | } *psiconv_sheet_grid_size; |
|
|
904 | |
|
|
905 | typedef psiconv_list psiconv_sheet_grid_size_list; |
|
|
906 | /* Of struct psiconv_sheet_grid_size_s */ |
|
|
907 | |
|
|
908 | typedef psiconv_list psiconv_sheet_grid_break_list; /* of psiconv_u32 */ |
|
|
909 | |
|
|
910 | typedef struct psiconv_sheet_grid_section_s |
|
|
911 | { |
|
|
912 | psiconv_bool_t show_column_titles; |
|
|
913 | psiconv_bool_t show_row_titles; |
|
|
914 | psiconv_bool_t show_vertical_grid; |
|
|
915 | psiconv_bool_t show_horizontal_grid; |
|
|
916 | psiconv_bool_t freeze_rows; |
|
|
917 | psiconv_bool_t freeze_columns; |
|
|
918 | psiconv_u32 frozen_rows; |
|
|
919 | psiconv_u32 frozen_columns; |
|
|
920 | psiconv_u32 first_unfrozen_row_displayed; |
|
|
921 | psiconv_u32 first_unfrozen_column_displayed; |
|
|
922 | psiconv_bool_t show_page_breaks; |
|
|
923 | psiconv_u32 first_row; |
|
|
924 | psiconv_u32 first_column; |
|
|
925 | psiconv_u32 last_row; |
|
|
926 | psiconv_u32 last_column; |
|
|
927 | psiconv_length_t default_row_height; |
|
|
928 | psiconv_length_t default_column_width; |
|
|
929 | psiconv_sheet_grid_size_list row_heights; |
|
|
930 | psiconv_sheet_grid_size_list column_heights; |
|
|
931 | psiconv_sheet_grid_break_list row_page_breaks; |
|
|
932 | psiconv_sheet_grid_break_list column_page_breaks; |
|
|
933 | } *psiconv_sheet_grid_section; |
|
|
934 | |
|
|
935 | typedef struct psiconv_sheet_worksheet_s |
|
|
936 | { |
|
|
937 | psiconv_sheet_cell_layout default_layout; |
|
|
938 | psiconv_sheet_cell_list cells; |
|
|
939 | psiconv_bool_t show_zeros; |
|
|
940 | psiconv_sheet_line_list row_default_layouts; |
|
|
941 | psiconv_sheet_line_list col_default_layouts; |
|
|
942 | psiconv_sheet_grid_section grid; |
|
|
943 | } *psiconv_sheet_worksheet; |
|
|
944 | |
|
|
945 | typedef psiconv_list psiconv_sheet_worksheet_list; |
|
|
946 | /* of struct psiconv_sheet_worksheet_s */ |
|
|
947 | |
|
|
948 | typedef enum psiconv_variable_type |
|
|
949 | { |
|
|
950 | psiconv_var_int, |
|
|
951 | psiconv_var_float, |
|
|
952 | psiconv_var_string, |
|
|
953 | psiconv_var_cellref, |
|
|
954 | psiconv_var_cellblock |
|
|
955 | } psiconv_variable_type_t; |
|
|
956 | |
|
|
957 | typedef struct psiconv_sheet_variable_s |
|
|
958 | { |
|
|
959 | psiconv_u32 number; |
|
|
960 | psiconv_string_t name; |
|
|
961 | psiconv_variable_type_t type; |
|
|
962 | union { |
|
|
963 | psiconv_s32 dat_int; |
|
|
964 | double dat_float; |
|
|
965 | psiconv_string_t dat_string; |
|
|
966 | psiconv_sheet_cell_reference_t dat_cellref; |
|
|
967 | psiconv_sheet_cell_block_t dat_cellblock; |
|
|
968 | } data; |
|
|
969 | } *psiconv_sheet_variable; |
|
|
970 | |
|
|
971 | typedef psiconv_list psiconv_sheet_variable_list; |
|
|
972 | /* of struct psiconv_sheet_variable_s */ |
|
|
973 | |
|
|
974 | typedef struct psiconv_sheet_name_section_s |
|
|
975 | { |
|
|
976 | psiconv_string_t name; |
|
|
977 | } *psiconv_sheet_name_section; |
|
|
978 | |
|
|
979 | typedef struct psiconv_sheet_info_section_s |
|
|
980 | { |
|
|
981 | psiconv_bool_t auto_recalc; |
|
|
982 | } *psiconv_sheet_info_section; |
|
|
983 | |
|
|
984 | typedef struct psiconv_sheet_workbook_section_s |
|
|
985 | { |
|
|
986 | psiconv_formula_list formulas; |
|
|
987 | psiconv_sheet_worksheet_list worksheets; |
|
|
988 | psiconv_sheet_variable_list variables; |
|
|
989 | psiconv_sheet_info_section info; |
|
|
990 | psiconv_sheet_name_section name; |
|
|
991 | } *psiconv_sheet_workbook_section; |
|
|
992 | |
|
|
993 | typedef struct psiconv_sheet_f_s |
|
|
994 | { |
|
|
995 | psiconv_page_layout_section page_sec; |
|
|
996 | psiconv_sheet_status_section status_sec; |
|
|
997 | psiconv_sheet_workbook_section workbook_sec; |
|
|
998 | } *psiconv_sheet_f; |
|
|
999 | |
|
|
1000 | /* NB: psiconv_file is already defined above */ |
|
|
1001 | struct psiconv_file_s |
|
|
1002 | { |
364 | psiconv_file_type_t type; |
1003 | psiconv_file_type_t type; |
365 | void *file; |
1004 | void *file; |
366 | } *psiconv_file; |
1005 | }; |
367 | |
1006 | |
368 | |
1007 | |
369 | /* UID1 */ |
1008 | /* UID1 */ |
370 | #define PSICONV_ID_PSION5 0x10000037 |
1009 | #define PSICONV_ID_PSION5 0x10000037 |
|
|
1010 | #define PSICONV_ID_CLIPART 0x10000041 |
371 | /* UID2 */ |
1011 | /* UID2 */ |
372 | #define PSICONV_ID_DATA_FILE 0x1000006D |
1012 | #define PSICONV_ID_DATA_FILE 0x1000006D |
373 | #define PSICONV_ID_MBM_FILE 0x10000042 |
1013 | #define PSICONV_ID_MBM_FILE 0x10000042 |
374 | /* UID3 */ |
1014 | /* UID3 */ |
375 | #define PSICONV_ID_WORD 0x1000007F |
1015 | #define PSICONV_ID_WORD 0x1000007F |
376 | #define PSICONV_ID_TEXTED 0x10000085 |
1016 | #define PSICONV_ID_TEXTED 0x10000085 |
377 | #define PSICONV_ID_SKETCH 0x1000007D |
1017 | #define PSICONV_ID_SKETCH 0x1000007D |
|
|
1018 | #define PSICONV_ID_SHEET 0x10000088 |
378 | |
1019 | |
379 | /* Section table ids */ |
1020 | /* Section table ids */ |
380 | #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 |
1021 | #define PSICONV_ID_WORD_STATUS_SECTION 0x10000243 |
381 | #define PSICONV_ID_APPL_ID_SECTION 0x10000089 |
1022 | #define PSICONV_ID_APPL_ID_SECTION 0x10000089 |
382 | #define PSICONV_ID_TEXT_SECTION 0x10000106 |
1023 | #define PSICONV_ID_TEXT_SECTION 0x10000106 |
383 | #define PSICONV_ID_LAYOUT_SECTION 0x10000143 |
1024 | #define PSICONV_ID_LAYOUT_SECTION 0x10000143 |
384 | #define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 |
1025 | #define PSICONV_ID_WORD_STYLES_SECTION 0x10000104 |
385 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
1026 | #define PSICONV_ID_PAGE_LAYOUT_SECTION 0x10000105 |
386 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
1027 | #define PSICONV_ID_PASSWORD_SECTION 0x100000CD |
387 | #define PSICONV_ID_SKETCH_SECTION 0x1000007D |
1028 | #define PSICONV_ID_SKETCH_SECTION 0x1000007D |
|
|
1029 | #define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F |
|
|
1030 | #define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D |
|
|
1031 | #define PSICONV_ID_SHEET_GRAPH_SECTION 0x10000121 |
388 | |
1032 | |
389 | /* Other ids */ |
1033 | /* Other ids */ |
390 | #define PSICONV_ID_PAGE_DIMENSIONS 0x100000fd |
1034 | #define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd |
|
|
1035 | #define PSICONV_ID_PAGE_DIMENSIONS2 0x1000010e |
391 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
1036 | #define PSICONV_ID_TEXTED_BODY 0x1000005c |
392 | #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 |
1037 | #define PSICONV_ID_TEXTED_REPLACEMENT 0x10000063 |
393 | #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 |
1038 | #define PSICONV_ID_TEXTED_UNKNOWN 0x10000065 |
394 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
1039 | #define PSICONV_ID_TEXTED_LAYOUT 0x10000066 |
395 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
1040 | #define PSICONV_ID_TEXTED_TEXT 0x10000064 |
396 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
1041 | #define PSICONV_ID_STYLE_REMOVABLE 0x1000004F |
397 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
1042 | #define PSICONV_ID_STYLE_BUILT_IN 0x1000004C |
|
|
1043 | #define PSICONV_ID_CLIPART_ITEM 0x10000040 |
|
|
1044 | #define PSICONV_ID_OBJECT 0x10000051 |
|
|
1045 | #define PSICONV_ID_OBJECT_DISPLAY_SECTION 0x10000146 |
|
|
1046 | #define PSICONV_ID_OBJECT_ICON_SECTION 0x1000012A |
|
|
1047 | #define PSICONV_ID_OBJECT_SECTION_TABLE_SECTION 0x10000144 |
398 | |
1048 | |
399 | |
1049 | |
400 | /* Return a clean layout_status. You can modify it at will */ |
1050 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
|
|
1051 | if there is not enough memory. */ |
401 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
1052 | extern psiconv_character_layout psiconv_basic_character_layout(void); |
402 | |
1053 | |
403 | /* Return a clean layout_status. You can modify it at will */ |
1054 | /* Return a clean layout_status. You can modify it at will. Returns NULL |
|
|
1055 | if there is not enough memory. */ |
404 | extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); |
1056 | extern psiconv_paragraph_layout psiconv_basic_paragraph_layout(void); |
405 | |
1057 | |
406 | /* Clone a layout_status: the new copy is completely independent of the |
1058 | /* Clone a layout_status: the new copy is completely independent of the |
407 | original one */ |
1059 | original one. Returns NULL if there is not enough memory. */ |
408 | extern psiconv_paragraph_layout psiconv_clone_paragraph_layout |
1060 | extern psiconv_paragraph_layout psiconv_clone_paragraph_layout |
409 | (psiconv_paragraph_layout ls); |
1061 | (psiconv_paragraph_layout ls); |
410 | |
1062 | |
411 | extern psiconv_character_layout psiconv_clone_character_layout |
1063 | extern psiconv_character_layout psiconv_clone_character_layout |
412 | (psiconv_character_layout ls); |
1064 | (psiconv_character_layout ls); |
413 | |
1065 | |
414 | /* Get a numbered style */ |
1066 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
415 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
1067 | extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); |
|
|
1068 | /* Get a numbered formula. Returns NULL if the style is unknown. */ |
|
|
1069 | extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); |
|
|
1070 | |
|
|
1071 | /* Return the default layout */ |
|
|
1072 | extern psiconv_sheet_cell_layout psiconv_get_default_layout |
|
|
1073 | (psiconv_sheet_line_list row_defaults, |
|
|
1074 | psiconv_sheet_line_list col_defaults, |
|
|
1075 | psiconv_sheet_cell_layout cell_default, |
|
|
1076 | int row,int col); |
416 | |
1077 | |
417 | extern void psiconv_free_color(psiconv_color color); |
1078 | extern void psiconv_free_color(psiconv_color color); |
418 | extern void psiconv_free_border(psiconv_border border); |
1079 | extern void psiconv_free_border(psiconv_border border); |
419 | extern void psiconv_free_bullet(psiconv_bullet bullet); |
1080 | extern void psiconv_free_bullet(psiconv_bullet bullet); |
420 | extern void psiconv_free_font(psiconv_font font); |
1081 | extern void psiconv_free_font(psiconv_font font); |
421 | extern void psiconv_free_tab(psiconv_tab tab); |
1082 | extern void psiconv_free_tab(psiconv_tab tab); |
422 | extern void psiconv_free_tabs(psiconv_all_tabs tabs); |
1083 | extern void psiconv_free_tabs(psiconv_all_tabs tabs); |
423 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
1084 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
424 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
1085 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
425 | extern void psiconv_free_word_style(psiconv_word_style style); |
1086 | extern void psiconv_free_word_style(psiconv_word_style style); |
|
|
1087 | extern void psiconv_free_word_style_list(psiconv_word_style_list style_list); |
426 | extern void psiconv_free_word_styles_section |
1088 | extern void psiconv_free_word_styles_section |
427 | (psiconv_word_styles_section styles); |
1089 | (psiconv_word_styles_section styles); |
|
|
1090 | extern void psiconv_free_formula(psiconv_formula formula); |
|
|
1091 | extern void psiconv_free_formula_list(psiconv_formula_list list); |
|
|
1092 | extern void psiconv_free_sheet_status_section |
|
|
1093 | (psiconv_sheet_status_section section); |
|
|
1094 | extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout); |
|
|
1095 | extern void psiconv_free_sheet_grid_break_list |
|
|
1096 | (psiconv_sheet_grid_break_list list); |
|
|
1097 | extern void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s); |
|
|
1098 | extern void psiconv_free_sheet_grid_size_list |
|
|
1099 | (psiconv_sheet_grid_size_list list); |
|
|
1100 | extern void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec); |
|
|
1101 | extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet); |
|
|
1102 | extern void psiconv_free_sheet_worksheet_list |
|
|
1103 | (psiconv_sheet_worksheet_list list); |
|
|
1104 | |
|
|
1105 | extern void psiconv_free_sheet_f(psiconv_sheet_f file); |
|
|
1106 | extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); |
|
|
1107 | extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); |
|
|
1108 | extern void psiconv_free_sheet_numberformat |
|
|
1109 | (psiconv_sheet_numberformat numberformat); |
|
|
1110 | extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list); |
|
|
1111 | extern void psiconv_free_sheet_line(psiconv_sheet_line line); |
|
|
1112 | extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); |
|
|
1113 | extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); |
|
|
1114 | extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); |
|
|
1115 | extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); |
|
|
1116 | extern void psiconv_free_sheet_workbook_section |
|
|
1117 | (psiconv_sheet_workbook_section section); |
428 | extern void psiconv_free_header_section(psiconv_header_section header); |
1118 | extern void psiconv_free_header_section(psiconv_header_section header); |
429 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
1119 | extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); |
430 | extern void psiconv_free_section_table_section |
1120 | extern void psiconv_free_section_table_section |
431 | (psiconv_section_table_section section); |
1121 | (psiconv_section_table_section section); |
432 | extern void psiconv_free_application_id_section |
1122 | extern void psiconv_free_application_id_section |
433 | (psiconv_application_id_section section); |
1123 | (psiconv_application_id_section section); |
|
|
1124 | extern void psiconv_free_object_display_section |
|
|
1125 | (psiconv_object_display_section section); |
|
|
1126 | extern void psiconv_free_object_icon_section |
|
|
1127 | (psiconv_object_icon_section section); |
|
|
1128 | extern void psiconv_free_embedded_object_section |
|
|
1129 | (psiconv_embedded_object_section object); |
434 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
1130 | extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); |
435 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
1131 | extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); |
436 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
1132 | extern void psiconv_free_replacement(psiconv_replacement replacement); |
437 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
1133 | extern void psiconv_free_replacements(psiconv_replacements replacements); |
438 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |
1134 | extern void psiconv_free_paragraph(psiconv_paragraph paragraph); |
… | |
… | |
445 | (psiconv_word_status_section section); |
1141 | (psiconv_word_status_section section); |
446 | extern void psiconv_free_word_f(psiconv_word_f file); |
1142 | extern void psiconv_free_word_f(psiconv_word_f file); |
447 | extern void psiconv_free_texted_f(psiconv_texted_f file); |
1143 | extern void psiconv_free_texted_f(psiconv_texted_f file); |
448 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
1144 | extern void psiconv_free_paint_data_section(psiconv_paint_data_section section); |
449 | extern void psiconv_free_pictures(psiconv_pictures section); |
1145 | extern void psiconv_free_pictures(psiconv_pictures section); |
450 | extern void psiconv_free_mbm_jumptable_section |
1146 | extern void psiconv_free_jumptable_section |
451 | (psiconv_mbm_jumptable_section section); |
1147 | (psiconv_jumptable_section section); |
452 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
1148 | extern void psiconv_free_mbm_f(psiconv_mbm_f file); |
453 | extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
1149 | extern void psiconv_free_sketch_section(psiconv_sketch_section sec); |
454 | extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
1150 | extern void psiconv_free_sketch_f(psiconv_sketch_f file); |
|
|
1151 | extern void psiconv_free_clipart_section(psiconv_clipart_section section); |
|
|
1152 | extern void psiconv_free_cliparts(psiconv_cliparts section); |
|
|
1153 | extern void psiconv_free_clipart_f(psiconv_clipart_f file); |
455 | |
1154 | |
456 | extern void psiconv_free_file(psiconv_file file); |
1155 | extern void psiconv_free_file(psiconv_file file); |
457 | |
1156 | |
|
|
1157 | extern int psiconv_compare_color(const psiconv_color value1, |
|
|
1158 | const psiconv_color value2); |
|
|
1159 | extern int psiconv_compare_font(const psiconv_font value1, |
|
|
1160 | const psiconv_font value2); |
|
|
1161 | extern int psiconv_compare_border(const psiconv_border value1, |
|
|
1162 | const psiconv_border value2); |
|
|
1163 | extern int psiconv_compare_bullet(const psiconv_bullet value1, |
|
|
1164 | const psiconv_bullet value2); |
|
|
1165 | extern int psiconv_compare_tab(const psiconv_tab value1, |
|
|
1166 | const psiconv_tab value2); |
|
|
1167 | extern int psiconv_compare_all_tabs(const psiconv_all_tabs value1, |
|
|
1168 | const psiconv_all_tabs value2); |
|
|
1169 | extern int psiconv_compare_paragraph_layout |
|
|
1170 | (const psiconv_paragraph_layout value1, |
|
|
1171 | const psiconv_paragraph_layout value2); |
|
|
1172 | |
|
|
1173 | extern int psiconv_compare_character_layout |
|
|
1174 | (const psiconv_character_layout value1, |
|
|
1175 | const psiconv_character_layout value2); |
|
|
1176 | |
|
|
1177 | /* Get a newly allocated file with sensible defaults, ready to generate. */ |
|
|
1178 | extern psiconv_file psiconv_empty_file(psiconv_file_type_t type); |
|
|
1179 | |
|
|
1180 | |
|
|
1181 | #ifdef __cplusplus |
|
|
1182 | } |
|
|
1183 | #endif /* __cplusplus */ |
458 | |
1184 | |
459 | #endif /* def PSICONV_DATA_H */ |
1185 | #endif /* def PSICONV_DATA_H */ |