Skip to content

Commit

Permalink
version bump 0.2.9-a: engineering formulae
Browse files Browse the repository at this point in the history
  • Loading branch information
SheetJSDev committed Apr 29, 2013
1 parent 9da884c commit cb8782a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .npmignore
@@ -0,0 +1 @@
test_files/
8 changes: 4 additions & 4 deletions bits/68_fparse.js
Expand Up @@ -6,17 +6,17 @@ function parse_Formula(blob, length) {
blob.read_shift(1);
var chn = blob.read_shift(4);
var cbf = parse_CellParsedFormula(blob, length-20);
return {cell:cell, val:val, formula:cbf};
return {cell:cell, val:val, formula:cbf, shared: (flags >> 3) & 1};
}

/* 2.5.133 */
function parse_FormulaValue(blob) {
var b;
if(blob.readUInt16LE(blob.l + 6) !== 0xFFFF) return parse_Xnum(blob);
switch(blob[blob.l+2]) {
switch(blob[blob.l]) {
case 0x00: blob.l += 8; return "String";
case 0x01: b = blob[blob.l+2] === 0x1; blob.l += 8; return b;
case 0x02: b = BERR[blob.l+2]; blob.l += 8; return b;
case 0x02: b = BERR[blob[blob.l+2]]; blob.l += 8; return b;
case 0x03: blob.l += 8; return "";
}
}
Expand Down Expand Up @@ -52,8 +52,8 @@ function parse_NameParsedFormula(blob, length, cce) {
function parse_CellParsedFormula(blob, length) {
var target = blob.l + length;
var rgcb, cce = blob.read_shift(2); // length of rgce
var rgce = parse_Rgce(blob, cce);
if(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];
var rgce = parse_Rgce(blob, cce);
if(length !== cce + 2) rgcb = parse_RgbExtra(blob, length - cce - 2, rgce);
return [rgce, rgcb];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "xlsjs",
"version": "0.2.9",
"version": "0.2.9-a",
"author": "Niggler",
"description": "(one day) a full-featured XLS parser and writer. For now, primitive parser",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion test_files
8 changes: 4 additions & 4 deletions xls.js
Expand Up @@ -2094,17 +2094,17 @@ function parse_Formula(blob, length) {
blob.read_shift(1);
var chn = blob.read_shift(4);
var cbf = parse_CellParsedFormula(blob, length-20);
return {cell:cell, val:val, formula:cbf};
return {cell:cell, val:val, formula:cbf, shared: (flags >> 3) & 1};
}

/* 2.5.133 */
function parse_FormulaValue(blob) {
var b;
if(blob.readUInt16LE(blob.l + 6) !== 0xFFFF) return parse_Xnum(blob);
switch(blob[blob.l+2]) {
switch(blob[blob.l]) {
case 0x00: blob.l += 8; return "String";
case 0x01: b = blob[blob.l+2] === 0x1; blob.l += 8; return b;
case 0x02: b = BERR[blob.l+2]; blob.l += 8; return b;
case 0x02: b = BERR[blob[blob.l+2]]; blob.l += 8; return b;
case 0x03: blob.l += 8; return "";
}
}
Expand Down Expand Up @@ -2140,8 +2140,8 @@ function parse_NameParsedFormula(blob, length, cce) {
function parse_CellParsedFormula(blob, length) {
var target = blob.l + length;
var rgcb, cce = blob.read_shift(2); // length of rgce
var rgce = parse_Rgce(blob, cce);
if(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];
var rgce = parse_Rgce(blob, cce);
if(length !== cce + 2) rgcb = parse_RgbExtra(blob, length - cce - 2, rgce);
return [rgce, rgcb];
}
Expand Down

0 comments on commit cb8782a

Please sign in to comment.