[Libreoffice-commits] core.git: sc/workben

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Aug 16 16:11:58 UTC 2017


 sc/workben/cache.py |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 0e0f197fc76209282ad582cf79b6141346fc5cd2
Author: Markus Mohrhard <markus.mohrhard at 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.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Jenkins <ci at 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
 


More information about the Libreoffice-commits mailing list