Commit 08fce83d authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

добавил обработку для бага http://bugzserver/show_bug.cgi?id=20175

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66004 954022d7-b5bf-4e40-9824-e11837661b57
parent 4d438e10
...@@ -2916,6 +2916,17 @@ Workbook.prototype.DeserializeHistoryNative = function(oRedoObjectParam, data, i ...@@ -2916,6 +2916,17 @@ Workbook.prototype.DeserializeHistoryNative = function(oRedoObjectParam, data, i
} }
return oRedoObjectParam; return oRedoObjectParam;
}; };
Workbook.prototype.getTableRangeForFormula = function(name, objectParam){
var res = null;
for(var i = 0, length = this.aWorksheets.length; i < length; ++i)
{
var ws = this.aWorksheets[i];
res = ws.getTableRangeForFormula(name, objectParam);
if(res !== null)
break;
}
return res;
};
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
/** /**
* @constructor * @constructor
...@@ -4745,6 +4756,21 @@ Woorksheet.prototype._setHandlersTablePart = function(){ ...@@ -4745,6 +4756,21 @@ Woorksheet.prototype._setHandlersTablePart = function(){
this.TableParts[i].setHandlers(this.handlers); this.TableParts[i].setHandlers(this.handlers);
} }
}; };
Woorksheet.prototype.getTableRangeForFormula = function(name, objectParam){
var res = null;
if(!this.TableParts)
return res;
for(var i = 0; i < this.TableParts.length; i++)
{
if(this.TableParts[i].Name === name)
{
res = this.TableParts[i].getTableRangeForFormula(objectParam);
break;
}
}
return res;
};
function inCache(aCache, sFormula, aRefs) function inCache(aCache, sFormula, aRefs)
{ {
......
...@@ -23,6 +23,15 @@ var g_nFiltersType = { ...@@ -23,6 +23,15 @@ var g_nFiltersType = {
tablePart: 2 tablePart: 2
}; };
var g_nFormulaTablePartInfo = {
all: 1,
data: 2,
headers: 3,
totals: 4,
thisRow: 5,
columns: 6
};
var g_oThemeColorsDefaultModsSpreadsheet = [ var g_oThemeColorsDefaultModsSpreadsheet = [
[0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262], [0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262],
[0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716], [0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716],
...@@ -4468,6 +4477,67 @@ TablePart.prototype.getType = function(F) ...@@ -4468,6 +4477,67 @@ TablePart.prototype.getType = function(F)
return g_nFiltersType.tablePart; return g_nFiltersType.tablePart;
}; };
TablePart.prototype.getTableRangeForFormula = function(objectParam)
{
var res = null;
switch(objectParam.param)
{
case g_nFormulaTablePartInfo.all:
{
break
}
case g_nFormulaTablePartInfo.data:
{
break
}
case g_nFormulaTablePartInfo.headers:
{
break
}
case g_nFormulaTablePartInfo.totals:
{
break
}
case g_nFormulaTablePartInfo.thisRow:
{
break
}
case g_nFormulaTablePartInfo.columns:
{
var startCol = this._getTableIndexColumnByName(objectParam.startCol);
var endCol = this._getTableIndexColumnByName(objectParam.endCol);
if(startCol === null)
break;
if(endCol === null)
endCol = startCol;
res = new Asc.Range(this.Ref.c1 + startCol, this.Ref.r1, this.Ref.c1 + endCol, this.Ref.r2);
break
}
}
return res;
};
TablePart.prototype._getTableIndexColumnByName = function(name)
{
var res = null;
if(name === null || name === undefined || !this.TableColumns)
return res;
for(var i = 0; i < this.TableColumns.length; i++)
{
if(name === this.TableColumns[i].Name)
{
res = i;
break;
}
}
return res;
};
/** @constructor */ /** @constructor */
function AutoFilter() { function AutoFilter() {
this.Ref = null; this.Ref = null;
......
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