summaryrefslogtreecommitdiff
path: root/sc/workben/cache.py
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-16 16:04:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-16 18:10:18 +0200
commit0e0f197fc76209282ad582cf79b6141346fc5cd2 (patch)
tree09214d75e8ad51d6441741c8ec63c36209dbe9f9 /sc/workben/cache.py
parentb06c374a3f2acbd1412bb195fc424ff3ce64d8b2 (diff)
handle formula cells also in the python script
Change-Id: I8a68cbd68db89c3e30827fa449e18f6c13f4d6e0 Reviewed-on: https://gerrit.libreoffice.org/41220 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/workben/cache.py')
-rw-r--r--sc/workben/cache.py11
1 files changed, 11 insertions, 0 deletions
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