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

защита чтобы не писать один и тотже merge диапазон несколько раз.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59200 954022d7-b5bf-4e40-9824-e11837661b57
parent 5b8f22e1
...@@ -2731,6 +2731,7 @@ ...@@ -2731,6 +2731,7 @@
this.WriteMergeCells = function(ws) this.WriteMergeCells = function(ws)
{ {
var oMerged = ws.mergeManager.getAll(); var oMerged = ws.mergeManager.getAll();
var aMergedUsed = {};//защита чтобы не писать один и тотже диапазон несколько раз
for(var i in oMerged) for(var i in oMerged)
{ {
var elem = oMerged[i]; var elem = oMerged[i];
...@@ -2740,10 +2741,12 @@ ...@@ -2740,10 +2741,12 @@
//write only active merge, if copy/paste //write only active merge, if copy/paste
if(!this.isCopyPaste || (this.isCopyPaste && this.isCopyPaste.containsRange(bbox))) if(!this.isCopyPaste || (this.isCopyPaste && this.isCopyPaste.containsRange(bbox)))
{ {
var oFirst = new CellAddress(bbox.r1, bbox.c1, 0); var sCurMerged = bbox.getName();
var oLast = new CellAddress(bbox.r2, bbox.c2, 0); if(null == aMergedUsed[sCurMerged]){
this.memory.WriteByte(c_oSerWorksheetsTypes.MergeCell); aMergedUsed[sCurMerged] = 1;
this.memory.WriteString2(oFirst.getID() + ":" + oLast.getID()); this.memory.WriteByte(c_oSerWorksheetsTypes.MergeCell);
this.memory.WriteString2(sCurMerged);
}
} }
} }
} }
......
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