… | |
… | |
33 | static void psiconv_free_in_line_layout_aux(void * layout); |
33 | static void psiconv_free_in_line_layout_aux(void * layout); |
34 | static void psiconv_free_paragraph_aux(void * paragraph); |
34 | static void psiconv_free_paragraph_aux(void * paragraph); |
35 | static void psiconv_free_paint_data_section_aux(void * section); |
35 | static void psiconv_free_paint_data_section_aux(void * section); |
36 | static void psiconv_free_clipart_section_aux(void * section); |
36 | static void psiconv_free_clipart_section_aux(void * section); |
37 | static void psiconv_free_formula_aux(void *data); |
37 | static void psiconv_free_formula_aux(void *data); |
|
|
38 | static void psiconv_free_sheet_worksheet_aux (void *data); |
38 | |
39 | |
39 | static psiconv_word_styles_section psiconv_empty_word_styles_section(void); |
40 | static psiconv_word_styles_section psiconv_empty_word_styles_section(void); |
40 | static psiconv_text_and_layout psiconv_empty_text_and_layout(void); |
41 | static psiconv_text_and_layout psiconv_empty_text_and_layout(void); |
41 | static psiconv_texted_section psiconv_empty_texted_section(void); |
42 | static psiconv_texted_section psiconv_empty_texted_section(void); |
42 | static psiconv_page_header psiconv_empty_page_header(void); |
43 | static psiconv_page_header psiconv_empty_page_header(void); |
… | |
… | |
547 | { |
548 | { |
548 | if (section) |
549 | if (section) |
549 | free(section); |
550 | free(section); |
550 | } |
551 | } |
551 | |
552 | |
552 | void psiconv_free_numberformat(psiconv_numberformat numberformat) |
553 | void psiconv_free_sheet_numberformat(psiconv_sheet_numberformat numberformat) |
553 | { |
554 | { |
554 | if (numberformat) |
555 | if (numberformat) |
555 | free(numberformat); |
556 | free(numberformat); |
556 | } |
557 | } |
557 | |
558 | |
|
|
559 | void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout) |
|
|
560 | { |
|
|
561 | psiconv_free_paragraph_layout(layout->paragraph); |
|
|
562 | psiconv_free_character_layout(layout->character); |
|
|
563 | psiconv_free_sheet_numberformat(layout->numberformat); |
|
|
564 | } |
|
|
565 | |
558 | void psiconv_free_sheet_cell(psiconv_sheet_cell cell) |
566 | void psiconv_free_sheet_cell(psiconv_sheet_cell cell) |
559 | { |
567 | { |
560 | if (cell) { |
568 | if (cell) { |
561 | psiconv_free_paragraph_layout(cell->paragraph); |
569 | psiconv_free_sheet_cell_layout(cell->layout); |
562 | psiconv_free_character_layout(cell->character); |
|
|
563 | psiconv_free_numberformat(cell->numberformat); |
|
|
564 | |
570 | |
565 | if ((cell->type == psiconv_cell_string) && (cell->data.dat_string)) |
571 | if ((cell->type == psiconv_cell_string) && (cell->data.dat_string)) |
566 | free(cell->data.dat_string); |
572 | free(cell->data.dat_string); |
567 | |
|
|
568 | free(cell); |
573 | free(cell); |
569 | } |
574 | } |
570 | } |
575 | } |
571 | |
576 | |
572 | void psiconv_free_sheet_cell_aux(void *data) |
577 | void psiconv_free_sheet_cell_aux(void *data) |
573 | { |
578 | { |
… | |
… | |
580 | { |
585 | { |
581 | if (list) |
586 | if (list) |
582 | psiconv_list_free_el(list,psiconv_free_sheet_cell_aux); |
587 | psiconv_list_free_el(list,psiconv_free_sheet_cell_aux); |
583 | } |
588 | } |
584 | |
589 | |
585 | void psiconv_free_sheet_worksheet_section( |
590 | void psiconv_free_sheet_worksheet_aux (void *data) |
586 | psiconv_sheet_worksheet_section section) |
|
|
587 | { |
591 | { |
588 | if (section) { |
592 | psiconv_sheet_worksheet section = data; |
589 | psiconv_free_paragraph_layout(section->paragraph); |
593 | psiconv_free_sheet_cell_layout(section->default_layout); |
590 | psiconv_free_character_layout(section->character); |
|
|
591 | psiconv_free_numberformat(section->numberformat); |
|
|
592 | psiconv_free_sheet_cell_list(section->cells); |
594 | psiconv_free_sheet_cell_list(section->cells); |
|
|
595 | } |
|
|
596 | |
|
|
597 | void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet) |
|
|
598 | { |
|
|
599 | if (sheet) { |
|
|
600 | psiconv_free_sheet_worksheet_aux(sheet); |
593 | free(section); |
601 | free(sheet); |
594 | } |
602 | } |
|
|
603 | } |
|
|
604 | |
|
|
605 | void psiconv_free_sheet_worksheet_list(psiconv_sheet_worksheet_list list) |
|
|
606 | { |
|
|
607 | if (list) |
|
|
608 | psiconv_list_free_el(list,psiconv_free_sheet_worksheet_aux); |
595 | } |
609 | } |
596 | |
610 | |
597 | void psiconv_free_formula_aux(void *data) |
611 | void psiconv_free_formula_aux(void *data) |
598 | { |
612 | { |
599 | psiconv_formula formula; |
613 | psiconv_formula formula; |
… | |
… | |
629 | |
643 | |
630 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
644 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
631 | { |
645 | { |
632 | if (section) { |
646 | if (section) { |
633 | psiconv_free_formula_list(section->formulas); |
647 | psiconv_free_formula_list(section->formulas); |
634 | psiconv_free_sheet_worksheet_section(section->worksheet); |
648 | psiconv_free_sheet_worksheet_list(section->worksheets); |
635 | free(section); |
649 | free(section); |
636 | } |
650 | } |
637 | } |
651 | } |
638 | |
652 | |
639 | void psiconv_free_sheet_f(psiconv_sheet_f file) |
653 | void psiconv_free_sheet_f(psiconv_sheet_f file) |