Commit dbb7855c authored by Alexander.Trofimov's avatar Alexander.Trofimov

cell/model/FormulaObjects/lookupandreferenceFunctions to function-closure

parent b0c25348
"use strict";
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function (window, undefined) {
function _getRowTitle( row ) {
return "" + (row + 1);
}
......@@ -293,8 +299,6 @@ function cGETPIVOTDATA() {
cGETPIVOTDATA.prototype = Object.create( cBaseFunction.prototype );
var g_oHLOOKUPCache = new VHLOOKUPCache( true );
function cHLOOKUP() {
// cBaseFunction.call( this, "HLOOKUP" );
// this.setArgumentsMin( 3 );
......@@ -1371,7 +1375,6 @@ VHLOOKUPCache.prototype.clean = function () {
this.cacheId = {};
this.cacheRanges = {};
};
var g_oVLOOKUPCache = new VHLOOKUPCache( false );
function cVLOOKUP() {
// cBaseFunction.call( this, "VLOOKUP" );
......@@ -1611,3 +1614,12 @@ cVLOOKUP.prototype.getInfo = function () {
args:"( lookup-value , table-array , col-index-num [ , [ range-lookup-flag ] ] )"
};
};
var g_oVLOOKUPCache = new VHLOOKUPCache( false );
var g_oHLOOKUPCache = new VHLOOKUPCache( true );
//----------------------------------------------------------export----------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window['AscCommonExcel'].g_oVLOOKUPCache = g_oVLOOKUPCache;
window['AscCommonExcel'].g_oHLOOKUPCache = g_oHLOOKUPCache;
})(window);
......@@ -1828,8 +1828,8 @@ function sortDependency( wb, setCellFormat ) {
for (i in oCleanCellCacheArea)
wb.handlers.trigger("cleanCellCache", i, oCleanCellCacheArea[i], AscCommonExcel.c_oAscCanChangeColWidth.numbers);
g_oVLOOKUPCache.clean();
g_oHLOOKUPCache.clean();
AscCommonExcel.g_oVLOOKUPCache.clean();
AscCommonExcel.g_oHLOOKUPCache.clean();
}
wb.needRecalc = {nodes: {}, length:0};
}
......@@ -5162,8 +5162,8 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad,setCellFormat){
__cell.oValue.type = CellValueType.String;
__cell.oValue.text = res.getValue().toString();
}
g_oVLOOKUPCache.remove(__cell);
g_oHLOOKUPCache.remove(__cell);
AscCommonExcel.g_oVLOOKUPCache.remove(__cell);
AscCommonExcel.g_oHLOOKUPCache.remove(__cell);
__cell.setFormulaCA(res.ca);
if(setCellFormat){
if( res.numFormat !== undefined && res.numFormat >= 0){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment