… | |
… | |
1211 | int psiconv_parse_sheet_worksheet(const psiconv_buffer buf, int lev, |
1211 | int psiconv_parse_sheet_worksheet(const psiconv_buffer buf, int lev, |
1212 | psiconv_u32 off, int *length, |
1212 | psiconv_u32 off, int *length, |
1213 | psiconv_sheet_worksheet *result) |
1213 | psiconv_sheet_worksheet *result) |
1214 | { |
1214 | { |
1215 | int res=0; |
1215 | int res=0; |
1216 | psiconv_u32 temp,cells_off,grid_off,rows_off,cols_off; |
1216 | psiconv_u32 temp,cells_off,grid_off,rows_off,cols_off,unknown_off; |
1217 | int len=0; |
1217 | int len=0; |
1218 | int leng; |
1218 | int leng; |
1219 | |
1219 | |
1220 | psiconv_progress(lev+1,off,"Going to read the sheet worksheet section"); |
1220 | psiconv_progress(lev+1,off,"Going to read the sheet worksheet section"); |
1221 | if (!(*result = malloc(sizeof(**result)))) |
1221 | if (!(*result = malloc(sizeof(**result)))) |
… | |
… | |
1285 | psiconv_debug(lev+2,off+len,"Offset: %04x",grid_off); |
1285 | psiconv_debug(lev+2,off+len,"Offset: %04x",grid_off); |
1286 | len += 4; |
1286 | len += 4; |
1287 | |
1287 | |
1288 | psiconv_progress(lev+2,off+len, |
1288 | psiconv_progress(lev+2,off+len, |
1289 | "Going to read the offset of the 3rd ??? Section"); |
1289 | "Going to read the offset of the 3rd ??? Section"); |
1290 | temp = psiconv_read_u32(buf,lev+2,off+len,&res); |
1290 | unknown_off = psiconv_read_u32(buf,lev+2,off+len,&res); |
1291 | if (res) |
1291 | if (res) |
1292 | goto ERROR3; |
1292 | goto ERROR3; |
|
|
1293 | psiconv_debug(lev+2,off+len,"Offset: %04x",unknown_off); |
|
|
1294 | len += 4; |
|
|
1295 | |
|
|
1296 | psiconv_progress(lev+2,off+len, |
|
|
1297 | "Going to read a long of the 3rd ??? Section " |
|
|
1298 | "(%08x expected)",0x00); |
|
|
1299 | temp = psiconv_read_u32(buf,lev+2,unknown_off,&res); |
|
|
1300 | if (res) |
|
|
1301 | goto ERROR3; |
|
|
1302 | if (temp != 0x00) { |
|
|
1303 | psiconv_warn(lev+2,unknown_off, |
|
|
1304 | "Unknown worksheet subsection has unknown contents (ignored)"); |
1293 | psiconv_debug(lev+2,off+len,"Offset: %04x",temp); |
1305 | psiconv_debug(lev+2,unknown_off,"Offset: %04x",temp); |
|
|
1306 | } |
1294 | len += 4; |
1307 | len += 4; |
1295 | |
1308 | |
1296 | psiconv_progress(lev+2,off+len,"Going to read the row defaults"); |
1309 | psiconv_progress(lev+2,off+len,"Going to read the row defaults"); |
1297 | if ((res = psiconv_parse_sheet_line_list(buf,lev+2,rows_off,NULL, |
1310 | if ((res = psiconv_parse_sheet_line_list(buf,lev+2,rows_off,NULL, |
1298 | &(*result)->row_default_layouts, |
1311 | &(*result)->row_default_layouts, |