Commit 422954f6 authored by GoshaZotov's avatar GoshaZotov

add ISFORMULA formula

parent c847d995
......@@ -64,13 +64,13 @@
cFormulaFunctionGroup['LookupAndReference'] = cFormulaFunctionGroup['LookupAndReference'] || [];
cFormulaFunctionGroup['LookupAndReference'].push(cFORMULATEXT);
cFormulaFunctionGroup['Information'] = cFormulaFunctionGroup['Information'] || [];
cFormulaFunctionGroup['Information'].push(cISFORMULA, cSHEET, cSHEETS);
cFormulaFunctionGroup['Information'].push(cSHEET, cSHEETS);
cFormulaFunctionGroup['NotRealised'] = cFormulaFunctionGroup['NotRealised'] || [];
cFormulaFunctionGroup['NotRealised'].push(cDAYS, cISOWEEKNUM, cBITAND, cBITLSHIFT, cBITOR, cBITRSHIFT, cBITXOR,
cDBCS, cUNICHAR, cUNICODE, cBINOM_DIST_RANGE, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT,
cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT, cHYPGEOM_DIST, cPDURATION,
cAGGREGATE, cMUNIT, cFORMULATEXT, cISFORMULA, cSHEET, cSHEETS);
cAGGREGATE, cMUNIT, cFORMULATEXT, cSHEET, cSHEETS);
/**
* @constructor
......@@ -288,18 +288,6 @@
cHYPGEOM_DIST.prototype = Object.create(cBaseFunction.prototype);
cHYPGEOM_DIST.prototype.constructor = cHYPGEOM_DIST;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cISFORMULA() {
cBaseFunction.call(this, "ISFORMULA");
this.isXLFN = true;
}
cISFORMULA.prototype = Object.create(cBaseFunction.prototype);
cISFORMULA.prototype.constructor = cISFORMULA;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
......
......@@ -51,7 +51,7 @@
var cFormulaFunctionGroup = AscCommonExcel.cFormulaFunctionGroup;
cFormulaFunctionGroup['Information'] = cFormulaFunctionGroup['Information'] || [];
cFormulaFunctionGroup['Information'].push(cERROR_TYPE, cISBLANK, cISERR, cISERROR, cISEVEN, cISLOGICAL, cISNA,
cFormulaFunctionGroup['Information'].push(cERROR_TYPE, cISBLANK, cISERR, cISERROR, cISEVEN, cISFORMULA, cISLOGICAL, cISNA,
cISNONTEXT, cISNUMBER, cISODD, cISREF, cISTEXT, cN, cNA, cTYPE);
/**
......@@ -240,6 +240,37 @@
}
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cISFORMULA() {
this.name = "ISFORMULA";
this.value = null;
this.argumentsCurrent = 0;
}
cISFORMULA.prototype = Object.create(cBaseFunction.prototype);
cISFORMULA.prototype.constructor = cISFORMULA;
cISFORMULA.prototype.argumentsMin = 1;
cISFORMULA.prototype.argumentsMax = 1;
cISFORMULA.prototype.Calculate = function (arg) {
//есть различия в поведении этой формулы для ms и lo(для нескольких ячеек с данными)
var arg0 = arg[0];
var res = false;
if ((arg0 instanceof cArea || arg0 instanceof cArea3D) && arg0.range) {
res = arg0.range.isFormula();
}else if ((arg0 instanceof cRef || arg0 instanceof cRef3D) && arg0.range) {
res = arg0.range.isFormula();
}
if (arg0 instanceof cError) {
return this.value = arg0;
}
return this.value = new cBool(res);
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
......
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