Commit c4372698 authored by GoshaZotov's avatar GoshaZotov

don not write comments into hidden rows(to binary)

parent 97ab08b1
...@@ -2429,7 +2429,7 @@ ...@@ -2429,7 +2429,7 @@
ws.aCommentsCoords; ws.aCommentsCoords;
if (aComments.length > 0 && aCommentsCoords.length > 0) { if (aComments.length > 0 && aCommentsCoords.length > 0) {
this.bs.WriteItem(c_oSerWorksheetsTypes.Comments, function () { this.bs.WriteItem(c_oSerWorksheetsTypes.Comments, function () {
oThis.WriteComments(aComments, aCommentsCoords); oThis.WriteComments(aComments, aCommentsCoords, ws);
}); });
} }
...@@ -3479,15 +3479,21 @@ ...@@ -3479,15 +3479,21 @@
this.memory.WriteByte(c_oSerPropLenType.Variable); this.memory.WriteByte(c_oSerPropLenType.Variable);
this.memory.WriteString2(formulaParsed.Formula); this.memory.WriteString2(formulaParsed.Formula);
}; };
this.WriteComments = function(aComments, aCommentsCoords) this.WriteComments = function(aComments, aCommentsCoords, ws)
{ {
var oThis = this; var oThis = this;
var oNewComments = {}, i, length, elem, nRow, nCol, row, comment; var oNewComments = {}, i, length, elem, nRow, nCol, row, comment;
for(i = 0, length = aComments.length; i < length; ++i) for(i = 0, length = aComments.length; i < length; ++i)
{ {
//write only active comments, if copy/paste //write only active comments, if copy/paste
if(this.isCopyPaste && !this.isCopyPaste.contains(aComments[i].nCol, aComments[i].nRow)) if(this.isCopyPaste)
continue; {
//ignore hidden rows if ws.bExcludeHiddenRows === true
if(!this.isCopyPaste.contains(aComments[i].nCol, aComments[i].nRow) || (ws.bExcludeHiddenRows && ws.getRowHidden(aComments[i].nRow)))
{
continue;
}
}
elem = aComments[i]; elem = aComments[i];
nRow = elem.asc_getRow(); nRow = elem.asc_getRow();
......
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