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

fix: Bug 30177 - Неверно рассчитывается адрес колонки в формуле ADDRESS...

fix: Bug 30177 - Неверно рассчитывается адрес колонки в формуле ADDRESS (http://bugzserver/show_bug.cgi?id=30177)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64382 954022d7-b5bf-4e40-9824-e11837661b57
parent 404f9577
......@@ -106,22 +106,22 @@ cADDRESS.prototype.Calculate = function ( arg ) {
if ( A1RefType instanceof cError ) return this.value = A1RefType;
if ( sheetName instanceof cError ) return this.value = sheetName;
if ( refType.getValue() > 4 && refType.getValue() < 1 || rowNumber.getValue() < 1 || colNumber.getValue() < 1 ) {
return this.value = new cError( cErrorType.not_numeric );
if ( refType.getValue() > 4 || refType.getValue() < 1 || rowNumber.getValue() < 1 || colNumber.getValue() < 1 ) {
return this.value = new cError( cErrorType.wrong_value_type );
}
var strRef;
switch ( refType.getValue() ) {
case 1:
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() - 1 ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
break;
case 2:
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() - 1 ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
break;
case 3:
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() - 1 ) + _getRowTitle( rowNumber.getValue() - 1 );
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + _getRowTitle( rowNumber.getValue() - 1 );
break;
case 4:
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() - 1 ) + _getRowTitle( rowNumber.getValue() - 1 );
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + _getRowTitle( rowNumber.getValue() - 1 );
break;
}
......
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