--- psiconv/trunk/lib/psiconv/data.h 2001/07/18 12:24:08 128 +++ psiconv/trunk/lib/psiconv/data.h 2001/07/24 20:32:51 129 @@ -504,8 +504,8 @@ psiconv_u32 dat_int; double dat_float; char *dat_string; - psiconv_bool_t dat_bool; - psiconv_sheet_errorcode_t dat_error; + psiconv_bool_t dat_bool; + psiconv_sheet_errorcode_t dat_error; } data; psiconv_sheet_cell_layout layout; psiconv_bool_t calculated; @@ -679,6 +679,7 @@ psiconv_sheet_cell_reference_t dat_cellref; psiconv_sheet_cell_block_t dat_cellblock; psiconv_formula_list fun_operands; + psiconv_u32 dat_variable; } data; } *psiconv_formula; @@ -701,12 +702,51 @@ } *psiconv_sheet_worksheet; typedef psiconv_list psiconv_sheet_worksheet_list; - /* of struct psiconv_sheet_worksheet */ + /* of struct psiconv_sheet_worksheet_s */ + +typedef enum psiconv_variable_type +{ + psiconv_var_int, + psiconv_var_float, + psiconv_var_string, + psiconv_var_cellref, + psiconv_var_cellblock +} psiconv_variable_type_t; + +typedef struct psiconv_sheet_variable_s +{ + psiconv_u32 number; + char *name; + psiconv_variable_type_t type; + union { + psiconv_s32 dat_int; + double dat_float; + char *dat_string; + psiconv_sheet_cell_reference_t dat_cellref; + psiconv_sheet_cell_block_t dat_cellblock; + } data; +} *psiconv_sheet_variable; + +typedef psiconv_list psiconv_sheet_variable_list; + /* of struct psiconv_sheet_variable_s */ + +typedef struct psiconv_sheet_name_section_s +{ + char *name; +} *psiconv_sheet_name_section; + +typedef struct psiconv_sheet_info_section_s +{ + psiconv_bool_t auto_recalc; +} *psiconv_sheet_info_section; typedef struct psiconv_sheet_workbook_section_s { psiconv_formula_list formulas; psiconv_sheet_worksheet_list worksheets; + psiconv_sheet_variable_list variables; + psiconv_sheet_info_section info; + psiconv_sheet_name_section name; } *psiconv_sheet_workbook_section; typedef struct psiconv_sheet_f_s @@ -816,6 +856,10 @@ (psiconv_sheet_numberformat numberformat); extern void psiconv_free_sheet_line_list(psiconv_sheet_line_list list); extern void psiconv_free_sheet_line(psiconv_sheet_line line); +extern void psiconv_free_sheet_name_section(psiconv_sheet_name_section section); +extern void psiconv_free_sheet_variable(psiconv_sheet_variable list); +extern void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list); +extern void psiconv_free_sheet_info_section(psiconv_sheet_info_section section); extern void psiconv_free_header_section(psiconv_header_section header); extern void psiconv_free_section_table_entry(psiconv_section_table_entry entry); extern void psiconv_free_section_table_section