2014-01-28 16:38:02 +00:00
|
|
|
/* 18.2.28 (CT_WorkbookProtection) Defaults */
|
2014-06-29 18:29:45 +00:00
|
|
|
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']
|
|
|
|
];
|
2014-01-28 16:38:02 +00:00
|
|
|
|
|
|
|
/* 18.2.30 (CT_BookView) Defaults */
|
2014-06-29 18:29:45 +00:00
|
|
|
var WBViewDef = [
|
|
|
|
['activeTab', '0'],
|
|
|
|
['autoFilterDateGrouping', '1'],
|
|
|
|
['firstSheet', '0'],
|
|
|
|
['minimized', '0'],
|
|
|
|
['showHorizontalScroll', '1'],
|
|
|
|
['showSheetTabs', '1'],
|
|
|
|
['showVerticalScroll', '1'],
|
|
|
|
['tabRatio', '600'],
|
|
|
|
['visibility', 'visible']
|
2014-01-28 16:38:02 +00:00
|
|
|
//window{Height,Width}, {x,y}Window
|
2014-06-29 18:29:45 +00:00
|
|
|
];
|
2014-01-28 16:38:02 +00:00
|
|
|
|
|
|
|
/* 18.2.19 (CT_Sheet) Defaults */
|
2014-06-29 18:29:45 +00:00
|
|
|
var SheetDef = [
|
|
|
|
['state', 'visible']
|
|
|
|
];
|
2014-01-28 16:38:02 +00:00
|
|
|
|
|
|
|
/* 18.2.2 (CT_CalcPr) Defaults */
|
2014-06-29 18:29:45 +00:00
|
|
|
var CalcPrDef = [
|
|
|
|
['calcCompleted', 'true'],
|
|
|
|
['calcMode', 'auto'],
|
|
|
|
['calcOnSave', 'true'],
|
|
|
|
['concurrentCalc', 'true'],
|
|
|
|
['fullCalcOnLoad', 'false'],
|
|
|
|
['fullPrecision', 'true'],
|
|
|
|
['iterate', 'false'],
|
|
|
|
['iterateCount', '100'],
|
|
|
|
['iterateDelta', '0.001'],
|
|
|
|
['refMode', 'A1']
|
|
|
|
];
|
2014-01-28 16:38:02 +00:00
|
|
|
|
|
|
|
/* 18.2.3 (CT_CustomWorkbookView) Defaults */
|
2014-06-29 18:29:45 +00:00
|
|
|
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');
|
|
|
|
}
|