https://bugs.freedesktop.org/show_bug.cgi?id=55786
Thomas Kluyver <tho...@kluyver.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tho...@kluyver.me.uk --- Comment #13 from Thomas Kluyver <tho...@kluyver.me.uk> --- I had to spend a while digging into an old WK4 file to extract some data. I thought I'd document my main finding here: opcode 0x17 appears to be a 10-byte extended precision float. After the record header, there is a two byte row number, one byte sheet number, and one byte column number. These are common to a few record types. The remainder of it is the value, in the format described here: http://en.wikipedia.org/wiki/Extended_precision#x86_Extended_Precision_Format I was able to extract these, at least for the small positive numbers in my sample, using the following Python code: a = int.from_bytes(r.data[-2:], 'little') sign = -1 if (a & (1<<15)) else 1 e = a - (a & (1 << 15)) - 16383 m = int.from_bytes(r.data[4:-2], 'little') val = m / (1<<(63-e)) 0x16 is a label, with the same row/sheet/column fields. I started looking into making a patch, but I got confused because there appear to be opcode lookup tables both in optab.cxx and as switch statements in lotread.cxx, with different opcodes in them. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice