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

http://bugzserver/show_bug.cgi?id=24887 - Сбрасывается фокус при вставке графического объекта

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57341 954022d7-b5bf-4e40-9824-e11837661b57
parent 4420fe14
......@@ -2761,7 +2761,10 @@ PasteProcessor.prototype =
oSelectedContent.Add(oSelectedElement);
}
oDoc.Insert_Content(oSelectedContent, NearPos);
paragraph.Clear_NearestPosArray();
this._selectShapesBeforeInsert(aNewContent, oDoc);
paragraph.Clear_NearestPosArray(aNewContent);
}
},
......@@ -3812,6 +3815,30 @@ PasteProcessor.prototype =
return {content: aContent, aPastedImages: aPastedImages, images: images};
},
_selectShapesBeforeInsert: function(aNewContent, oDoc)
{
var content, drawingObj, allDrawingObj = [];
for(var i = 0; i < aNewContent.length; i++)
{
content = aNewContent[i];
drawingObj = content.Get_AllDrawingObjects();
if(!drawingObj || (drawingObj && !drawingObj.length) || content.GetType() == type_Table)
{
allDrawingObj = null;
break;
}
for(var n = 0; n < drawingObj.length; n++)
{
allDrawingObj[allDrawingObj.length] = drawingObj[n];
};
};
if(allDrawingObj && allDrawingObj.length)
oDoc.Select_Drawings(allDrawingObj, oDoc);
},
_readFromBinaryExcel: function(base64)
{
var oBinaryFileReader = new Asc.BinaryFileReader(null, true);
......
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