sc/workben/cache.py | 11 +++++++++++ 1 file changed, 11 insertions(+) New commits: commit 0e0f197fc76209282ad582cf79b6141346fc5cd2 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Aug 16 16:04:16 2017 +0200
handle formula cells also in the python script Change-Id: I8a68cbd68db89c3e30827fa449e18f6c13f4d6e0 Reviewed-on: https://gerrit.libreoffice.org/41220 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/sc/workben/cache.py b/sc/workben/cache.py index da2fe2e82290..ba96abe9758b 100644 --- a/sc/workben/cache.py +++ b/sc/workben/cache.py @@ -35,6 +35,17 @@ def parse_block(data, index): index += 4 vals[start_row + i] = data[index:index+str_length].decode("utf-8") index += str_length + elif block_type == 3: + # formula block + read_rows = 0 + while read_rows < data_size: + formula_group_size = struct.unpack('Q', data[index:index+8])[0] + index += 8 + str_length = struct.unpack('i', data[index:index+4])[0] + index += 4 + vals[start_row + read_rows] = (data[index:index+str_length].decode("utf-8"), "formula group length %i"% formula_group_size) + read_rows += formula_group_size + index += str_length return index, data_size, vals _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits