--- psiconv/trunk/lib/psiconv/data.h 2001/02/16 18:49:14 109 +++ psiconv/trunk/lib/psiconv/data.h 2001/03/04 22:10:45 110 @@ -425,6 +425,91 @@ psiconv_sheet_cell_reference_t last; } psiconv_sheet_cell_block_t; +typedef enum psiconv_cell_type +{ + psiconv_cell_blank, + psiconv_cell_int, + psiconv_cell_bool, + psiconv_cell_error, + psiconv_cell_float, + psiconv_cell_string +} psiconv_cell_type_t; + +typedef enum psiconv_sheet_errorcode +{ + psiconv_sheet_error_none, + psiconv_sheet_error_null, + psiconv_sheet_error_divzero, + psiconv_sheet_error_value, + psiconv_sheet_error_reference, + psiconv_sheet_error_name, + psiconv_sheet_error_number, + psiconv_sheet_error_notavail +} psiconv_sheet_errorcode_t; + +typedef enum psiconv_numberformat +{ + psiconv_numberformat_general, + psiconv_numberformat_fixeddecimal, + psiconv_numberformat_scientific, + psiconv_numberformat_currency, + psiconv_numberformat_percent, + psiconv_numberformat_triads, + psiconv_numberformat_boolean, + psiconv_numberformat_text, + psiconv_numberformat_date_ddmm, + psiconv_numberformat_date_mmdd, + psiconv_numberformat_date_ddmmyy, + psiconv_numberformat_date_mmddyy, + psiconv_numberformat_date_yymmdd, + psiconv_numberformat_date_ddmmm, + psiconv_numberformat_date_ddmmmyy, + psiconv_numberformat_date_ddmmmyyyy, + psiconv_numberformat_date_mmm, + psiconv_numberformat_date_monthname, + psiconv_numberformat_date_mmmyy, + psiconv_numberformat_date_monthnameyy, + psiconv_numberformat_date_monthnameddyyyy, + psiconv_numberformat_datetime_ddmmyyyyhhii, + psiconv_numberformat_datetime_ddmmyyyyHHii, + psiconv_numberformat_datetime_mmddyyyyhhii, + psiconv_numberformat_datetime_mmddyyyyHHii, + psiconv_numberformat_datetime_yyyymmddhhii, + psiconv_numberformat_datetime_yyyymmddHHii, + psiconv_numberformat_time_hhii, + psiconv_numberformat_time_hhiiss, + psiconv_numberformat_time_HHii, + psiconv_numberformat_time_HHiiss +} psiconv_numberformat_t; + +typedef struct psiconv_numberformat_s +{ + psiconv_numberformat_t numberformat; + psiconv_u8 decimal; +} *psiconv_numberformat; + +typedef struct psiconv_sheet_cell_s +{ + psiconv_u16 column; + psiconv_u16 row; + psiconv_cell_type_t type; + union { + psiconv_u32 dat_int; + double dat_float; + char *dat_string; + psiconv_bool_t dat_bool; + psiconv_sheet_errorcode_t dat_error; + } data; + psiconv_character_layout character; + psiconv_paragraph_layout paragraph; + psiconv_numberformat numberformat; + psiconv_bool_t calculated; + psiconv_u32 ref_formula; +} *psiconv_sheet_cell; + +typedef psiconv_list psiconv_sheet_cell_list; + /* Of struct psiconv_sheet_cell_s */ + typedef struct psiconv_sheet_status_section_s { psiconv_bool_t show_graph; @@ -593,9 +678,18 @@ } data; } *psiconv_formula; +typedef struct psiconv_sheet_worksheet_section_s +{ + psiconv_character_layout character; + psiconv_paragraph_layout paragraph; + psiconv_numberformat numberformat; + psiconv_sheet_cell_list cells; +} *psiconv_sheet_worksheet_section; + typedef struct psiconv_sheet_workbook_section_s { psiconv_formula_list formulas; + psiconv_sheet_worksheet_section worksheet; } *psiconv_sheet_workbook_section; typedef struct psiconv_sheet_f_s @@ -635,6 +729,7 @@ #define PSICONV_ID_SKETCH_SECTION 0x1000007D #define PSICONV_ID_SHEET_STATUS_SECTION 0x1000011F #define PSICONV_ID_SHEET_WORKBOOK_SECTION 0x1000011D +#define PSICONV_ID_SHEET_GRAPH_SECTION 0x10000121 /* Other ids */ #define PSICONV_ID_PAGE_DIMENSIONS1 0x100000fd @@ -684,6 +779,9 @@ extern void psiconv_free_sheet_status_section (psiconv_sheet_status_section section); extern void psiconv_free_sheet_f(psiconv_sheet_f file); +extern void psiconv_free_sheet_cell(psiconv_sheet_cell cell); +extern void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list); +extern void psiconv_free_numberformat(psiconv_numberformat numberformat); 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