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 @@ ...@@ -2086,23 +2086,12 @@
table.appendChild(curImage); table.appendChild(curImage);
//add image or chart in local buffer //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] = {};
t.lStorage[nLoc].image = curImage; t.lStorage[nLoc].image = curImage;
t.lStorage[nLoc].fromCol = cloneImg.from.col; t.lStorage[nLoc].fromCol = cloneImg.from.col;
t.lStorage[nLoc].fromRow = cloneImg.from.row; t.lStorage[nLoc].fromRow = cloneImg.from.row;
nLoc++; nLoc++;
isImage = true; isImage = true;
}
t._addLocalStorage(isImage,isChart,range.worksheet.getCell( new CellAddress(row, col, 0) ),bbox.r1,bbox.c1, image.from.row, image.from.col); 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 @@ ...@@ -2529,28 +2518,12 @@
var firstRange = ws.activeRange.clone(true); var firstRange = ws.activeRange.clone(true);
for(i=0;i < array.length;i++) 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 binary_shape = array[i].image.getAttribute("alt");
var sub; var sub;
if(typeof binary_shape === "string") if(typeof binary_shape === "string")
sub = binary_shape.substr(0, 12); 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); var reader = CreateBinaryReader(binary_shape, 12, binary_shape.length);
reader.GetLong(); reader.GetLong();
...@@ -2587,6 +2560,11 @@ ...@@ -2587,6 +2560,11 @@
Drawing = new CGroupShape(); Drawing = new CGroupShape();
break; break;
} }
case "TeamLabChart":
{
Drawing = new CChartAsGroup();
break;
}
default : default :
{ {
Drawing = CreateImageFromBinary(src); Drawing = CreateImageFromBinary(src);
...@@ -2601,7 +2579,6 @@ ...@@ -2601,7 +2579,6 @@
Drawing.addToDrawingObjects(); Drawing.addToDrawingObjects();
} }
} }
}
return true; return true;
} }
......
...@@ -7171,7 +7171,7 @@ ...@@ -7171,7 +7171,7 @@
var sub; var sub;
if(typeof binary_shape === "string") if(typeof binary_shape === "string")
sub = binary_shape.substr(0, 12); 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); var reader = CreateBinaryReader(binary_shape, 12, binary_shape.length);
reader.GetLong(); reader.GetLong();
...@@ -7208,6 +7208,11 @@ ...@@ -7208,6 +7208,11 @@
Drawing = new CGroupShape(); Drawing = new CGroupShape();
break; break;
} }
case "TeamLabChart":
{
Drawing = new CChartAsGroup();
break;
}
default : default :
{ {
Drawing = CreateImageFromBinary(src); 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