… | |
… | |
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 | |
|
|
322 | psiconv_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 | |
322 | void psiconv_free_color (psiconv_color color) |
328 | void 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 | |
|
|
572 | void 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 | |
566 | void psiconv_free_sheet_cell(psiconv_sheet_cell cell) |
582 | void 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 | |
|
|
577 | void 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 | |
584 | void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) |
590 | void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) |
585 | { |
591 | { |
586 | if (list) |
592 | if (list) |
… | |
… | |
643 | |
649 | |
644 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
650 | void 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 | |
653 | void psiconv_free_sheet_f(psiconv_sheet_f file) |
659 | void psiconv_free_sheet_f(psiconv_sheet_f file) |