/[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 98 Revision 104
32static void psiconv_free_style_aux(void *style); 32static void psiconv_free_style_aux(void *style);
33static void psiconv_free_in_line_layout_aux(void * layout); 33static void psiconv_free_in_line_layout_aux(void * layout);
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);
37 38
38static psiconv_word_styles_section psiconv_empty_word_styles_section(void); 39static psiconv_word_styles_section psiconv_empty_word_styles_section(void);
39static psiconv_text_and_layout psiconv_empty_text_and_layout(void); 40static psiconv_text_and_layout psiconv_empty_text_and_layout(void);
40static psiconv_texted_section psiconv_empty_texted_section(void); 41static psiconv_texted_section psiconv_empty_texted_section(void);
41static psiconv_page_header psiconv_empty_page_header(void); 42static psiconv_page_header psiconv_empty_page_header(void);
150 0.0, /* space_below */ 151 0.0, /* space_below */
151 psiconv_bool_false, /* keep_together */ 152 psiconv_bool_false, /* keep_together */
152 psiconv_bool_false, /* keep_with_next */ 153 psiconv_bool_false, /* keep_with_next */
153 psiconv_bool_false, /* on_next_page */ 154 psiconv_bool_false, /* on_next_page */
154 psiconv_bool_false, /* no_widow_protection */ 155 psiconv_bool_false, /* no_widow_protection */
156 psiconv_bool_false, /* wrap_to_fit_cell */
155 0.0, /* left_margin */ 157 0.0, /* left_margin */
156 &bullet, /* bullet */ 158 &bullet, /* bullet */
157 &no_border, /* left_border */ 159 &no_border, /* left_border */
158 &no_border, /* right_border */ 160 &no_border, /* right_border */
159 &no_border, /* top_border */ 161 &no_border, /* top_border */
545{ 547{
546 if (section) 548 if (section)
547 free(section); 549 free(section);
548} 550}
549 551
550/* TODO: Free sublists, strings etc. depending on formula->type */ 552void psiconv_free_formula_aux(void *data)
553{
554 psiconv_formula formula;
555 formula = data;
556 if (formula->type == psiconv_formula_dat_string)
557 free(formula->data.dat_string);
558 else if ((formula->type != psiconv_formula_dat_int) &&
559 (formula->type != psiconv_formula_dat_var) &&
560 (formula->type != psiconv_formula_dat_float) &&
561 (formula->type != psiconv_formula_dat_cellref) &&
562 (formula->type != psiconv_formula_dat_cellblock) &&
563 (formula->type != psiconv_formula_dat_vcellblock) &&
564 (formula->type != psiconv_formula_mark_opsep) &&
565 (formula->type != psiconv_formula_mark_opend) &&
566 (formula->type != psiconv_formula_mark_eof) &&
567 (formula->type != psiconv_formula_unknown))
568 psiconv_free_formula_list(formula->data.fun_operands);
569}
570
551void psiconv_free_formula(psiconv_formula formula) 571void psiconv_free_formula(psiconv_formula formula)
552{ 572{
553 if (formula) 573 if (formula) {
574 psiconv_free_formula_aux(formula);
554 free(formula); 575 free(formula);
576 }
555} 577}
556 578
557void psiconv_free_formula_list(psiconv_formula_list list) 579void psiconv_free_formula_list(psiconv_formula_list list)
558{ 580{
559 if (list) 581 if (list)
560 psiconv_list_free(list); 582 psiconv_list_free_el(list,psiconv_free_formula_aux);
561} 583}
562 584
563void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) 585void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
564{ 586{
565 if (section) { 587 if (section) {

Legend:
Removed from v.98  
changed lines
  Added in v.104

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