Commit d44ac2d0 authored by Igor.Zotov's avatar Igor.Zotov

http://bugzserver/show_bug.cgi?id=30366 - [Copy&Paste] Пропадает комментарий...

http://bugzserver/show_bug.cgi?id=30366 -  [Copy&Paste] Пропадает комментарий при копировании текста в таблицу или в колонтитул

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64953 954022d7-b5bf-4e40-9824-e11837661b57
parent f36a93df
......@@ -5454,13 +5454,17 @@ function BinaryFileReader(doc, openParams)
}
var oCommentsNewId = {};
//меняем CDocumentContent на Document для возможности вставки комментариев в колонтитул и таблицу
var isIntoShape = this.Document && this.Document.Parent && this.Document.Parent instanceof CShape ? true : false;
var isIntoDocumentContent = this.Document instanceof CDocumentContent ? true : false;
var document = this.Document && isIntoDocumentContent && !isIntoShape ? this.Document.LogicDocument : this.Document;
for(var i in this.oReadResult.oComments)
{
if(this.oReadResult.oCommentsPlaces && this.oReadResult.oCommentsPlaces[i] && this.oReadResult.oCommentsPlaces[i].Start != null && this.oReadResult.oCommentsPlaces[i].End != null && this.Document && this.Document.Comments && isCopyPaste === true)
if(this.oReadResult.oCommentsPlaces && this.oReadResult.oCommentsPlaces[i] && this.oReadResult.oCommentsPlaces[i].Start != null && this.oReadResult.oCommentsPlaces[i].End != null && document && document.Comments && isCopyPaste === true)
{
var oOldComment = this.oReadResult.oComments[i];
var oNewComment = new CComment(this.Document.Comments, fInitCommentData(oOldComment))
this.Document.Comments.Add(oNewComment);
var oNewComment = new CComment(document.Comments, fInitCommentData(oOldComment))
document.Comments.Add(oNewComment);
oCommentsNewId[oOldComment.Id] = oNewComment;
}
}
......
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