Commit 21cf2d54 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 15667 - Hyperlink: Не меняется цвет гиперссылки после перехода по ней.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48531 954022d7-b5bf-4e40-9824-e11837661b57
parent 42ae2cd6
......@@ -152,9 +152,6 @@ function BinaryCommonWriter(memory)
{
if(color instanceof ThemeColor)
{
//заглушка для посещенных гиперссылок
if(g_nColorHyperlinkVisited == color.theme && null == color.tint)
color.theme = g_nColorHyperlink;
if(null != color.theme)
{
this.memory.WriteByte(c_oSer_ColorObjectType.Theme);
......
......@@ -7731,6 +7731,11 @@ Range.prototype.intersect=function(range){
return this.worksheet.getRange3(r1, c1, r2, c2);
return null;
}
Range.prototype.cleanCache=function(){
this._setPropertyNoEmpty(null,null,function(cell, nRow0, nCol0, nRowStart, nColStart){
cell.cleanCache();
});
}
Range.prototype.cleanFormat=function(){
History.Create_NewPoint();
var oBBox = this.bbox;
......
......@@ -1889,6 +1889,15 @@ Hyperlink.prototype =
{
return null != this.Ref && (null != this.Location || null != this.Hyperlink);
},
setVisited : function(bVisited)
{
this.bVisited = bVisited;
this.Ref.cleanCache();
},
getVisited : function(bVisited)
{
return this.bVisited;
},
getType : function()
{
return UndoRedoDataTypes.Hyperlink;
......@@ -2947,6 +2956,20 @@ CCellValue.prototype =
{
oNewItem.theme = oNewItem.format.c.theme;
oNewItem.tint = oNewItem.format.c.tint;
//для посещенных гиперссылок
if(g_nColorHyperlink == oNewItem.theme && null == oNewItem.tint)
{
var aHyperlinks = this.cell.getHyperlinks();
if(aHyperlinks.length > 0)
{
var hyperlink = aHyperlinks[aHyperlinks.length - 1];
if(hyperlink.getVisited())
{
oNewItem.format.c = g_oColorManager.getThemeColor(g_nColorHyperlinkVisited, null);
oNewItem.theme = g_nColorHyperlinkVisited;
}
}
}
}
oNewItem.format.c = oNewItem.format.getRgbOrNull();
oNewItem.format.skip = false;
......@@ -2971,6 +2994,20 @@ CCellValue.prototype =
{
oNewItem.theme = oNewItem.format.c.theme;
oNewItem.tint = oNewItem.format.c.tint;
//для посещенных гиперссылок
if(g_nColorHyperlink == oNewItem.theme && null == oNewItem.tint)
{
var aHyperlinks = this.cell.getHyperlinks();
if(aHyperlinks.length > 0)
{
var hyperlink = aHyperlinks[aHyperlinks.length - 1];
if(hyperlink.getVisited())
{
oNewItem.format.c = g_oColorManager.getThemeColor(g_nColorHyperlinkVisited, null);
oNewItem.theme = g_nColorHyperlinkVisited;
}
}
}
}
oNewItem.format.c = oNewItem.format.getRgbOrNull();
aResult.push(oNewItem);
......
......@@ -473,6 +473,13 @@
isHyperlinkClick = true;
}
if (isHyperlinkClick) {
var oRangeHyperlink = ws.model.getCell3(ct.hyperlink.row, ct.hyperlink.col);
var hyp = oRangeHyperlink.getHyperlink();
if(null != hyp && false == hyp.getVisited())
{
hyp.setVisited(true);
ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkRange, isLockDraw: false, canChangeColWidth: false});
}
var t = this;
if (c_oAscHyperlinkType.WebLink === ct.hyperlink.asc_getType()) {
// Это ссылка на Url. Отправляем не сразу, т.к. хочется dblClick обработать...
......
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