… | |
… | |
824 | int res=0; |
824 | int res=0; |
825 | int len=0; |
825 | int len=0; |
826 | psiconv_u32 temp; |
826 | psiconv_u32 temp; |
827 | psiconv_bool_t has_layout; |
827 | psiconv_bool_t has_layout; |
828 | int leng; |
828 | int leng; |
|
|
829 | char *auxstr; |
829 | |
830 | |
830 | psiconv_progress(config,lev+1,off,"Going to read a sheet cell structure"); |
831 | psiconv_progress(config,lev+1,off,"Going to read a sheet cell structure"); |
831 | if (!(*result = malloc(sizeof(**result)))) |
832 | if (!(*result = malloc(sizeof(**result)))) |
832 | goto ERROR1; |
833 | goto ERROR1; |
833 | |
834 | |
… | |
… | |
925 | psiconv_progress(config,lev+2,off+len,"Going to read a string"); |
926 | psiconv_progress(config,lev+2,off+len,"Going to read a string"); |
926 | (*result)->data.dat_string = |
927 | (*result)->data.dat_string = |
927 | psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); |
928 | psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); |
928 | if (res) |
929 | if (res) |
929 | goto ERROR2; |
930 | goto ERROR2; |
|
|
931 | if (!(auxstr = psiconv_make_printable((*result)->data.dat_string))) |
|
|
932 | goto ERROR2; |
930 | psiconv_debug(config,lev+2,off+len,"Cell contents: `%s'", |
933 | psiconv_debug(config,lev+2,off+len,"Cell contents: `%s'",auxstr); |
931 | (*result)->data.dat_string); |
934 | free(auxstr); |
932 | len += leng; |
935 | len += leng; |
933 | } else { |
936 | } else { |
934 | psiconv_warn(config,lev+2,off+len,"Unknown Sheet Cell type: %02x",(*result)->type); |
937 | psiconv_warn(config,lev+2,off+len,"Unknown Sheet Cell type: %02x",(*result)->type); |
935 | res = PSICONV_E_PARSE; |
938 | res = PSICONV_E_PARSE; |
936 | goto ERROR2; |
939 | goto ERROR2; |
… | |
… | |
1545 | psiconv_debug(config,lev+2,off+len,"Value: %f",(*result)->data.dat_float); |
1548 | psiconv_debug(config,lev+2,off+len,"Value: %f",(*result)->data.dat_float); |
1546 | len += leng; |
1549 | len += leng; |
1547 | } else if (marker == 0x02) { |
1550 | } else if (marker == 0x02) { |
1548 | (*result)->type = psiconv_var_string; |
1551 | (*result)->type = psiconv_var_string; |
1549 | psiconv_progress(config,lev+2,off+len,"Going to read a string"); |
1552 | psiconv_progress(config,lev+2,off+len,"Going to read a string"); |
1550 | (*result)->data.dat_string = psiconv_read_string(config,buf,lev+2,off+len,&leng, |
1553 | (*result)->data.dat_string = psiconv_read_string(config,buf,lev+2,off+len, |
1551 | &res); |
1554 | &leng, &res); |
1552 | if (res) |
1555 | if (res) |
1553 | goto ERROR3; |
1556 | goto ERROR3; |
1554 | len += leng; |
1557 | len += leng; |
1555 | } else if (marker == 0x03) { |
1558 | } else if (marker == 0x03) { |
1556 | (*result)->type = psiconv_var_cellref; |
1559 | (*result)->type = psiconv_var_cellref; |