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

изменения при copy/paste графических объектов

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55952 954022d7-b5bf-4e40-9824-e11837661b57
parent 057bf2b4
...@@ -1515,35 +1515,65 @@ CopyProcessor.prototype = ...@@ -1515,35 +1515,65 @@ CopyProcessor.prototype =
if(copyPasteUseBinery) if(copyPasteUseBinery)
{ {
var parent = cur_element.Parent; var paragraph = cur_element.Parent;
selectionTrue = selectionTrue =
{ {
EndPos : parent.Selection.EndPos, EndPos : paragraph.Selection.EndPos,
StartPos: parent.Selection.StartPos StartPos: paragraph.Selection.StartPos
}; };
var inIndex;
for(var k = 0; k < parent.Content.length;k++) var inIndex;
var paragraphIndex;
var content;
var curParaRun;
for(var k = 0; k < paragraph.Content.length;k++)
{ {
if(parent.Content[k] == cur_element) content = paragraph.Content[k].Content;
{ for(var n = 0; n < content.length; n++)
inIndex = k; {
break; if(content[n] == cur_element)
} {
} curParaRun = paragraph.Content[k];
inIndex = n;
paragraphIndex = k;
break;
};
};
if(inIndex != undefined)
break;
};
selectionTrue =
{
EndPos : curParaRun.Selection.EndPos,
StartPos: curParaRun.Selection.StartPos,
EndPosParagraph : paragraph.Selection.EndPos,
StartPosParagraph: paragraph.Selection.StartPos
};
//меняем Selection //меняем Selection
parent.Selection.EndPos = inIndex + 1; curParaRun.Selection.EndPos = inIndex + 1;
parent.Selection.StartPos = inIndex; curParaRun.Selection.StartPos = inIndex;
parent.Selection.Use = true; curParaRun.Selection.Use = true;
paragraph.Selection.EndPos = paragraphIndex + 1;
paragraph.Selection.StartPos = paragraphIndex;
paragraph.Selection.Use = true;
this.oBinaryFileWriter.CopyParagraph(parent); this.oBinaryFileWriter.CopyParagraph(paragraph);
//возвращаем Selection //возвращаем Selection
parent.Selection.StartPos = selectionTrue.StartPos; curParaRun.Selection.StartPos = selectionTrue.StartPos;
parent.Selection.EndPos = selectionTrue.EndPos; curParaRun.Selection.EndPos = selectionTrue.EndPos;
paragraph.Selection.StartPos = selectionTrue.StartPosParagraph;
paragraph.Selection.EndPos = selectionTrue.EndPosParagraph;
} }
} }
if(copyPasteUseBinery)
if(copyPasteUseBinery)
{ {
this.oBinaryFileWriter.CopyEnd(); this.oBinaryFileWriter.CopyEnd();
var sBase64 = this.oBinaryFileWriter.GetResult(); var sBase64 = this.oBinaryFileWriter.GetResult();
......
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