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

Дополнение к Revision: 51206

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51226 954022d7-b5bf-4e40-9824-e11837661b57
parent 61e2a5b8
......@@ -3305,7 +3305,6 @@ UndoRedoWoorksheet.prototype = {
from = to;
to = temp;
}
var data = 1;
if(null != from && null != from.r1 && null != from.c1 && null != from.r2 && null != from.c2)
{
var aMerged = ws.mergeManager.get(from);
......@@ -3314,14 +3313,14 @@ UndoRedoWoorksheet.prototype = {
var merged = aMerged.inner[i];
if(merged.bbox.isEqual(from))
{
var elem = new RangeDataManagerElem(from, data);
ws.mergeManager.remove(elem.bbox, elem, false);
ws.mergeManager.remove(merged.bbox, merged);
break;
}
}
}
var data = 1;
if(null != to && null != to.r1 && null != to.c1 && null != to.r2 && null != to.c2)
ws.mergeManager.add(to, data, false);
ws.mergeManager.add(to, data);
}
else if(historyitem_Worksheet_ChangeHyperlink === Type){
var from = null;
......@@ -3337,7 +3336,7 @@ UndoRedoWoorksheet.prototype = {
to = temp;
}
//не делаем clone потому что предполагаем, что здесь могут быть только операции изменения рзмеров, перемещение или удаления одной ссылки
var data = Data.hyperlink;
var data = null;
if(null != from && null != from.r1 && null != from.c1 && null != from.r2 && null != from.c2)
{
var aHyperlinks = ws.hyperlinkManager.get(from);
......@@ -3346,16 +3345,18 @@ UndoRedoWoorksheet.prototype = {
var hyp = aHyperlinks.inner[i];
if(hyp.bbox.isEqual(from))
{
var elem = new RangeDataManagerElem(from, data);
ws.hyperlinkManager.remove(elem.bbox, elem, false);
data = hyp.data;
ws.hyperlinkManager.remove(hyp.bbox, hyp);
break;
}
}
}
if(null != to && null != to.r1 && null != to.c1 && null != to.r2 && null != to.c2)
if(null == data)
data = Data.hyperlink;
if(null != data && null != to && null != to.r1 && null != to.c1 && null != to.r2 && null != to.c2)
{
data.Ref = ws.getRange3(to.r1, to.c1, to.r2, to.c2);
ws.hyperlinkManager.add(to, data, false);
ws.hyperlinkManager.add(to, data);
}
}
}
......
This diff is collapsed.
......@@ -3332,7 +3332,7 @@ function RangeDataManager(bAllowIntersect, fChange)
this.fChange = fChange;
}
RangeDataManager.prototype = {
add : function(bbox, data, bTriggerEvent)
add : function(bbox, data)
{
var oNewElem = new RangeDataManagerElem(new Asc.Range(bbox.c1, bbox.r1, bbox.c2, bbox.r2), data);
oNewElem.id = this.idGen++;
......@@ -3409,7 +3409,7 @@ RangeDataManager.prototype = {
}
this.oElements[this._getBBoxIndex(bbox)] = oNewElem;
this._recalculate();
if(false != bTriggerEvent)
if(null != this.fChange)
this.fChange.call(this, oNewElem.data, null, oNewElem.bbox);
},
_getExecElem : function(elem, oFindElems)
......@@ -3652,7 +3652,7 @@ RangeDataManager.prototype = {
}
return container;
},
remove : function(bbox, elemToDelete, bTriggerEvent)
remove : function(bbox, elemToDelete)
{
if(null != elemToDelete)
{
......@@ -3683,7 +3683,7 @@ RangeDataManager.prototype = {
this.oAll = this._removeExecElem(this.oAll, null, elemToDelete);
delete this.oElements[this._getBBoxIndex(elemToDelete.bbox)];
this._recalculate();
if(false != bTriggerEvent)
if(null != this.fChange)
this.fChange.call(this, elemToDelete.data, elemToDelete.bbox, null);
}
else
......@@ -3693,7 +3693,7 @@ RangeDataManager.prototype = {
for(var i = 0, length = aElems.all.length; i < length; ++i)
{
var elem = aElems.all[i];
this.remove(elem.bbox, elem, bTriggerEvent);
this.remove(elem.bbox, elem);
}
this.startRecalculate();
}
......@@ -3812,11 +3812,7 @@ RangeDataManager.prototype = {
{
var item = aToChange[i];
var elem = item.elem;
var from = elem.bbox;
var to = item.to;
if(null != this.fChange)
this.fChange.call(this, elem.data, from, to);
this.remove(elem.bbox, elem, false);
this.remove(elem.bbox, elem);
}
//добавляем измененные ячейки
for(var i = 0, length = aToChange.length; i < length; ++i)
......
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