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

http://bugzserver/show_bug.cgi?id=27251 - [Copy&Paste] JS ошибка при...

http://bugzserver/show_bug.cgi?id=27251 -  [Copy&Paste] JS ошибка при copy&paste текста в заголовке диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59268 954022d7-b5bf-4e40-9824-e11837661b57
parent c8b241d7
......@@ -1411,7 +1411,7 @@ CopyProcessor.prototype =
this.CommitList(oDomTarget);
},
CopyDocument2 : function(oDomTarget, oDocument, bUseSelection, elementsContent)
CopyDocument2 : function(oDomTarget, oDocument, bUseSelection, elementsContent, bFromPresentation)
{
if(g_bIsDocumentCopyPaste)
{
......@@ -1432,12 +1432,16 @@ CopyProcessor.prototype =
if(!this.onlyBinaryCopy)
this.CopyTable(oDomTarget, Item, null);
this.oBinaryFileWriter.copyParams.bLockCopyElems--;
this.oBinaryFileWriter.CopyTable(Item, null);
if(!bFromPresentation)
this.oBinaryFileWriter.CopyTable(Item, null);
}
else if ( type_Paragraph === Item.GetType() )
{
//todo ����� ������ ��� �������� ������ ���� Index == End
this.oBinaryFileWriter.CopyParagraph(Item, elementsContent[Index].SelectedAll);
if(!bFromPresentation)
this.oBinaryFileWriter.CopyParagraph(Item, elementsContent[Index].SelectedAll);
if(!this.onlyBinaryCopy)
this.CopyParagraph(oDomTarget, Item, true, false);
}
......@@ -1632,6 +1636,7 @@ CopyProcessor.prototype =
Start : function(node)
{
var oDocument = this.oDocument;
var bFromPresentation;
if(g_bIsDocumentCopyPaste)
{
......@@ -1642,12 +1647,21 @@ CopyProcessor.prototype =
elementsContent = selectedContent.Elements;
else
return;
//TODO заглушка для презентационных параграфов(выделен текст внутри диаграммы) - пока не пишем в бинарник
if(selectedContent.Elements[0].Element && selectedContent.Elements[0].Element.bFromDocument === false)
bFromPresentation = true;
//подменяем Document для копирования(если не подменить, то commentId будет не соответствовать)
this.oBinaryFileWriter.Document = elementsContent[0].Element.LogicDocument;
this.oBinaryFileWriter.CopyStart();
this.CopyDocument2(this.ElemToSelect, oDocument, false, elementsContent);
this.oBinaryFileWriter.CopyEnd();
if(!bFromPresentation)
this.oBinaryFileWriter.CopyStart();
this.CopyDocument2(this.ElemToSelect, oDocument, false, elementsContent, bFromPresentation);
if(!bFromPresentation)
this.oBinaryFileWriter.CopyEnd();
}
else
{
......@@ -1668,7 +1682,7 @@ CopyProcessor.prototype =
$(this.ElemToSelect.children[0]).addClass("pptData;" + sBase64);
}
if(g_bIsDocumentCopyPaste && copyPasteUseBinary && this.oBinaryFileWriter.copyParams.itemCount > 0)
if(g_bIsDocumentCopyPaste && copyPasteUseBinary && this.oBinaryFileWriter.copyParams.itemCount > 0 && !bFromPresentation)
{
var sBase64 = this.oBinaryFileWriter.GetResult();
if(this.ElemToSelect.children && this.ElemToSelect.children.length == 1 && window.USER_AGENT_SAFARI_MACOS)
......
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