… | |
… | |
547 | { |
547 | { |
548 | if (section) |
548 | if (section) |
549 | free(section); |
549 | free(section); |
550 | } |
550 | } |
551 | |
551 | |
|
|
552 | void psiconv_free_numberformat(psiconv_numberformat numberformat) |
|
|
553 | { |
|
|
554 | if (numberformat) |
|
|
555 | free(numberformat); |
|
|
556 | } |
|
|
557 | |
|
|
558 | void psiconv_free_sheet_cell(psiconv_sheet_cell cell) |
|
|
559 | { |
|
|
560 | if (cell) { |
|
|
561 | psiconv_free_paragraph_layout(cell->paragraph); |
|
|
562 | psiconv_free_character_layout(cell->character); |
|
|
563 | psiconv_free_numberformat(cell->numberformat); |
|
|
564 | |
|
|
565 | if ((cell->type == psiconv_cell_string) && (cell->data.dat_string)) |
|
|
566 | free(cell->data.dat_string); |
|
|
567 | |
|
|
568 | free(cell); |
|
|
569 | } |
|
|
570 | } |
|
|
571 | |
|
|
572 | void psiconv_free_sheet_cell_aux(void *data) |
|
|
573 | { |
|
|
574 | psiconv_sheet_cell cell; |
|
|
575 | cell = data; |
|
|
576 | psiconv_free_sheet_cell(cell); |
|
|
577 | } |
|
|
578 | |
|
|
579 | void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) |
|
|
580 | { |
|
|
581 | if (list) |
|
|
582 | psiconv_list_free_el(list,psiconv_free_sheet_cell_aux); |
|
|
583 | } |
|
|
584 | |
|
|
585 | void psiconv_free_sheet_worksheet_section( |
|
|
586 | psiconv_sheet_worksheet_section section) |
|
|
587 | { |
|
|
588 | if (section) { |
|
|
589 | psiconv_free_paragraph_layout(section->paragraph); |
|
|
590 | psiconv_free_character_layout(section->character); |
|
|
591 | psiconv_free_numberformat(section->numberformat); |
|
|
592 | psiconv_free_sheet_cell_list(section->cells); |
|
|
593 | free(section); |
|
|
594 | } |
|
|
595 | } |
|
|
596 | |
552 | void psiconv_free_formula_aux(void *data) |
597 | void psiconv_free_formula_aux(void *data) |
553 | { |
598 | { |
554 | psiconv_formula formula; |
599 | psiconv_formula formula; |
555 | formula = data; |
600 | formula = data; |
556 | if (formula->type == psiconv_formula_dat_string) |
601 | if (formula->type == psiconv_formula_dat_string) |
… | |
… | |
584 | |
629 | |
585 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
630 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
586 | { |
631 | { |
587 | if (section) { |
632 | if (section) { |
588 | psiconv_free_formula_list(section->formulas); |
633 | psiconv_free_formula_list(section->formulas); |
|
|
634 | psiconv_free_sheet_worksheet_section(section->worksheet); |
589 | free(section); |
635 | free(section); |
590 | } |
636 | } |
591 | } |
637 | } |
592 | |
638 | |
593 | void psiconv_free_sheet_f(psiconv_sheet_f file) |
639 | void psiconv_free_sheet_f(psiconv_sheet_f file) |