/[public]/psiconv/trunk/lib/psiconv/data.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 128 Revision 134
34static void psiconv_free_paragraph_aux(void * paragraph); 34static void psiconv_free_paragraph_aux(void * paragraph);
35static void psiconv_free_paint_data_section_aux(void * section); 35static void psiconv_free_paint_data_section_aux(void * section);
36static void psiconv_free_clipart_section_aux(void * section); 36static void psiconv_free_clipart_section_aux(void * section);
37static void psiconv_free_formula_aux(void *data); 37static void psiconv_free_formula_aux(void *data);
38static void psiconv_free_sheet_worksheet_aux (void *data); 38static void psiconv_free_sheet_worksheet_aux (void *data);
39static void psiconv_free_sheet_variable_aux(void * variable);
39 40
40static psiconv_word_styles_section psiconv_empty_word_styles_section(void); 41static psiconv_word_styles_section psiconv_empty_word_styles_section(void);
41static psiconv_text_and_layout psiconv_empty_text_and_layout(void); 42static psiconv_text_and_layout psiconv_empty_text_and_layout(void);
42static psiconv_texted_section psiconv_empty_texted_section(void); 43static psiconv_texted_section psiconv_empty_texted_section(void);
43static psiconv_page_header psiconv_empty_page_header(void); 44static psiconv_page_header psiconv_empty_page_header(void);
628 psiconv_free_sheet_line_aux(line); 629 psiconv_free_sheet_line_aux(line);
629 free(line); 630 free(line);
630 } 631 }
631} 632}
632 633
634
633void psiconv_free_sheet_line_list(psiconv_sheet_line_list list) 635void psiconv_free_sheet_line_list(psiconv_sheet_line_list list)
634{ 636{
635 if (list) 637 if (list)
636 psiconv_list_free_el(list,psiconv_free_sheet_line_aux); 638 psiconv_list_free_el(list,psiconv_free_sheet_line_aux);
639}
640
641void psiconv_free_sheet_grid_break_list(psiconv_sheet_grid_break_list list)
642{
643 if (list)
644 psiconv_list_free(list);
645}
646
647void psiconv_free_sheet_grid_size(psiconv_sheet_grid_size s)
648{
649 if (s)
650 free(s);
651}
652
653void psiconv_free_sheet_grid_size_list(psiconv_sheet_grid_size_list list)
654{
655 if (list)
656 psiconv_list_free(list);
657}
658
659void psiconv_free_sheet_grid_section(psiconv_sheet_grid_section sec)
660{
661 if (sec) {
662 psiconv_free_sheet_grid_size_list(sec->row_heights);
663 psiconv_free_sheet_grid_size_list(sec->column_heights);
664 psiconv_free_sheet_grid_break_list(sec->row_page_breaks);
665 psiconv_free_sheet_grid_break_list(sec->column_page_breaks);
666 free(sec);
667 }
637} 668}
638 669
639void psiconv_free_sheet_worksheet_aux (void *data) 670void psiconv_free_sheet_worksheet_aux (void *data)
640{ 671{
641 psiconv_sheet_worksheet section = data; 672 psiconv_sheet_worksheet section = data;
642 psiconv_free_sheet_cell_layout(section->default_layout); 673 psiconv_free_sheet_cell_layout(section->default_layout);
643 psiconv_free_sheet_cell_list(section->cells); 674 psiconv_free_sheet_cell_list(section->cells);
644 psiconv_free_sheet_line_list(section->row_default_layouts); 675 psiconv_free_sheet_line_list(section->row_default_layouts);
645 psiconv_free_sheet_line_list(section->col_default_layouts); 676 psiconv_free_sheet_line_list(section->col_default_layouts);
677 psiconv_free_sheet_grid_section(section->grid);
646} 678}
647 679
648void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet) 680void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet)
649{ 681{
650 if (sheet) { 682 if (sheet) {
690{ 722{
691 if (list) 723 if (list)
692 psiconv_list_free_el(list,psiconv_free_formula_aux); 724 psiconv_list_free_el(list,psiconv_free_formula_aux);
693} 725}
694 726
727void psiconv_free_sheet_name_section(psiconv_sheet_name_section section)
728{
729 if (section) {
730 if(section->name)
731 free(section->name);
732 free(section);
733 }
734}
735
736void psiconv_free_sheet_info_section(psiconv_sheet_info_section section)
737{
738 if (section) {
739 free(section);
740 }
741}
742
743void psiconv_free_sheet_variable_aux(void * variable)
744{
745 psiconv_sheet_variable var = variable;
746 if (var->name)
747 free(var->name);
748 if (var->type == psiconv_var_string)
749 free(var->data.dat_string);
750}
751
752void psiconv_free_sheet_variable(psiconv_sheet_variable var)
753{
754 if (var) {
755 psiconv_free_sheet_variable_aux(var);
756 free(var);
757 }
758}
759
760void psiconv_free_sheet_variable_list(psiconv_sheet_variable_list list)
761{
762 if (list)
763 psiconv_list_free_el(list,psiconv_free_sheet_variable_aux);
764}
765
695void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) 766void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
696{ 767{
697 if (section) { 768 if (section) {
698 psiconv_free_formula_list(section->formulas); 769 psiconv_free_formula_list(section->formulas);
699 psiconv_free_sheet_worksheet_list(section->worksheets); 770 psiconv_free_sheet_worksheet_list(section->worksheets);
771 psiconv_free_sheet_name_section(section->name);
772 psiconv_free_sheet_info_section(section->info);
773 psiconv_free_sheet_variable_list(section->variables);
700 free(section); 774 free(section);
701 } 775 }
702} 776}
703 777
704void psiconv_free_sheet_f(psiconv_sheet_f file) 778void psiconv_free_sheet_f(psiconv_sheet_f file)

Legend:
Removed from v.128  
changed lines
  Added in v.134

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26