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

конфликт имен.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55742 954022d7-b5bf-4e40-9824-e11837661b57
parent dd2c6b3a
...@@ -54,9 +54,9 @@ var f_2_DIV_PI = 2.0 / Math.PI; ...@@ -54,9 +54,9 @@ var f_2_DIV_PI = 2.0 / Math.PI;
function BesselJ( x, N ) { function BesselJ( x, N ) {
if ( N < 0 ){ if ( N < 0 ){
return new CError( cErrorType.not_numeric );} return new cError( cErrorType.not_numeric );}
if ( x === 0.0 ){ if ( x === 0.0 ){
return new CNumber( (N == 0) ? 1 : 0 );} return new cNumber( (N == 0) ? 1 : 0 );}
/* The algorithm works only for x>0, therefore remember sign. BesselJ /* The algorithm works only for x>0, therefore remember sign. BesselJ
with integer order N is an even function for even N (means J(-x)=J(x)) with integer order N is an even function for even N (means J(-x)=J(x))
...@@ -69,9 +69,9 @@ function BesselJ( x, N ) { ...@@ -69,9 +69,9 @@ function BesselJ( x, N ) {
var bAsymptoticPossible = Math.pow( fX, 0.4 ) > N; var bAsymptoticPossible = Math.pow( fX, 0.4 ) > N;
if ( fEstimateIteration > fMaxIteration ) { if ( fEstimateIteration > fMaxIteration ) {
if ( bAsymptoticPossible ){ if ( bAsymptoticPossible ){
return new CNumber(fSign * Math.sqrt( f_2_DIV_PI / fX ) * Math.cos( fX - N * f_PI_DIV_2 - f_PI_DIV_4 ) );} return new cNumber(fSign * Math.sqrt( f_2_DIV_PI / fX ) * Math.cos( fX - N * f_PI_DIV_2 - f_PI_DIV_4 ) );}
else{ else{
return new CError(cErrorType.not_numeric);} return new cError(cErrorType.not_numeric);}
} }
var epsilon = 1.0e-15; // relative error var epsilon = 1.0e-15; // relative error
...@@ -125,15 +125,15 @@ function BesselJ( x, N ) { ...@@ -125,15 +125,15 @@ function BesselJ( x, N ) {
} }
while ( !bHasfound && k <= fMaxIteration ); while ( !bHasfound && k <= fMaxIteration );
if ( bHasfound ){ if ( bHasfound ){
return new CNumber( u * fSign );} return new cNumber( u * fSign );}
else{ else{
return new CError(cErrorType.not_numeric);}// unlikely to happen return new cError(cErrorType.not_numeric);}// unlikely to happen
} }
function BesselI( x, n ) { function BesselI( x, n ) {
var nMaxIteration = 2000, fXHalf = x / 2, fResult = 0; var nMaxIteration = 2000, fXHalf = x / 2, fResult = 0;
if ( n < 0 ){ if ( n < 0 ){
return new CError( cErrorType.not_numeric );} return new cError( cErrorType.not_numeric );}
/* Start the iteration without TERM(n,0), which is set here. /* Start the iteration without TERM(n,0), which is set here.
...@@ -175,7 +175,7 @@ function BesselI( x, n ) { ...@@ -175,7 +175,7 @@ function BesselI( x, n ) {
while ( (Math.abs( fTerm ) > Math.abs( fResult ) * fEpsilon) && (nK < nMaxIteration) ); while ( (Math.abs( fTerm ) > Math.abs( fResult ) * fEpsilon) && (nK < nMaxIteration) );
} }
return new CNumber( fResult ); return new cNumber( fResult );
} }
function Besselk0( fNum ) { function Besselk0( fNum ) {
...@@ -239,7 +239,7 @@ function BesselK( fNum, nOrder ) { ...@@ -239,7 +239,7 @@ function BesselK( fNum, nOrder ) {
function Bessely0( fX ) { function Bessely0( fX ) {
if ( fX <= 0 ) if ( fX <= 0 )
return new CError( cErrorType.not_numeric ); return new cError( cErrorType.not_numeric );
var fMaxIteration = 9000000; // should not be reached var fMaxIteration = 9000000; // should not be reached
if ( fX > 5.0e+6 ) // iteration is not considerable better then approximation if ( fX > 5.0e+6 ) // iteration is not considerable better then approximation
return Math.sqrt( 1 / Math.PI / fX ) * (Math.sin( fX ) - Math.cos( fX )); return Math.sqrt( 1 / Math.PI / fX ) * (Math.sin( fX ) - Math.cos( fX ));
...@@ -274,14 +274,14 @@ function Bessely0( fX ) { ...@@ -274,14 +274,14 @@ function Bessely0( fX ) {
if ( bHasFound ) if ( bHasFound )
return u * f_2_DIV_PI; return u * f_2_DIV_PI;
else else
return new CError( cErrorType.not_numeric ); return new cError( cErrorType.not_numeric );
} }
// See #i31656# for a commented version of this implementation, attachment #desc6 // See #i31656# for a commented version of this implementation, attachment #desc6
// http://www.openoffice.org/nonav/issues/showattachment.cgi/63609/Comments%20to%20the%20implementation%20of%20the%20Bessel%20functions.odt // http://www.openoffice.org/nonav/issues/showattachment.cgi/63609/Comments%20to%20the%20implementation%20of%20the%20Bessel%20functions.odt
function Bessely1( fX ) { function Bessely1( fX ) {
if ( fX <= 0 ) if ( fX <= 0 )
return new CError( cErrorType.not_numeric ); return new cError( cErrorType.not_numeric );
var fMaxIteration = 9000000; // should not be reached var fMaxIteration = 9000000; // should not be reached
if ( fX > 5e+6 ) // iteration is not considerable better then approximation if ( fX > 5e+6 ) // iteration is not considerable better then approximation
return -Math.sqrt( 1 / Math.PI / fX ) * (Math.sin( fX ) + Math.cos( fX )); return -Math.sqrt( 1 / Math.PI / fX ) * (Math.sin( fX ) + Math.cos( fX ));
...@@ -320,7 +320,7 @@ function Bessely1( fX ) { ...@@ -320,7 +320,7 @@ function Bessely1( fX ) {
if ( bHasFound ) if ( bHasFound )
return -u * 2 / Math.PI; return -u * 2 / Math.PI;
else else
return new CError( cErrorType.not_numeric ); return new cError( cErrorType.not_numeric );
} }
function BesselY( fNum, nOrder ) { function BesselY( fNum, nOrder ) {
......
This diff is collapsed.
...@@ -3422,29 +3422,29 @@ Woorksheet.prototype._BuildDependencies=function(cellRange){ ...@@ -3422,29 +3422,29 @@ Woorksheet.prototype._BuildDependencies=function(cellRange){
var oNewElem; var oNewElem;
if(range.isOneCell()) if(range.isOneCell())
{ {
if(elem instanceof CRef3D) if(elem instanceof cRef3D)
oNewElem = new CRef3D(ref, elem.ws.getName(), elem._wb); oNewElem = new cRef3D(ref, elem.ws.getName(), elem._wb);
else if(elem instanceof CArea3D) else if(elem instanceof cArea3D)
{ {
var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName(); var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName();
var wsTo = elem._wb.getWorksheetById( elem.wsTo ).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 else
oNewElem = new CRef(ref, elem.ws); oNewElem = new cRef(ref, elem.ws);
} }
else else
{ {
if(elem instanceof CRef3D) if(elem instanceof cRef3D)
oNewElem = new CArea3D(ref, elem.ws.getName(), elem.ws.getName(), elem._wb); oNewElem = new cArea3D(ref, elem.ws.getName(), elem.ws.getName(), elem._wb);
else if(elem instanceof CArea3D) else if(elem instanceof cArea3D)
{ {
var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName(); var wsFrom = elem._wb.getWorksheetById( elem.wsFrom ).getName();
var wsTo = elem._wb.getWorksheetById( elem.wsTo ).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 else
oNewElem = new CArea(ref, elem.ws); oNewElem = new cArea(ref, elem.ws);
} }
if ( ref.indexOf( "$" ) > -1 ) if ( ref.indexOf( "$" ) > -1 )
oNewElem.isAbsolute = true; oNewElem.isAbsolute = true;
...@@ -3535,9 +3535,9 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){ ...@@ -3535,9 +3535,9 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){
if ( c.formulaParsed && c.formulaParsed.outStack ) { if ( c.formulaParsed && c.formulaParsed.outStack ) {
for ( var i = 0, length = c.formulaParsed.outStack.length; i < length; i++ ) { for ( var i = 0, length = c.formulaParsed.outStack.length; i < length; i++ ) {
elem = c.formulaParsed.outStack[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(); var r = elem.getRange();
if ( elem instanceof CArea3D && r.length > 0 ) if ( elem instanceof cArea3D && r.length > 0 )
r = r[0]; r = r[0];
if ( r && r.getNumFormatStr ) { if ( r && r.getNumFormatStr ) {
var sCurFormat = c.getNumFormatStr(); var sCurFormat = c.getNumFormatStr();
...@@ -3568,7 +3568,7 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){ ...@@ -3568,7 +3568,7 @@ Woorksheet.prototype._RecalculatedFunctions=function(cell,bad){
res = __cell.formulaParsed.calculate(); res = __cell.formulaParsed.calculate();
} }
else { else {
res = new CError( cErrorType.bad_reference ) res = new cError( cErrorType.bad_reference )
} }
if(res){ if(res){
if( res.type == cElementType.cell){ 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