… | |
… | |
41 | static psiconv_page_header psiconv_empty_page_header(void); |
41 | static psiconv_page_header psiconv_empty_page_header(void); |
42 | static psiconv_page_layout_section psiconv_empty_page_layout_section(void); |
42 | static psiconv_page_layout_section psiconv_empty_page_layout_section(void); |
43 | static psiconv_word_status_section psiconv_empty_word_status_section(void); |
43 | static psiconv_word_status_section psiconv_empty_word_status_section(void); |
44 | static psiconv_word_f psiconv_empty_word_f(void); |
44 | static psiconv_word_f psiconv_empty_word_f(void); |
45 | static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void); |
45 | static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void); |
|
|
46 | static psiconv_sheet_workbook_section |
|
|
47 | psiconv_empty_sheet_workbook_section(void); |
46 | static psiconv_sheet_f psiconv_empty_sheet_f(void); |
48 | static psiconv_sheet_f psiconv_empty_sheet_f(void); |
47 | static psiconv_texted_f psiconv_empty_texted_f(void); |
49 | static psiconv_texted_f psiconv_empty_texted_f(void); |
48 | static psiconv_paint_data_section psiconv_empty_paint_data_section(void); |
50 | static psiconv_paint_data_section psiconv_empty_paint_data_section(void); |
49 | static psiconv_pictures psiconv_empty_pictures(void); |
51 | static psiconv_pictures psiconv_empty_pictures(void); |
50 | static psiconv_mbm_f psiconv_empty_mbm_f(void); |
52 | static psiconv_mbm_f psiconv_empty_mbm_f(void); |
… | |
… | |
542 | { |
544 | { |
543 | if (section) |
545 | if (section) |
544 | free(section); |
546 | free(section); |
545 | } |
547 | } |
546 | |
548 | |
|
|
549 | void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) |
|
|
550 | { |
|
|
551 | if (section) |
|
|
552 | free(section); |
|
|
553 | } |
|
|
554 | |
547 | void psiconv_free_sheet_f(psiconv_sheet_f file) |
555 | void psiconv_free_sheet_f(psiconv_sheet_f file) |
548 | { |
556 | { |
549 | if (file) { |
557 | if (file) { |
550 | psiconv_free_page_layout_section(file->page_sec); |
558 | psiconv_free_page_layout_section(file->page_sec); |
551 | psiconv_free_sheet_status_section(file->status_sec); |
559 | psiconv_free_sheet_status_section(file->status_sec); |
|
|
560 | psiconv_free_sheet_workbook_section(file->workbook_sec); |
552 | free(file); |
561 | free(file); |
553 | } |
562 | } |
554 | } |
563 | } |
555 | |
564 | |
556 | void psiconv_free_texted_f(psiconv_texted_f file) |
565 | void psiconv_free_texted_f(psiconv_texted_f file) |
… | |
… | |
953 | result->cursor_row = result->cursor_column = 0; |
962 | result->cursor_row = result->cursor_column = 0; |
954 | result->sheet_display_size = result->graph_display_size = 1000; |
963 | result->sheet_display_size = result->graph_display_size = 1000; |
955 | return result; |
964 | return result; |
956 | } |
965 | } |
957 | |
966 | |
|
|
967 | psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void) |
|
|
968 | { |
|
|
969 | psiconv_sheet_workbook_section result; |
|
|
970 | if (!(result = malloc(sizeof(*result)))) |
|
|
971 | return NULL; |
|
|
972 | return result; |
|
|
973 | } |
|
|
974 | |
958 | psiconv_sheet_f psiconv_empty_sheet_f(void) |
975 | psiconv_sheet_f psiconv_empty_sheet_f(void) |
959 | { |
976 | { |
960 | psiconv_sheet_f result; |
977 | psiconv_sheet_f result; |
961 | if (!(result = malloc(sizeof(*result)))) |
978 | if (!(result = malloc(sizeof(*result)))) |
962 | goto ERROR1; |
979 | goto ERROR1; |
963 | if (!(result->page_sec = psiconv_empty_page_layout_section())) |
980 | if (!(result->page_sec = psiconv_empty_page_layout_section())) |
964 | goto ERROR2; |
981 | goto ERROR2; |
965 | if (!(result->status_sec = psiconv_empty_sheet_status_section())) |
982 | if (!(result->status_sec = psiconv_empty_sheet_status_section())) |
966 | goto ERROR3; |
983 | goto ERROR3; |
|
|
984 | if (!(result->workbook_sec = psiconv_empty_sheet_workbook_section())) |
|
|
985 | goto ERROR4; |
967 | return result; |
986 | return result; |
|
|
987 | ERROR4: |
|
|
988 | psiconv_free_sheet_status_section(result->status_sec); |
968 | ERROR3: |
989 | ERROR3: |
969 | psiconv_free_page_layout_section(result->page_sec); |
990 | psiconv_free_page_layout_section(result->page_sec); |
970 | ERROR2: |
991 | ERROR2: |
971 | free(result); |
992 | free(result); |
972 | ERROR1: |
993 | ERROR1: |