Skip to content

Commit

Permalink
Merge 4deab40 into 61b17e6
Browse files Browse the repository at this point in the history
  • Loading branch information
paulish committed Mar 4, 2015
2 parents 61b17e6 + 4deab40 commit f187f03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bits/45_styutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ function find_mdw(collw, coll) {
if(MDW === MAX_MDW) MDW = DEF_MDW;
}
}

function px2pt(px) { return px * 72 / 96; }
14 changes: 13 additions & 1 deletion bits/67_wsxml.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,19 @@ function write_ws_xml_data(ws, opts, idx, wb) {
if(ws[ref] === undefined) continue;
if((cell = write_ws_xml_cell(ws[ref], ref, ws, opts, idx, wb)) != null) r.push(cell);
}
if(r.length > 0) o[o.length] = (writextag('row', r.join(""), {r:rr}));
if(r.length > 0) {
// 18.3.1.73 row
var params = {r:rr};
if(typeof ws['!rows'] !== 'undefined' && ws['!rows'].length > R) {
var row = ws['!rows'][R];
if (row.hidden) params.hidden = 1;
var height = -1;
if (row.hpx) height = px2pt(row.hpx);
else if (row.hpt) height = row.hpt;
if (height > -1) { params.ht = height; params.customHeight = 1; }
};
o[o.length] = (writextag('row', r.join(""), params));
}
}
return o.join("");
}
Expand Down

0 comments on commit f187f03

Please sign in to comment.