Commit 495f259a authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Range.prototype._getHyperlinks учитываются скрытые строки.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49812 954022d7-b5bf-4e40-9824-e11837661b57
parent fc54ddff
......@@ -7100,7 +7100,7 @@ Range.prototype.unmerge=function(bOnlyInRange){
}
}
};
Range.prototype._getHyperlinks=function(bStopOnFirst){
Range.prototype._getHyperlinks=function(bStopOnFirst, bAvoidHiddenRow){
var nRangeType = this._getRangeType();
var result = [];
var oAllCol = this.worksheet.oAllCol;
......@@ -7125,7 +7125,14 @@ Range.prototype._getHyperlinks=function(bStopOnFirst){
oRow[nCol] = hyperlink;
};
var oProcessedMerged = new Object();
this._foreachIndex(function(nRow, nCol){
var oBBox = this.bbox;
for(var nRow = oBBox.r1; nRow <= oBBox.r2; nRow++){
var row = this.worksheet._getRowNoEmpty(nRow);
if(null != row)
{
if(true == row.hd && bAvoidHiddenRow)
continue;
for(var nCol = oBBox.c1; nCol <= oBBox.c2; nCol++){
var cell = oThis.worksheet._getCellNoEmpty(nRow, nCol);
if(null != cell && cell.hyperlinks.length > 0)
{
......@@ -7133,7 +7140,7 @@ Range.prototype._getHyperlinks=function(bStopOnFirst){
if(bStopOnFirst)
{
result.push({hyperlink: oCurHyperlink, col: nCol, row: nRow});
return;
break;
}
else
{
......@@ -7167,7 +7174,11 @@ Range.prototype._getHyperlinks=function(bStopOnFirst){
else if(null != oAllCol && oAllCol.hyperlinks.length > 0)
fAddToTemp(oTempRows, oAllCol.hyperlinks[oAllCol.hyperlinks.length - 1], nRow, nCol);
}
});
}
if(bStopOnFirst && result.length > 0)
break;
}
}
//формируем результат
for(var i in oTempRows)
{
......@@ -7184,13 +7195,13 @@ Range.prototype._getHyperlinks=function(bStopOnFirst){
return result;
}
Range.prototype.getHyperlink=function(){
var aHyperlinks = this._getHyperlinks(true);
var aHyperlinks = this._getHyperlinks(true, false);
if(null != aHyperlinks && aHyperlinks.length > 0)
return aHyperlinks[0].hyperlink;
return null;
};
Range.prototype.getHyperlinks=function(){
return this._getHyperlinks(false);
return this._getHyperlinks(false, true);
};
Range.prototype.setHyperlink=function(val, bWithoutStyle){
if(null != val && false == val.isValid())
......
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