/[public]/psiconv/trunk/lib/psiconv/data.h
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 125 Revision 160
31 to structs */ 31 to structs */
32 32
33#ifdef __cplusplus 33#ifdef __cplusplus
34extern "C" { 34extern "C" {
35#endif /* __cplusplus */ 35#endif /* __cplusplus */
36
37/* Forward declaration (for psiconv_object) */
38typedef struct psiconv_file_s *psiconv_file;
36 39
37typedef double psiconv_float_t; 40typedef double psiconv_float_t;
38 41
39typedef enum psiconv_file_type { 42typedef enum psiconv_file_type {
40 psiconv_unknown_file, 43 psiconv_unknown_file,
225{ 228{
226 psiconv_u32 id; 229 psiconv_u32 id;
227 psiconv_string_t name; 230 psiconv_string_t name;
228} *psiconv_application_id_section; 231} *psiconv_application_id_section;
229 232
233typedef 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
240typedef 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
247typedef struct psiconv_object_s
248{
249 psiconv_object_icon_section icon;
250 psiconv_object_display_section display;
251 psiconv_file object;
252} *psiconv_object;
253
230typedef struct psiconv_in_line_layout_s 254typedef struct psiconv_in_line_layout_s
231{ 255{
232 psiconv_character_layout layout; 256 psiconv_character_layout layout;
233 int length; 257 int length;
258 /* If object is NULL, this does not apply to an object */
259 psiconv_object object;
260 psiconv_length_t object_width;
261 psiconv_length_t object_height;
234} *psiconv_in_line_layout; 262} *psiconv_in_line_layout;
235 263
236typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */ 264typedef psiconv_list psiconv_in_line_layouts; /* of struct in_line_layout */
237 265
238typedef enum psiconv_replacement_type 266typedef enum psiconv_replacement_type
502 psiconv_cell_type_t type; 530 psiconv_cell_type_t type;
503 union { 531 union {
504 psiconv_u32 dat_int; 532 psiconv_u32 dat_int;
505 double dat_float; 533 double dat_float;
506 char *dat_string; 534 char *dat_string;
507 psiconv_bool_t dat_bool; 535 psiconv_bool_t dat_bool;
508 psiconv_sheet_errorcode_t dat_error; 536 psiconv_sheet_errorcode_t dat_error;
509 } data; 537 } data;
510 psiconv_sheet_cell_layout layout; 538 psiconv_sheet_cell_layout layout;
511 psiconv_bool_t calculated; 539 psiconv_bool_t calculated;
512 psiconv_u32 ref_formula; 540 psiconv_u32 ref_formula;
513} *psiconv_sheet_cell; 541} *psiconv_sheet_cell;
514 542
515typedef psiconv_list psiconv_sheet_cell_list; 543typedef psiconv_list psiconv_sheet_cell_list;
516 /* Of struct psiconv_sheet_cell_s */
517 544
518typedef struct psiconv_sheet_status_section_s 545typedef struct psiconv_sheet_status_section_s
519{ 546{
520 psiconv_bool_t show_graph; 547 psiconv_bool_t show_graph;
521 psiconv_u32 cursor_row; 548 psiconv_u32 cursor_row;
678 double dat_float; 705 double dat_float;
679 char *dat_string; 706 char *dat_string;
680 psiconv_sheet_cell_reference_t dat_cellref; 707 psiconv_sheet_cell_reference_t dat_cellref;
681 psiconv_sheet_cell_block_t dat_cellblock; 708 psiconv_sheet_cell_block_t dat_cellblock;
682 psiconv_formula_list fun_operands; 709 psiconv_formula_list fun_operands;
710 psiconv_u32 dat_variable;
683 } data; 711 } data;
684} *psiconv_formula; 712} *psiconv_formula;
713
714typedef struct psiconv_sheet_line_s
715{
716 psiconv_u32 position;
717 psiconv_sheet_cell_layout layout;
718} *psiconv_sheet_line;
719
720typedef psiconv_list psiconv_sheet_line_list;
721 /* Of struct psiconv_sheet_line_s */
722
723typedef struct psiconv_sheet_grid_size_s
724{
725 psiconv_u32 line_number;
726 psiconv_length_t size;
727} *psiconv_sheet_grid_size;
728
729typedef psiconv_list psiconv_sheet_grid_size_list;
730 /* Of struct psiconv_sheet_grid_size_s */
731
732typedef psiconv_list psiconv_sheet_grid_break_list; /* of psiconv_u32 */
733
734typedef struct psiconv_sheet_grid_section_s
735{
736 psiconv_bool_t show_column_titles;
737 psiconv_bool_t show_row_titles;
738 psiconv_bool_t show_vertical_grid;
739 psiconv_bool_t show_horizontal_grid;
740 psiconv_bool_t freeze_rows;
741 psiconv_bool_t freeze_columns;
742 psiconv_u32 frozen_rows;
743 psiconv_u32 frozen_columns;
744 psiconv_u32 first_unfrozen_row_displayed;
745 psiconv_u32 first_unfrozen_column_displayed;
746 psiconv_bool_t show_page_breaks;
747 psiconv_u32 first_row;
748 psiconv_u32 first_column;
749 psiconv_u32 last_row;
750 psiconv_u32 last_column;
751 psiconv_length_t default_row_height;
752 psiconv_length_t default_column_width;
753 psiconv_sheet_grid_size_list row_heights;
754 psiconv_sheet_grid_size_list column_heights;
755 psiconv_sheet_grid_break_list row_page_breaks;
756 psiconv_sheet_grid_break_list column_page_breaks;
757} *psiconv_sheet_grid_section;
685 758
686typedef struct psiconv_sheet_worksheet_s 759typedef struct psiconv_sheet_worksheet_s
687{ 760{
688 psiconv_sheet_cell_layout default_layout; 761 psiconv_sheet_cell_layout default_layout;
689 psiconv_sheet_cell_list cells; 762 psiconv_sheet_cell_list cells;
690 psiconv_bool_t show_zeros; 763 psiconv_bool_t show_zeros;
764 psiconv_sheet_line_list row_default_layouts;
765 psiconv_sheet_line_list col_default_layouts;
766 psiconv_sheet_grid_section grid;
691} *psiconv_sheet_worksheet; 767} *psiconv_sheet_worksheet;
692 768
693typedef psiconv_list psiconv_sheet_worksheet_list; 769typedef psiconv_list psiconv_sheet_worksheet_list;
694 /* of struct psiconv_sheet_worksheet */ 770 /* of struct psiconv_sheet_worksheet_s */
771
772typedef enum psiconv_variable_type
773{
774 psiconv_var_int,
775 psiconv_var_float,
776 psiconv_var_string,
777 psiconv_var_cellref,
778 psiconv_var_cellblock
779} psiconv_variable_type_t;
780
781typedef struct psiconv_sheet_variable_s
782{
783 psiconv_u32 number;
784 char *name;
785 psiconv_variable_type_t type;
786 union {
787 psiconv_s32 dat_int;
788 double dat_float;
789 char *dat_string;
790 psiconv_sheet_cell_reference_t dat_cellref;
791 psiconv_sheet_cell_block_t dat_cellblock;
792 } data;
793} *psiconv_sheet_variable;
794
795typedef psiconv_list psiconv_sheet_variable_list;
796 /* of struct psiconv_sheet_variable_s */
797
798typedef struct psiconv_sheet_name_section_s
799{
800 char *name;
801} *psiconv_sheet_name_section;
802
803typedef struct psiconv_sheet_info_section_s
804{
805 psiconv_bool_t auto_recalc;
806} *psiconv_sheet_info_section;
695 807
696typedef struct psiconv_sheet_workbook_section_s 808typedef struct psiconv_sheet_workbook_section_s
697{ 809{
698 psiconv_formula_list formulas; 810 psiconv_formula_list formulas;
699 psiconv_sheet_worksheet_list worksheets; 811 psiconv_sheet_worksheet_list worksheets;
812 psiconv_sheet_variable_list variables;
813 psiconv_sheet_info_section info;
814 psiconv_sheet_name_section name;
700} *psiconv_sheet_workbook_section; 815} *psiconv_sheet_workbook_section;
701 816
702typedef struct psiconv_sheet_f_s 817typedef struct psiconv_sheet_f_s
703{ 818{
704 psiconv_page_layout_section page_sec; 819 psiconv_page_layout_section page_sec;
705 psiconv_sheet_status_section status_sec; 820 psiconv_sheet_status_section status_sec;
706 psiconv_sheet_workbook_section workbook_sec; 821 psiconv_sheet_workbook_section workbook_sec;
707} *psiconv_sheet_f; 822} *psiconv_sheet_f;
708 823
824/* NB: psiconv_file is already defined above */
709typedef struct psiconv_file_s 825struct psiconv_file_s
710{ 826{
711 psiconv_file_type_t type; 827 psiconv_file_type_t type;
712 void *file; 828 void *file;
713} *psiconv_file; 829};
714 830
715 831
716/* UID1 */ 832/* UID1 */
717#define PSICONV_ID_PSION5 0x10000037 833#define PSICONV_ID_PSION5 0x10000037
718#define PSICONV_ID_CLIPART 0x10000041 834#define PSICONV_ID_CLIPART 0x10000041
747#define PSICONV_ID_TEXTED_LAYOUT 0x10000066 863#define PSICONV_ID_TEXTED_LAYOUT 0x10000066
748#define PSICONV_ID_TEXTED_TEXT 0x10000064 864#define PSICONV_ID_TEXTED_TEXT 0x10000064
749#define PSICONV_ID_STYLE_REMOVABLE 0x1000004F 865#define PSICONV_ID_STYLE_REMOVABLE 0x1000004F
750#define PSICONV_ID_STYLE_BUILT_IN 0x1000004C 866#define PSICONV_ID_STYLE_BUILT_IN 0x1000004C
751#define PSICONV_ID_CLIPART_ITEM 0x10000040 867#define PSICONV_ID_CLIPART_ITEM 0x10000040
868#define PSICONV_ID_OBJECT 0x10000051
869#define PSICONV_ID_OBJECT_DISPLAY_SECTION 0x10000146
870#define PSICONV_ID_OBJECT_ICON_SECTION 0x1000012A
871#define PSICONV_ID_OBJECT_SECTION_TABLE_SECTION 0x10000144
752 872
753 873
754/* Return a clean layout_status. You can modify it at will. Returns NULL 874/* Return a clean layout_status. You can modify it at will. Returns NULL
755 if there is not enough memory. */ 875 if there is not enough memory. */
756extern psiconv_character_layout psiconv_basic_character_layout(void); 876extern psiconv_character_layout psiconv_basic_character_layout(void);
767extern psiconv_character_layout psiconv_clone_character_layout 887extern psiconv_character_layout psiconv_clone_character_layout
768 (psiconv_character_layout ls); 888 (psiconv_character_layout ls);
769 889
770/* Get a numbered style. Returns NULL if the style is unknown. */ 890/* Get a numbered style. Returns NULL if the style is unknown. */
771extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr); 891extern psiconv_word_style psiconv_get_style (psiconv_word_styles_section ss, int nr);
892/* Get a numbered formula. Returns NULL if the style is unknown. */
772extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr); 893extern psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr);
894
895/* Return the default layout */
896extern psiconv_sheet_cell_layout psiconv_get_default_layout
897 (psiconv_sheet_line_list row_defaults,
898 psiconv_sheet_line_list col_defaults,
899 psiconv_sheet_cell_layout cell_default,
900 int row,int col);
773 901
774extern void psiconv_free_color(psiconv_color color); 902extern void psiconv_free_color(psiconv_color color);
775extern void psiconv_free_border(psiconv_border border); 903extern void psiconv_free_border(psiconv_border border);
776extern void psiconv_free_bullet(psiconv_bullet bullet); 904extern void psiconv_free_bullet(psiconv_bullet bullet);
777extern void psiconv_free_font(psiconv_font font); 905extern void psiconv_free_font(psiconv_font font);
785extern void psiconv_free_formula(psiconv_formula formula); 913extern void psiconv_free_formula(psiconv_formula formula);
786extern void psiconv_free_formula_list(psiconv_formula_list list); 914extern void psiconv_free_formula_list(psiconv_formula_list list);
787extern void psiconv_free_sheet_status_section 915extern void psiconv_free_sheet_status_section
788 (psiconv_sheet_status_section section); 916 (psiconv_sheet_status_section section);
789extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout); 917extern void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout);
918extern void psiconv_free_sheet_grid_break_list
919 (psiconv_sheet_grid_break_list list);
920extern void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s);
921extern void psiconv_free_sheet_grid_size_list
922 (psiconv_sheet_grid_size_list list);
923extern void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec);
790extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet); 924extern void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet);
791extern void psiconv_free_sheet_worksheet_list 925extern void psiconv_free_sheet_worksheet_list
792 (psiconv_sheet_worksheet_list list); 926 (psiconv_sheet_worksheet_list list);
793 927
794extern void psiconv_free_sheet_f(psiconv_sheet_f file); 928extern void psiconv_free_sheet_f(psiconv_sheet_f file);
795extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); 929extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell);
796extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); 930extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list);
797extern void psiconv_free_sheet_numberformat 931extern void psiconv_free_sheet_numberformat
798 (psiconv_sheet_numberformat numberformat); 932 (psiconv_sheet_numberformat numberformat);
933extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list);
934extern void psiconv_free_sheet_line(psiconv_sheet_line line);
935extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section);
936extern void psiconv_free_sheet_variable(psiconv_sheet_variable list);
937extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list);
938extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section);
799extern void psiconv_free_header_section(psiconv_header_section header); 939extern void psiconv_free_header_section(psiconv_header_section header);
800extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); 940extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry);
801extern void psiconv_free_section_table_section 941extern void psiconv_free_section_table_section
802 (psiconv_section_table_section section); 942 (psiconv_section_table_section section);
803extern void psiconv_free_application_id_section 943extern void psiconv_free_application_id_section
804 (psiconv_application_id_section section); 944 (psiconv_application_id_section section);
945extern void psiconv_free_object_display_section
946 (psiconv_object_display_section section);
947extern void psiconv_free_object_icon_section
948 (psiconv_object_icon_section section);
949extern void psiconv_free_object(psiconv_object object);
805extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout); 950extern void psiconv_free_in_line_layout(psiconv_in_line_layout layout);
806extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts); 951extern void psiconv_free_in_line_layouts(psiconv_in_line_layouts layouts);
807extern void psiconv_free_replacement(psiconv_replacement replacement); 952extern void psiconv_free_replacement(psiconv_replacement replacement);
808extern void psiconv_free_replacements(psiconv_replacements replacements); 953extern void psiconv_free_replacements(psiconv_replacements replacements);
809extern void psiconv_free_paragraph(psiconv_paragraph paragraph); 954extern void psiconv_free_paragraph(psiconv_paragraph paragraph);

Legend:
Removed from v.125  
changed lines
  Added in v.160

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26