| … | |
… | |
| 42 | psiconv_u32 layout_id; |
42 | psiconv_u32 layout_id; |
| 43 | |
43 | |
| 44 | psiconv_progress(config,lev,0,"Writing texted section"); |
44 | psiconv_progress(config,lev,0,"Writing texted section"); |
| 45 | |
45 | |
| 46 | if (!value) { |
46 | if (!value) { |
| 47 | psiconv_error(config,0,psiconv_buffer_length(buf),"Null TextEd section"); |
47 | psiconv_error(config,lev,0,"Null TextEd section"); |
| 48 | res = -PSICONV_E_GENERATE; |
48 | res = -PSICONV_E_GENERATE; |
| 49 | goto ERROR1; |
49 | goto ERROR1; |
| 50 | } |
50 | } |
| 51 | |
51 | |
| 52 | if (!(*extra_buf = psiconv_buffer_new())) { |
52 | if (!(*extra_buf = psiconv_buffer_new())) { |
| … | |
… | |
| 88 | } |
88 | } |
| 89 | |
89 | |
| 90 | if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_TEXT))) |
90 | if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_TEXT))) |
| 91 | goto ERROR2; |
91 | goto ERROR2; |
| 92 | |
92 | |
| 93 | return psiconv_write_text_section(config,buf,lev+1,value->paragraphs); |
93 | if ((res = psiconv_write_text_section(config,buf,lev+1,value->paragraphs))) |
|
|
94 | goto ERROR2; |
|
|
95 | psiconv_progress(config,lev,0,"End of texted section"); |
|
|
96 | return 0; |
| 94 | |
97 | |
| 95 | ERROR2: |
98 | ERROR2: |
| 96 | psiconv_buffer_free(*extra_buf); |
99 | psiconv_buffer_free(*extra_buf); |
| 97 | ERROR1: |
100 | ERROR1: |
|
|
101 | psiconv_error(config,lev,0,"Writing of texted section failed"); |
| 98 | return res; |
102 | return res; |
| 99 | } |
103 | } |