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

обработка при вставке картинки base64(presentation -> word)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61828 954022d7-b5bf-4e40-9824-e11837661b57
parent e12ac379
...@@ -3270,6 +3270,19 @@ PasteProcessor.prototype = ...@@ -3270,6 +3270,19 @@ PasteProcessor.prototype =
aImagesToDownload.push(objects.arrImages[i].Url); aImagesToDownload.push(objects.arrImages[i].Url);
} }
//если несколько графических объектов, то собираем base64 у таблиц(graphicFrame)
if(objects.arrShapes.length > 1)
{
for(var i = 0; i < objects.arrShapes.length; i++)
{
if(typeof CGraphicFrame !== "undefined" && objects.arrShapes[i].Drawing instanceof CGraphicFrame)
{
aImagesToDownload.push(objects.arrShapes[i].base64);
objects.arrImages.push(objects.arrShapes[i]);
}
}
}
var rData = {"id":documentId, "c":"imgurls", "vkey": documentVKey, "data": JSON.stringify(aImagesToDownload)}; var rData = {"id":documentId, "c":"imgurls", "vkey": documentVKey, "data": JSON.stringify(aImagesToDownload)};
sendCommand( this.api, function(incomeObject){ sendCommand( this.api, function(incomeObject){
if(incomeObject && "imgurls" == incomeObject.type) if(incomeObject && "imgurls" == incomeObject.type)
...@@ -3290,6 +3303,22 @@ PasteProcessor.prototype = ...@@ -3290,6 +3303,22 @@ PasteProcessor.prototype =
{ {
var imageElem = objects.arrImages[i]; var imageElem = objects.arrImages[i];
if(null != imageElem) if(null != imageElem)
{
//для вставки graphicFrame в виде картинки(если было при копировании выделено несколько графических объектов)
if(imageElem.base64)
{
var sNewSrc = oFromTo[imageElem.base64];
if(null != sNewSrc)
{
image_map[sNewSrc] = sNewSrc;
imageElem.base64 = sNewSrc;
}
else
{
image_map[imageElem.base64] = imageElem.base64;
}
}
else
{ {
var sNewSrc = oFromTo[imageElem.Url]; var sNewSrc = oFromTo[imageElem.Url];
if(null != sNewSrc) if(null != sNewSrc)
...@@ -3301,7 +3330,7 @@ PasteProcessor.prototype = ...@@ -3301,7 +3330,7 @@ PasteProcessor.prototype =
{ {
image_map[imageElem.Url] = imageElem.Url; image_map[imageElem.Url] = imageElem.Url;
} }
}
} }
} }
} }
......
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