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
......@@ -1683,32 +1683,33 @@ CopyProcessor.prototype =
this.ElemToSelect.appendChild( this.Para );
if(copyPasteUseBinery)
{
var index = cur_element.Parent.Index;
selectionTrue =
{
EndPos : oDocument.Content[index].Selection.EndPos,
StartPos: oDocument.Content[index].Selection.StartPos
};
var inIndex;
for(var k = 0; k < oDocument.Content[index].Content.length;k++)
{
if(oDocument.Content[index].Content[k] == cur_element)
{
inIndex = k;
break;
}
}
//меняем Selection
oDocument.Content[index].Selection.EndPos = inIndex + 1;
oDocument.Content[index].Selection.StartPos = inIndex;
oDocument.Content[index].Selection.Use = true;
this.oBinaryFileWriter.CopyParagraph(oDocument.Content[index], true);
{
var parent = cur_element.Parent;
selectionTrue =
{
EndPos : parent.Selection.EndPos,
StartPos: parent.Selection.StartPos
};
var inIndex;
for(var k = 0; k < parent.Content.length;k++)
{
if(parent.Content[k] == cur_element)
{
inIndex = k;
break;
}
}
//меняем Selection
parent.Selection.EndPos = inIndex + 1;
parent.Selection.StartPos = inIndex;
parent.Selection.Use = true;
this.oBinaryFileWriter.CopyParagraph(parent, true);
//возвращаем Selection
parent.Selection.StartPos = selectionTrue.StartPos;
parent.Selection.EndPos = selectionTrue.EndPos;
//возвращаем Selection
oDocument.Content[index].Selection.StartPos = selectionTrue.StartPos;
oDocument.Content[index].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