--- psiconv/trunk/lib/psiconv/data.c 2001/07/24 20:32:51 129 +++ psiconv/trunk/lib/psiconv/data.c 2002/01/29 18:38:38 142 @@ -24,6 +24,10 @@ #include "data.h" #include "list.h" +#ifdef DMALLOC +#include +#endif + static psiconv_color clone_color(psiconv_color color); static psiconv_font clone_font(psiconv_font font); static psiconv_border clone_border(psiconv_border border); @@ -631,12 +635,42 @@ } } + void psiconv_free_sheet_line_list(psiconv_sheet_line_list list) { if (list) psiconv_list_free_el(list,psiconv_free_sheet_line_aux); } +void psiconv_free_sheet_grid_break_list(psiconv_sheet_grid_break_list list) +{ + if (list) + psiconv_list_free(list); +} + +void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s) +{ + if (s) + free(s); +} + +void psiconv_free_sheet_grid_size_list(psiconv_sheet_grid_size_list list) +{ + if (list) + psiconv_list_free(list); +} + +void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec) +{ + if (sec) { + psiconv_free_sheet_grid_size_list(sec->row_heights); + psiconv_free_sheet_grid_size_list(sec->column_heights); + psiconv_free_sheet_grid_break_list(sec->row_page_breaks); + psiconv_free_sheet_grid_break_list(sec->column_page_breaks); + free(sec); + } +} + void psiconv_free_sheet_worksheet_aux (void *data) { psiconv_sheet_worksheet section = data; @@ -644,6 +678,7 @@ psiconv_free_sheet_cell_list(section->cells); psiconv_free_sheet_line_list(section->row_default_layouts); psiconv_free_sheet_line_list(section->col_default_layouts); + psiconv_free_sheet_grid_section(section->grid); } void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet)