xsheetjs/bits/71_wbcommon.js
SheetJS ab2ecebac9 version bump 0.8.3: BIFF2 read/write
- basic support for parsing BIFF2-4
- basic support for writing BIFF2
- cleaned up some bad substr uses for IE6 compatibility
- added flow type annotations for xlsx.flow.js
- added numerous null guards (fixes #255 h/t @martinheidegger)
- README cleanup (fixes #539 h/t @oliversalzburg)
- pin jszip to local version (closes #408 h/t @limouri)

bower issues:

|  id  | author            | comment                                   |
|-----:|:------------------|:------------------------------------------|
| #254 | @kkirsche         | fixes #254 by removing version from json  |
| #165 | @vincentcialdella | fixes #165 by changing default script     |
| #180 | @owencraig        | fixes #180 by using xlsx.core.min.js      |

format issues:

|  id  | author            | comment                                   |
|-----:|:------------------|:------------------------------------------|
| #271 | @morstaine        | fixes #271 by reworking related parse fns |
| #504 | @JanSchuermannPH  | fixes #504 detect FullPaths h/t @Mithgol  |
| #508 | @basma-emad       | fixes #508 offending file used `x:` NS    |
2017-02-10 11:23:29 -08:00

101 lines
2.5 KiB
JavaScript

/* 18.2.28 (CT_WorkbookProtection) Defaults */
var WBPropsDef = [
['allowRefreshQuery', '0'],
['autoCompressPictures', '1'],
['backupFile', '0'],
['checkCompatibility', '0'],
['codeName', ''],
['date1904', '0'],
['dateCompatibility', '1'],
//['defaultThemeVersion', '0'],
['filterPrivacy', '0'],
['hidePivotFieldList', '0'],
['promptedSolutions', '0'],
['publishItems', '0'],
['refreshAllConnections', false],
['saveExternalLinkValues', '1'],
['showBorderUnselectedTables', '1'],
['showInkAnnotation', '1'],
['showObjects', 'all'],
['showPivotChartFilter', '0']
//['updateLinks', 'userSet']
];
/* 18.2.30 (CT_BookView) Defaults */
var WBViewDef = [
['activeTab', '0'],
['autoFilterDateGrouping', '1'],
['firstSheet', '0'],
['minimized', '0'],
['showHorizontalScroll', '1'],
['showSheetTabs', '1'],
['showVerticalScroll', '1'],
['tabRatio', '600'],
['visibility', 'visible']
//window{Height,Width}, {x,y}Window
];
/* 18.2.19 (CT_Sheet) Defaults */
var SheetDef = [
['state', 'visible']
];
/* 18.2.2 (CT_CalcPr) Defaults */
var CalcPrDef = [
['calcCompleted', 'true'],
['calcMode', 'auto'],
['calcOnSave', 'true'],
['concurrentCalc', 'true'],
['fullCalcOnLoad', 'false'],
['fullPrecision', 'true'],
['iterate', 'false'],
['iterateCount', '100'],
['iterateDelta', '0.001'],
['refMode', 'A1']
];
/* 18.2.3 (CT_CustomWorkbookView) Defaults */
var CustomWBViewDef = [
['autoUpdate', 'false'],
['changesSavedWin', 'false'],
['includeHiddenRowCol', 'true'],
['includePrintSettings', 'true'],
['maximized', 'false'],
['minimized', 'false'],
['onlySync', 'false'],
['personalView', 'false'],
['showComments', 'commIndicator'],
['showFormulaBar', 'true'],
['showHorizontalScroll', 'true'],
['showObjects', 'all'],
['showSheetTabs', 'true'],
['showStatusbar', 'true'],
['showVerticalScroll', 'true'],
['tabRatio', '600'],
['xWindow', '0'],
['yWindow', '0']
];
function push_defaults_array(target, defaults) {
for(var j = 0; j != target.length; ++j) { var w = target[j];
for(var i=0; i != defaults.length; ++i) { var z = defaults[i];
if(w[z[0]] == null) w[z[0]] = z[1];
}
}
}
function push_defaults(target, defaults) {
for(var i = 0; i != defaults.length; ++i) { var z = defaults[i];
if(target[z[0]] == null) target[z[0]] = z[1];
}
}
function parse_wb_defaults(wb) {
push_defaults(wb.WBProps, WBPropsDef);
push_defaults(wb.CalcPr, CalcPrDef);
push_defaults_array(wb.WBView, WBViewDef);
push_defaults_array(wb.Sheets, SheetDef);
_ssfopts.date1904 = parsexmlbool(wb.WBProps.date1904, 'date1904');
}