/[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 111 Revision 125
317 return ss->normal; 317 return ss->normal;
318 else 318 else
319 return psiconv_list_get(ss->styles,0xff - nr); 319 return psiconv_list_get(ss->styles,0xff - nr);
320} 320}
321 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
322void psiconv_free_color (psiconv_color color) 328void psiconv_free_color (psiconv_color color)
323{ 329{
324 if (color) 330 if (color)
325 free(color); 331 free(color);
326} 332}
561 psiconv_free_paragraph_layout(layout->paragraph); 567 psiconv_free_paragraph_layout(layout->paragraph);
562 psiconv_free_character_layout(layout->character); 568 psiconv_free_character_layout(layout->character);
563 psiconv_free_sheet_numberformat(layout->numberformat); 569 psiconv_free_sheet_numberformat(layout->numberformat);
564} 570}
565 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
566void psiconv_free_sheet_cell(psiconv_sheet_cell cell) 582void psiconv_free_sheet_cell(psiconv_sheet_cell cell)
567{ 583{
568 if (cell) { 584 if (cell) {
569 psiconv_free_sheet_cell_layout(cell->layout); 585 psiconv_free_sheet_cell_aux(cell);
570
571 if ((cell->type == psiconv_cell_string) && (cell->data.dat_string))
572 free(cell->data.dat_string);
573 free(cell); 586 free(cell);
574 } 587 }
575}
576
577void psiconv_free_sheet_cell_aux(void *data)
578{
579 psiconv_sheet_cell cell;
580 cell = data;
581 psiconv_free_sheet_cell(cell);
582} 588}
583 589
584void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) 590void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list)
585{ 591{
586 if (list) 592 if (list)
643 649
644void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) 650void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
645{ 651{
646 if (section) { 652 if (section) {
647 psiconv_free_formula_list(section->formulas); 653 psiconv_free_formula_list(section->formulas);
648 psiconv_free_sheet_worksheet_list(section->worksheets); 654 psiconv_free_sheet_worksheet_list(section->worksheets);
649 free(section); 655 free(section);
650 } 656 }
651} 657}
652 658
653void psiconv_free_sheet_f(psiconv_sheet_f file) 659void psiconv_free_sheet_f(psiconv_sheet_f file)

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

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