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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50570 954022d7-b5bf-4e40-9824-e11837661b57
parent abec7f1c
This diff is collapsed.
...@@ -6,33 +6,33 @@ ...@@ -6,33 +6,33 @@
* To change this template use File | Settings | File Templates. * To change this template use File | Settings | File Templates.
*/ */
cFormulaFunction.Cube = { cFormulaFunction.Cube = {
'groupName' : "Cube", 'groupName':"Cube",
'CUBEKPIMEMBER' : function(){ 'CUBEKPIMEMBER':function () {
var r = new cBaseFunction("CUBEKPIMEMBER"); var r = new cBaseFunction( "CUBEKPIMEMBER" );
return r; return r;
}, },
'CUBEMEMBER' : function(){ 'CUBEMEMBER':function () {
var r = new cBaseFunction("CUBEMEMBER"); var r = new cBaseFunction( "CUBEMEMBER" );
return r; return r;
}, },
'CUBEMEMBERPROPERTY' : function(){ 'CUBEMEMBERPROPERTY':function () {
var r = new cBaseFunction("CUBEMEMBERPROPERTY"); var r = new cBaseFunction( "CUBEMEMBERPROPERTY" );
return r; return r;
}, },
'CUBERANKEDMEMBER' : function(){ 'CUBERANKEDMEMBER':function () {
var r = new cBaseFunction("CUBERANKEDMEMBER"); var r = new cBaseFunction( "CUBERANKEDMEMBER" );
return r; return r;
}, },
'CUBESET' : function(){ 'CUBESET':function () {
var r = new cBaseFunction("CUBESET"); var r = new cBaseFunction( "CUBESET" );
return r; return r;
}, },
'CUBESETCOUNT' : function(){ 'CUBESETCOUNT':function () {
var r = new cBaseFunction("CUBESETCOUNT"); var r = new cBaseFunction( "CUBESETCOUNT" );
return r; return r;
}, },
'CUBEVALUE' : function(){ 'CUBEVALUE':function () {
var r = new cBaseFunction("CUBEVALUE"); var r = new cBaseFunction( "CUBEVALUE" );
return r; return r;
} }
} }
\ No newline at end of file
...@@ -6,53 +6,53 @@ ...@@ -6,53 +6,53 @@
* To change this template use File | Settings | File Templates. * To change this template use File | Settings | File Templates.
*/ */
cFormulaFunction.Database = { cFormulaFunction.Database = {
'groupName' : "Database", 'groupName':"Database",
'DAVERAGE' : function(){ 'DAVERAGE':function () {
var r = new cBaseFunction("DAVERAGE"); var r = new cBaseFunction( "DAVERAGE" );
return r; return r;
}, },
'DCOUNT' : function(){ 'DCOUNT':function () {
var r = new cBaseFunction("DCOUNT"); var r = new cBaseFunction( "DCOUNT" );
return r; return r;
}, },
'DCOUNTA' : function(){ 'DCOUNTA':function () {
var r = new cBaseFunction("DCOUNTA"); var r = new cBaseFunction( "DCOUNTA" );
return r; return r;
}, },
'DGET' : function(){ 'DGET':function () {
var r = new cBaseFunction("DGET"); var r = new cBaseFunction( "DGET" );
return r; return r;
}, },
'DMAX' : function(){ 'DMAX':function () {
var r = new cBaseFunction("DMAX"); var r = new cBaseFunction( "DMAX" );
return r; return r;
}, },
'DMIN' : function(){ 'DMIN':function () {
var r = new cBaseFunction("DMIN"); var r = new cBaseFunction( "DMIN" );
return r; return r;
}, },
'DPRODUCT' : function(){ 'DPRODUCT':function () {
var r = new cBaseFunction("DPRODUCT"); var r = new cBaseFunction( "DPRODUCT" );
return r; return r;
}, },
'DSTDEV' : function(){ 'DSTDEV':function () {
var r = new cBaseFunction("DSTDEV"); var r = new cBaseFunction( "DSTDEV" );
return r; return r;
}, },
'DSTDEVP' : function(){ 'DSTDEVP':function () {
var r = new cBaseFunction("DSTDEVP"); var r = new cBaseFunction( "DSTDEVP" );
return r; return r;
}, },
'DSUM' : function(){ 'DSUM':function () {
var r = new cBaseFunction("DSUM"); var r = new cBaseFunction( "DSUM" );
return r; return r;
}, },
'DVAR' : function(){ 'DVAR':function () {
var r = new cBaseFunction("DVAR"); var r = new cBaseFunction( "DVAR" );
return r; return r;
}, },
'DVARP' : function(){ 'DVARP':function () {
var r = new cBaseFunction("DVARP"); var r = new cBaseFunction( "DVARP" );
return r; return r;
} }
} }
...@@ -283,18 +283,18 @@ cFormulaFunction.Statistical = { ...@@ -283,18 +283,18 @@ cFormulaFunction.Statistical = {
} }
valueForSearching = parseNum( search ) ? new cNumber( search ) : new cString( search ); valueForSearching = parseNum( search ) ? new cNumber( search ) : new cString( search );
if ( arg0 instanceof cArea ) { if ( arg0 instanceof cArea ) {
val = arg0.getValue(); var r = arg0.getRange().first.getRow0(), ws = arg0.getWS(), c1 = arg2.getRange().first.getCol0(), i = 0;
for ( var i = 0; i < val.length; i++ ) { arg0.foreach2(function(c){
if ( matching( val[i], valueForSearching, oper ) ) { if ( matching( c, valueForSearching, oper ) ) {
var r = arg0.getRange(), ws = arg0.getWS(), var r1 = r + i,
r1 = r.first.getRow0() + i, c1 = arg2.getRange().first.getCol0(); r2 = new cRef( ws.getRange3( r1, c1, r1, c1 ).getName(), ws );
r = new cRef( ws.getRange3( r1, c1, r1, c1 ).getName(), ws ); if ( r2.getValue() instanceof cNumber ) {
if ( r.getValue() instanceof cNumber ) { _sum += r2.getValue().getValue();
_sum += r.getValue().getValue();
_count++; _count++;
} }
} }
} i++;
})
} }
else { else {
val = arg0.getValue(); val = arg0.getValue();
...@@ -742,13 +742,8 @@ cFormulaFunction.Statistical = { ...@@ -742,13 +742,8 @@ cFormulaFunction.Statistical = {
valueForSearching = parseNum( search ) ? new cNumber( search ) : new cString( search ); valueForSearching = parseNum( search ) ? new cNumber( search ) : new cString( search );
if ( arg0 instanceof cArea ) { if ( arg0 instanceof cArea ) {
arg0.foreach2(function(_val){ arg0.foreach2(function(_val){
// _val
_count += matching( _val, valueForSearching, oper ); _count += matching( _val, valueForSearching, oper );
}) })
/*val = arg0.getValue();
for ( var i = 0; i < val.length; i++ ) {
_count += matching( val[i], valueForSearching, oper );
}*/
} }
else if ( arg0 instanceof cArea3D ) { else if ( arg0 instanceof cArea3D ) {
val = arg0.getValue(); val = arg0.getValue();
......
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