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

Bug 30179 - Не учитываются ограничения на размер листа при вычислении формул...

Bug 30179 - Не учитываются ограничения на размер листа при вычислении формул (http://bugzserver/show_bug.cgi?id=30179)
Bug 30072 - [NamedRanges] "Error code: -40" при выборе некоторых диапазонов из списка в XLSX файле (http://bugzserver/show_bug.cgi?id=30072)
Bug 29929 - [NamedRanges][Undo&Redo] Ошибка в консоли при сдвиге именованного диапазона, к элементам которого обращались(http://bugzserver/show_bug.cgi?id=29929)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64503 954022d7-b5bf-4e40-9824-e11837661b57
parent 086caa35
......@@ -106,22 +106,27 @@ 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 ) {
rowNumber = rowNumber.getValue();
colNumber = colNumber.getValue();
refType = refType.getValue();
A1RefType = A1RefType.getValue();
if ( refType > 4 || refType < 1 || rowNumber < 1 || rowNumber > gc_nMaxRow || colNumber < 1 || colNumber > gc_nMaxCol ) {
return this.value = new cError( cErrorType.wrong_value_type );
}
var strRef;
switch ( refType.getValue() ) {
switch ( refType ) {
case 1:
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber ) + "$" + rowNumber;
break;
case 2:
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + "$" + _getRowTitle( rowNumber.getValue() - 1 );
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber ) + "$" + rowNumber;
break;
case 3:
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + _getRowTitle( rowNumber.getValue() - 1 );
strRef = "$" + g_oCellAddressUtils.colnumToColstrFromWsView( colNumber ) + rowNumber;
break;
case 4:
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber.getValue() ) + _getRowTitle( rowNumber.getValue() - 1 );
strRef = g_oCellAddressUtils.colnumToColstrFromWsView( colNumber ) + rowNumber;
break;
}
......
......@@ -817,8 +817,7 @@ DependencyGraph.prototype = {
/*Defined Names section*/
getDefNameNode:function ( node ) {
var ret = this.defNameList[node];
ret && ret.Ref == null ? ret = null : false;
return ret;
return ret && ret.Ref == null ? null : ret;
},
getDefNameNodeByName:function ( name, sheetId ) {
......@@ -1006,10 +1005,10 @@ DependencyGraph.prototype = {
sheetNodeList = this.defNameSheets[sheetId || "WB"];
nodeId = getDefNameVertexId( sheetId || "WB", name );
sheetNodeList[nodeId] = null;
//sheetNodeList[nodeId] = null;
delete sheetNodeList[nodeId];
this.defNameList[nodeId] = null;
//this.defNameList[nodeId] = null;
delete this.defNameList[nodeId];
oldN.changeDefName( newDefName );
......@@ -2434,8 +2433,8 @@ Workbook.prototype.getDefinesNamesWB = function (defNameListId) {
for ( var id in listDN ) {
name = listDN[id]
if ( name.Ref && !name.Hidden ) {
if( name.parsedRef && name.parsedRef.isParsed && name.parsedRef.calculate().errorType !== cErrorType.bad_reference ){
if ( name.Ref && !name.Hidden && name.Name.indexOf("_xlnm") < 0 ) {
if( name.parsedRef && name.parsedRef.isParsed && name.parsedRef.countRef == 1 && name.parsedRef.calculate().errorType !== cErrorType.bad_reference ){
arr.push( name.getAscCDefName() );
}
}
......@@ -2462,7 +2461,7 @@ Workbook.prototype.getDefinesNamesWB = function (defNameListId) {
default:
for ( var id in this.dependencyFormulas.defNameList ) {
name = this.dependencyFormulas.defNameList[id].getAscCDefName()
if ( name.Ref && !name.Hidden ) {
if ( name.Ref && !name.Hidden && name.Name.indexOf("_xlnm") < 0 ) {
names.push( name );
}
}
......@@ -2587,9 +2586,9 @@ Workbook.prototype.editDefinesNames = function ( oldName, newName, bUndo ) {
retRes = retRes.getAscCDefName();
}
if(!bUndo){
sortDependency( this );
}
// if(!bUndo){
// sortDependency( this );
// }
}
......
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