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, 2000 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. |
… | |
… | |
181 | 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 */ |
182 | psiconv_color color; /* Border color */ |
182 | psiconv_color color; /* Border color */ |
183 | } *psiconv_border; |
183 | } *psiconv_border; |
184 | |
184 | |
185 | /* Complete bullet information. |
185 | /* Complete bullet information. |
186 | If indent if off, the bullet is at the first line indentation level, |
186 | The interaction of left and first line indentation and bullets is quite |
187 | and the line text begins right after it. If it is on, the bullet is at |
187 | complicated. |
188 | the minimum of the first line and left indentation, and the text starts |
188 | |
189 | at the maximum of both. */ |
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 | */ |
190 | typedef struct psiconv_bullet_s |
203 | typedef struct psiconv_bullet_s |
191 | { |
204 | { |
192 | psiconv_bool_t on; /* Whether the bullet is shown */ |
205 | psiconv_bool_t on; /* Whether the bullet is shown */ |
193 | psiconv_size_t font_size; /* Bullet font size */ |
206 | psiconv_size_t font_size; /* Bullet font size */ |
194 | psiconv_ucs2 character; /* Bullet character */ |
207 | psiconv_ucs2 character; /* Bullet character */ |
… | |
… | |
474 | } *psiconv_word_status_section; |
487 | } *psiconv_word_status_section; |
475 | |
488 | |
476 | /* A Word Style. |
489 | /* A Word Style. |
477 | All information about a single Style. |
490 | All information about a single Style. |
478 | A builtin style may not be changed in the Word program. |
491 | A builtin style may not be changed in the Word program. |
479 | Outline level is zero if unused. */ |
492 | Outline level is zero if unused. |
|
|
493 | The name may be NULL for the normal style! */ |
480 | typedef struct psiconv_word_style_s |
494 | typedef struct psiconv_word_style_s |
481 | { |
495 | { |
482 | psiconv_character_layout character; /* character-level layout */ |
496 | psiconv_character_layout character; /* character-level layout */ |
483 | psiconv_paragraph_layout paragraph; /* paragraph-level layout */ |
497 | psiconv_paragraph_layout paragraph; /* paragraph-level layout */ |
484 | psiconv_ucs2 hotkey; /* The hotkey */ |
498 | psiconv_ucs2 hotkey; /* The hotkey */ |
… | |
… | |
490 | /* A list of Word Styles */ |
504 | /* A list of Word Styles */ |
491 | typedef psiconv_list psiconv_word_style_list; |
505 | typedef psiconv_list psiconv_word_style_list; |
492 | /* Of struct psiconv_word_style_s */ |
506 | /* Of struct psiconv_word_style_s */ |
493 | |
507 | |
494 | /* A Word Styles Section |
508 | /* A Word Styles Section |
495 | All information about styles. */ |
509 | All information about styles. |
|
|
510 | Note that the name of the normal style is NULL! */ |
496 | typedef struct psiconv_word_styles_section_s |
511 | typedef struct psiconv_word_styles_section_s |
497 | { |
512 | { |
498 | psiconv_word_style normal; /* The normal (unspecified) style */ |
513 | psiconv_word_style normal; /* The normal (unspecified) style */ |
499 | psiconv_word_style_list styles; /* All other defined styles */ |
514 | psiconv_word_style_list styles; /* All other defined styles */ |
500 | } *psiconv_word_styles_section; |
515 | } *psiconv_word_styles_section; |
… | |
… | |
1048 | extern psiconv_character_layout psiconv_clone_character_layout |
1063 | extern psiconv_character_layout psiconv_clone_character_layout |
1049 | (psiconv_character_layout ls); |
1064 | (psiconv_character_layout ls); |
1050 | |
1065 | |
1051 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
1066 | /* Get a numbered style. Returns NULL if the style is unknown. */ |
1052 | 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 | |
|
|
1069 | /* Return the number corresponding to the stylename. Returns 0 on success, |
|
|
1070 | an error code on failure. */ |
|
|
1071 | extern int psiconv_find_style(const psiconv_word_styles_section ss, |
|
|
1072 | const psiconv_ucs2 *name,int *nr); |
|
|
1073 | |
1053 | /* Get a numbered formula. Returns NULL if the style is unknown. */ |
1074 | /* Get a numbered formula. Returns NULL if the style is unknown. */ |
1054 | extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); |
1075 | extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); |
1055 | |
1076 | |
1056 | /* Return the default layout */ |
1077 | /* Return the default layout */ |
1057 | extern psiconv_sheet_cell_layout psiconv_get_default_layout |
1078 | extern psiconv_sheet_cell_layout psiconv_get_default_layout |
… | |
… | |
1067 | extern void psiconv_free_tab(psiconv_tab tab); |
1088 | extern void psiconv_free_tab(psiconv_tab tab); |
1068 | extern void psiconv_free_tabs(psiconv_all_tabs tabs); |
1089 | extern void psiconv_free_tabs(psiconv_all_tabs tabs); |
1069 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
1090 | extern void psiconv_free_paragraph_layout(psiconv_paragraph_layout layout); |
1070 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
1091 | extern void psiconv_free_character_layout(psiconv_character_layout layout); |
1071 | extern void psiconv_free_word_style(psiconv_word_style style); |
1092 | extern void psiconv_free_word_style(psiconv_word_style style); |
|
|
1093 | extern void psiconv_free_word_style_list(psiconv_word_style_list style_list); |
1072 | extern void psiconv_free_word_styles_section |
1094 | extern void psiconv_free_word_styles_section |
1073 | (psiconv_word_styles_section styles); |
1095 | (psiconv_word_styles_section styles); |
1074 | extern void psiconv_free_formula(psiconv_formula formula); |
1096 | extern void psiconv_free_formula(psiconv_formula formula); |
1075 | extern void psiconv_free_formula_list(psiconv_formula_list list); |
1097 | extern void psiconv_free_formula_list(psiconv_formula_list list); |
1076 | extern void psiconv_free_sheet_status_section |
1098 | extern void psiconv_free_sheet_status_section |