--- psiconv/trunk/lib/psiconv/data.c 2001/01/31 00:57:17 104 +++ psiconv/trunk/lib/psiconv/data.c 2001/03/04 22:10:45 110 @@ -549,6 +549,51 @@ free(section); } +void psiconv_free_numberformat(psiconv_numberformat numberformat) +{ + if (numberformat) + free(numberformat); +} + +void psiconv_free_sheet_cell(psiconv_sheet_cell cell) +{ + if (cell) { + psiconv_free_paragraph_layout(cell->paragraph); + psiconv_free_character_layout(cell->character); + psiconv_free_numberformat(cell->numberformat); + + if ((cell->type == psiconv_cell_string) && (cell->data.dat_string)) + free(cell->data.dat_string); + + free(cell); + } +} + +void psiconv_free_sheet_cell_aux(void *data) +{ + psiconv_sheet_cell cell; + cell = data; + psiconv_free_sheet_cell(cell); +} + +void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) +{ + if (list) + psiconv_list_free_el(list,psiconv_free_sheet_cell_aux); +} + +void psiconv_free_sheet_worksheet_section( + psiconv_sheet_worksheet_section section) +{ + if (section) { + psiconv_free_paragraph_layout(section->paragraph); + psiconv_free_character_layout(section->character); + psiconv_free_numberformat(section->numberformat); + psiconv_free_sheet_cell_list(section->cells); + free(section); + } +} + void psiconv_free_formula_aux(void *data) { psiconv_formula formula; @@ -586,6 +631,7 @@ { if (section) { psiconv_free_formula_list(section->formulas); + psiconv_free_sheet_worksheet_section(section->worksheet); free(section); } }