/[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 99 Revision 125
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); 37static void psiconv_free_formula_aux(void *data);
38static void psiconv_free_sheet_worksheet_aux (void *data);
38 39
39static psiconv_word_styles_section psiconv_empty_word_styles_section(void); 40static psiconv_word_styles_section psiconv_empty_word_styles_section(void);
40static psiconv_text_and_layout psiconv_empty_text_and_layout(void); 41static psiconv_text_and_layout psiconv_empty_text_and_layout(void);
41static psiconv_texted_section psiconv_empty_texted_section(void); 42static psiconv_texted_section psiconv_empty_texted_section(void);
42static psiconv_page_header psiconv_empty_page_header(void); 43static psiconv_page_header psiconv_empty_page_header(void);
151 0.0, /* space_below */ 152 0.0, /* space_below */
152 psiconv_bool_false, /* keep_together */ 153 psiconv_bool_false, /* keep_together */
153 psiconv_bool_false, /* keep_with_next */ 154 psiconv_bool_false, /* keep_with_next */
154 psiconv_bool_false, /* on_next_page */ 155 psiconv_bool_false, /* on_next_page */
155 psiconv_bool_false, /* no_widow_protection */ 156 psiconv_bool_false, /* no_widow_protection */
157 psiconv_bool_false, /* wrap_to_fit_cell */
156 0.0, /* left_margin */ 158 0.0, /* left_margin */
157 &bullet, /* bullet */ 159 &bullet, /* bullet */
158 &no_border, /* left_border */ 160 &no_border, /* left_border */
159 &no_border, /* right_border */ 161 &no_border, /* right_border */
160 &no_border, /* top_border */ 162 &no_border, /* top_border */
315 return ss->normal; 317 return ss->normal;
316 else 318 else
317 return psiconv_list_get(ss->styles,0xff - nr); 319 return psiconv_list_get(ss->styles,0xff - nr);
318} 320}
319 321
322psiconv_formula psiconv_get_formula (psiconv_formula_list ss, int nr)
323{
324 return psiconv_list_get(ss,psiconv_list_length(ss)-nr-1);
325}
326
327
320void psiconv_free_color (psiconv_color color) 328void psiconv_free_color (psiconv_color color)
321{ 329{
322 if (color) 330 if (color)
323 free(color); 331 free(color);
324} 332}
544 552
545void psiconv_free_sheet_status_section(psiconv_sheet_status_section section) 553void psiconv_free_sheet_status_section(psiconv_sheet_status_section section)
546{ 554{
547 if (section) 555 if (section)
548 free(section); 556 free(section);
557}
558
559void psiconv_free_sheet_numberformat(psiconv_sheet_numberformat numberformat)
560{
561 if (numberformat)
562 free(numberformat);
563}
564
565void psiconv_free_sheet_cell_layout(psiconv_sheet_cell_layout layout)
566{
567 psiconv_free_paragraph_layout(layout->paragraph);
568 psiconv_free_character_layout(layout->character);
569 psiconv_free_sheet_numberformat(layout->numberformat);
570}
571
572void psiconv_free_sheet_cell_aux(void *cell)
573{
574 psiconv_sheet_cell data = cell;
575
576 psiconv_free_sheet_cell_layout(data->layout);
577
578 if ((data->type == psiconv_cell_string) && (data->data.dat_string))
579 free(data->data.dat_string);
580}
581
582void psiconv_free_sheet_cell(psiconv_sheet_cell cell)
583{
584 if (cell) {
585 psiconv_free_sheet_cell_aux(cell);
586 free(cell);
587 }
588}
589
590void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list)
591{
592 if (list)
593 psiconv_list_free_el(list,psiconv_free_sheet_cell_aux);
594}
595
596void psiconv_free_sheet_worksheet_aux (void *data)
597{
598 psiconv_sheet_worksheet section = data;
599 psiconv_free_sheet_cell_layout(section->default_layout);
600 psiconv_free_sheet_cell_list(section->cells);
601}
602
603void psiconv_free_sheet_worksheet(psiconv_sheet_worksheet sheet)
604{
605 if (sheet) {
606 psiconv_free_sheet_worksheet_aux(sheet);
607 free(sheet);
608 }
609}
610
611void psiconv_free_sheet_worksheet_list(psiconv_sheet_worksheet_list list)
612{
613 if (list)
614 psiconv_list_free_el(list,psiconv_free_sheet_worksheet_aux);
549} 615}
550 616
551void psiconv_free_formula_aux(void *data) 617void psiconv_free_formula_aux(void *data)
552{ 618{
553 psiconv_formula formula; 619 psiconv_formula formula;
583 649
584void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) 650void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
585{ 651{
586 if (section) { 652 if (section) {
587 psiconv_free_formula_list(section->formulas); 653 psiconv_free_formula_list(section->formulas);
654 psiconv_free_sheet_worksheet_list(section->worksheets);
588 free(section); 655 free(section);
589 } 656 }
590} 657}
591 658
592void psiconv_free_sheet_f(psiconv_sheet_f file) 659void psiconv_free_sheet_f(psiconv_sheet_f file)

Legend:
Removed from v.99  
changed lines
  Added in v.125

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