Commit 2e544cf0 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@49554 954022d7-b5bf-4e40-9824-e11837661b57
parent e467763a
......@@ -2086,23 +2086,12 @@
table.appendChild(curImage);
//add image or chart in local buffer
if(image.graphicObject.isChart())
{
isChart = {};
isChart.chart = cloneImg.chart;
isChart.src = cloneImg.src;
isChart.height = curImage.height;
isChart.width = curImage.width;
}
else
{
t.lStorage[nLoc] = {};
t.lStorage[nLoc].image = curImage;
t.lStorage[nLoc].fromCol = cloneImg.from.col;
t.lStorage[nLoc].fromRow = cloneImg.from.row;
nLoc++;
isImage = true;
}
t._addLocalStorage(isImage,isChart,range.worksheet.getCell( new CellAddress(row, col, 0) ),bbox.r1,bbox.c1, image.from.row, image.from.col);
}
......@@ -2529,28 +2518,12 @@
var firstRange = ws.activeRange.clone(true);
for(i=0;i < array.length;i++)
{
if(typeof array[i].isChart == 'object')
{
var activeRange = ws.activeRange;
var left = ws.cols[activeRange.c1].left;
var top = ws.rows[activeRange.r1].top;
var options =
{
height: array[i].isChart.height,
width: array[i].isChart.width,
left: left,
top: top
}
ws.objectRender.addChartDrawingObject(array[i].isChart.chart,null,options);
}
else
{
var binary_shape = array[i].image.getAttribute("alt");
var sub;
if(typeof binary_shape === "string")
sub = binary_shape.substr(0, 12);
if(typeof binary_shape === "string" &&( sub === "TeamLabShape" || sub === "TeamLabImage" /*|| sub === "TeamLabChart" */|| sub === "TeamLabGroup"))
if(typeof binary_shape === "string" &&( sub === "TeamLabShape" || sub === "TeamLabImage" || sub === "TeamLabChart" || sub === "TeamLabGroup"))
{
var reader = CreateBinaryReader(binary_shape, 12, binary_shape.length);
reader.GetLong();
......@@ -2587,6 +2560,11 @@
Drawing = new CGroupShape();
break;
}
case "TeamLabChart":
{
Drawing = new CChartAsGroup();
break;
}
default :
{
Drawing = CreateImageFromBinary(src);
......@@ -2601,7 +2579,6 @@
Drawing.addToDrawingObjects();
}
}
}
return true;
}
......
......@@ -7171,7 +7171,7 @@
var sub;
if(typeof binary_shape === "string")
sub = binary_shape.substr(0, 12);
if(typeof binary_shape === "string" &&( sub === "TeamLabShape" || sub === "TeamLabImage" /*|| sub === "TeamLabChart" */|| sub === "TeamLabGroup"))
if(typeof binary_shape === "string" &&( sub === "TeamLabShape" || sub === "TeamLabImage" || sub === "TeamLabChart" || sub === "TeamLabGroup"))
{
var reader = CreateBinaryReader(binary_shape, 12, binary_shape.length);
reader.GetLong();
......@@ -7208,6 +7208,11 @@
Drawing = new CGroupShape();
break;
}
case "TeamLabChart":
{
Drawing = new CChartAsGroup();
break;
}
default :
{
Drawing = CreateImageFromBinary(src);
......
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