Commit e3fb0918 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

правка для багов #21264, 20900

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50911 954022d7-b5bf-4e40-9824-e11837661b57
parent 7e1eab06
...@@ -1684,31 +1684,32 @@ CopyProcessor.prototype = ...@@ -1684,31 +1684,32 @@ CopyProcessor.prototype =
if(copyPasteUseBinery) if(copyPasteUseBinery)
{ {
var index = cur_element.Parent.Index; var parent = cur_element.Parent;
selectionTrue = selectionTrue =
{ {
EndPos : oDocument.Content[index].Selection.EndPos, EndPos : parent.Selection.EndPos,
StartPos: oDocument.Content[index].Selection.StartPos StartPos: parent.Selection.StartPos
}; };
var inIndex; var inIndex;
for(var k = 0; k < oDocument.Content[index].Content.length;k++) for(var k = 0; k < parent.Content.length;k++)
{ {
if(oDocument.Content[index].Content[k] == cur_element) if(parent.Content[k] == cur_element)
{ {
inIndex = k; inIndex = k;
break; break;
} }
} }
//меняем Selection //меняем Selection
oDocument.Content[index].Selection.EndPos = inIndex + 1; parent.Selection.EndPos = inIndex + 1;
oDocument.Content[index].Selection.StartPos = inIndex; parent.Selection.StartPos = inIndex;
oDocument.Content[index].Selection.Use = true; parent.Selection.Use = true;
this.oBinaryFileWriter.CopyParagraph(oDocument.Content[index], true); this.oBinaryFileWriter.CopyParagraph(parent, true);
//возвращаем Selection //возвращаем Selection
oDocument.Content[index].Selection.StartPos = selectionTrue.StartPos; parent.Selection.StartPos = selectionTrue.StartPos;
oDocument.Content[index].Selection.EndPos = selectionTrue.EndPos; parent.Selection.EndPos = selectionTrue.EndPos;
} }
} }
......
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