2014-03-29 22:53:15 +00:00
|
|
|
/* [MS-XLSB] 2.6.4.1 */
|
2014-06-29 18:29:45 +00:00
|
|
|
function parse_BrtCalcChainItem$(data, length) {
|
2014-03-29 22:53:15 +00:00
|
|
|
var out = {};
|
|
|
|
out.i = data.read_shift(4);
|
|
|
|
var cell = {};
|
|
|
|
cell.r = data.read_shift(4);
|
|
|
|
cell.c = data.read_shift(4);
|
|
|
|
out.r = encode_cell(cell);
|
|
|
|
var flags = data.read_shift(1);
|
|
|
|
if(flags & 0x2) out.l = '1';
|
|
|
|
if(flags & 0x8) out.a = '1';
|
|
|
|
return out;
|
2014-06-29 18:29:45 +00:00
|
|
|
}
|
2014-03-29 22:53:15 +00:00
|
|
|
|
|
|
|
/* 18.6 Calculation Chain */
|
|
|
|
function parse_cc_bin(data, opts) {
|
|
|
|
var out = [];
|
|
|
|
var pass = false;
|
2014-06-29 18:29:45 +00:00
|
|
|
recordhopper(data, function hopper_cc(val, R, RT) {
|
2014-03-29 22:53:15 +00:00
|
|
|
switch(R.n) {
|
|
|
|
case 'BrtCalcChainItem$': out.push(val); break;
|
|
|
|
case 'BrtBeginCalcChain$': break;
|
|
|
|
case 'BrtEndCalcChain$': break;
|
|
|
|
default: if(!pass || opts.WTF) throw new Error("Unexpected record " + RT + " " + R.n);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return out;
|
|
|
|
}
|
2014-05-29 22:30:03 +00:00
|
|
|
|
|
|
|
function write_cc_bin(data, opts) { }
|