Commit b89a10c2 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

добавлена функция ODDFPRICE;

рефакторинг после проверки JSHINT'ом.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55699 954022d7-b5bf-4e40-9824-e11837661b57
parent 06520e7b
......@@ -16,7 +16,7 @@ cFormulaFunction.Cube = {
'CUBESET':cCUBESET,
'CUBESETCOUNT':cCUBESETCOUNT,
'CUBEVALUE':cCUBEVALUE
}
};
function cCUBEKPIMEMBER() {
// cBaseFunction.call( this, "CUBEKPIMEMBER" );
......@@ -34,7 +34,7 @@ function cCUBEKPIMEMBER() {
this.numFormat = this.formatType.def;
}
cCUBEKPIMEMBER.prototype = Object.create( cBaseFunction.prototype )
cCUBEKPIMEMBER.prototype = Object.create( cBaseFunction.prototype );
function cCUBEMEMBER() {
// cBaseFunction.call( this, "CUBEMEMBER" );
......@@ -52,7 +52,7 @@ function cCUBEMEMBER() {
this.numFormat = this.formatType.def;
}
cCUBEMEMBER.prototype = Object.create( cBaseFunction.prototype )
cCUBEMEMBER.prototype = Object.create( cBaseFunction.prototype );
function cCUBEMEMBERPROPERTY() {
// cBaseFunction.call( this, "CUBEMEMBERPROPERTY" );
......@@ -70,7 +70,7 @@ function cCUBEMEMBERPROPERTY() {
this.numFormat = this.formatType.def;
}
cCUBEMEMBERPROPERTY.prototype = Object.create( cBaseFunction.prototype )
cCUBEMEMBERPROPERTY.prototype = Object.create( cBaseFunction.prototype );
function cCUBERANKEDMEMBER() {
// cBaseFunction.call( this, "CUBERANKEDMEMBER" );
......@@ -88,7 +88,7 @@ function cCUBERANKEDMEMBER() {
this.numFormat = this.formatType.def;
}
cCUBERANKEDMEMBER.prototype = Object.create( cBaseFunction.prototype )
cCUBERANKEDMEMBER.prototype = Object.create( cBaseFunction.prototype );
function cCUBESET() {
// cBaseFunction.call( this, "CUBESET" );
......@@ -106,7 +106,7 @@ function cCUBESET() {
this.numFormat = this.formatType.def;
}
cCUBESET.prototype = Object.create( cBaseFunction.prototype )
cCUBESET.prototype = Object.create( cBaseFunction.prototype );
function cCUBESETCOUNT() {
// cBaseFunction.call( this, "CUBESETCOUNT" );
......@@ -124,7 +124,7 @@ function cCUBESETCOUNT() {
this.numFormat = this.formatType.def;
}
cCUBESETCOUNT.prototype = Object.create( cBaseFunction.prototype )
cCUBESETCOUNT.prototype = Object.create( cBaseFunction.prototype );
function cCUBEVALUE() {
// cBaseFunction.call( this, "CUBEVALUE" );
......@@ -142,4 +142,4 @@ function cCUBEVALUE() {
this.numFormat = this.formatType.def;
}
cCUBEVALUE.prototype = Object.create( cBaseFunction.prototype )
cCUBEVALUE.prototype = Object.create( cBaseFunction.prototype );
......@@ -21,64 +21,64 @@ cFormulaFunction.Database = {
'DSUM':cDSUM,
'DVAR':cDVAR,
'DVARP':cDVARP
}
};
function cDAVERAGE() {
cBaseFunction.call( this, "DAVERAGE" );
}
cDAVERAGE.prototype = Object.create( cBaseFunction.prototype )
cDAVERAGE.prototype = Object.create( cBaseFunction.prototype );
function cDCOUNT() {
cBaseFunction.call( this, "DCOUNT" );
}
cDCOUNT.prototype = Object.create( cBaseFunction.prototype )
cDCOUNT.prototype = Object.create( cBaseFunction.prototype );
function cDCOUNTA() {
cBaseFunction.call( this, "DCOUNTA" );
}
cDCOUNTA.prototype = Object.create( cBaseFunction.prototype )
cDCOUNTA.prototype = Object.create( cBaseFunction.prototype );
function cDGET() {
cBaseFunction.call( this, "DGET" );
}
cDGET.prototype = Object.create( cBaseFunction.prototype )
cDGET.prototype = Object.create( cBaseFunction.prototype );
function cDMAX() {
cBaseFunction.call( this, "DMAX" );
}
cDMAX.prototype = Object.create( cBaseFunction.prototype )
cDMAX.prototype = Object.create( cBaseFunction.prototype );
function cDMIN() {
cBaseFunction.call( this, "DMIN" );
}
cDMIN.prototype = Object.create( cBaseFunction.prototype )
cDMIN.prototype = Object.create( cBaseFunction.prototype );
function cDPRODUCT() {
cBaseFunction.call( this, "DPRODUCT" );
}
cDPRODUCT.prototype = Object.create( cBaseFunction.prototype )
cDPRODUCT.prototype = Object.create( cBaseFunction.prototype );
function cDSTDEV() {
cBaseFunction.call( this, "DSTDEV" );
}
cDSTDEV.prototype = Object.create( cBaseFunction.prototype )
cDSTDEV.prototype = Object.create( cBaseFunction.prototype );
function cDSTDEVP() {
cBaseFunction.call( this, "DSTDEVP" );
}
cDSTDEVP.prototype = Object.create( cBaseFunction.prototype )
cDSTDEVP.prototype = Object.create( cBaseFunction.prototype );
function cDSUM() {
cBaseFunction.call( this, "DSUM" );
}
cDSUM.prototype = Object.create( cBaseFunction.prototype )
cDSUM.prototype = Object.create( cBaseFunction.prototype );
function cDVAR() {
cBaseFunction.call( this, "DVAR" );
}
cDVAR.prototype = Object.create( cBaseFunction.prototype )
cDVAR.prototype = Object.create( cBaseFunction.prototype );
function cDVARP() {
cBaseFunction.call( this, "DVARP" );
}
cDVARP.prototype = Object.create( cBaseFunction.prototype )
cDVARP.prototype = Object.create( cBaseFunction.prototype );
This diff is collapsed.
......@@ -3422,29 +3422,29 @@ Woorksheet.prototype._BuildDependencies=function(cellRange){
var oNewElem;
if(range.isOneCell())
{
if(elem instanceof cRef3D)
oNewElem = new cRef3D(ref, elem.ws.getName(), elem._wb);
else if(elem instanceof cArea3D)
if(elem instanceof CRef3D)
oNewElem = new CRef3D(ref, elem.ws.getName(), elem._wb);
else if(elem instanceof CArea3D)
{
var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName();
var wsTo = elem._wb.getWorksheetById( elem.wsTo ).getName();
oNewElem = new cArea3D(ref, wsFrom, wsTo, elem._wb);
oNewElem = new CArea3D(ref, wsFrom, wsTo, elem._wb);
}
else
oNewElem = new cRef(ref, elem.ws);
oNewElem = new CRef(ref, elem.ws);
}
else
{
if(elem instanceof cRef3D)
oNewElem = new cArea3D(ref, elem.ws.getName(), elem.ws.getName(), elem._wb);
else if(elem instanceof cArea3D)
if(elem instanceof CRef3D)
oNewElem = new CArea3D(ref, elem.ws.getName(), elem.ws.getName(), elem._wb);
else if(elem instanceof CArea3D)
{
var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName();
var wsTo = elem._wb.getWorksheetById( elem.wsTo ).getName();
oNewElem = new cArea3D(ref, wsFrom, wsTo, elem._wb);
oNewElem = new CArea3D(ref, wsFrom, wsTo, elem._wb);
}
else
oNewElem = new cArea(ref, elem.ws);
oNewElem = new CArea(ref, elem.ws);
}
if ( ref.indexOf( "$" ) > -1 )
oNewElem.isAbsolute = true;
......@@ -3535,9 +3535,9 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){
if ( c.formulaParsed && c.formulaParsed.outStack ) {
for ( var i = 0, length = c.formulaParsed.outStack.length; i < length; i++ ) {
elem = c.formulaParsed.outStack[i];
if ( elem instanceof cRef || elem instanceof cRef3D || elem instanceof cArea || elem instanceof cArea3D ) {
if ( elem instanceof CRef || elem instanceof CRef3D || elem instanceof CArea || elem instanceof CArea3D ) {
var r = elem.getRange();
if ( elem instanceof cArea3D && r.length > 0 )
if ( elem instanceof CArea3D && r.length > 0 )
r = r[0];
if ( r && r.getNumFormatStr ) {
var sCurFormat = c.getNumFormatStr();
......@@ -3568,7 +3568,7 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){
res = __cell.formulaParsed.calculate();
}
else {
res = new cError( cErrorType.bad_reference )
res = new CError( cErrorType.bad_reference )
}
if(res){
if( res.type == cElementType.cell){
......
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