Commit cb3daa25 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48914 954022d7-b5bf-4e40-9824-e11837661b57
parent eaacf002
......@@ -1623,6 +1623,65 @@ CGroupShape.prototype =
break;
}
}
},
writeToBinaryForCopyPaste: function(w)
{
this.spPr.Write_ToBinary2(w);
w.WriteLong(this.spTree.length);
for(var i = 0; i < this.spTree.length; ++i)
{
w.WriteLong(this.spTree[i].getObjectType());
this.spTree[i].writeToBinaryForCopyPaste(w);
}
},
getBase64Image: function()
{
return ShapeToImageConverter(this, this.pageIndex).ImageUrl;
},
readFromBinaryForCopyPaste: function(r, group, drawingObjects)
{
this.group = group;
this.drawingObjects = drawingObjects;
this.spPr.Read_FromBinary2(r);
var l = r.GetLong();
for(var i = 0; i < l;++i)
{
switch (r.GetLong())
{
case CLASS_TYPE_SHAPE:
{
this.spTree[i] = new CShape(null, drawingObjects);
this.spTree[i].readFromBinaryForCopyPaste(r, this, drawingObjects);
break;
}
case CLASS_TYPE_IMAGE:
{
this.spTree[i] = new CImageShape(null, drawingObjects);
this.spTree[i].readFromBinaryForCopyPaste(r, this, drawingObjects);
break;
}
case CLASS_TYPE_GROUP:
{
this.spTree[i] = new CGroupShape(null, drawingObjects);
this.spTree[i].readFromBinaryForCopyPaste(r, this, drawingObjects);
break;
}
}
}
if(!isRealObject(group))
{
this.recalculate();
this.recalculateTransform();
this.calculateContent();
this.calculateTransformTextMatrix();
}
}
};
......
......@@ -1050,6 +1050,34 @@ CImageShape.prototype =
break;
}
}
},
getBase64Image: function()
{
return ShapeToImageConverter(this, this.pageIndex).ImageUrl;
},
writeToBinaryForCopyPaste: function(w)
{
this.blipFill.Write_ToBinary2(w);
this.spPr.Write_ToBinary2(w);
},
readFromBinaryForCopyPaste: function(r, group, drawingObjects)
{
this.group = group;
this.drawingObjects = drawingObjects;
this.blipFill.Read_FromBinary2(r);
this.spPr.Read_FromBinary2(r);
if(!isRealObject(group))
{
this.recalculate();
this.recalculateTransform();
this.calculateContent();
this.calculateTransformTextMatrix();
}
}
};
\ No newline at end of file
......@@ -2780,6 +2780,54 @@ CShape.prototype =
break;
}
}
},
getBase64Image: function()
{
return ShapeToImageConverter(this, this.pageIndex).ImageUrl;
},
writeToBinaryForCopyPaste: function()
{
var w = new CMemory();
var start_string = "";
this.spPr.Write_ToBinary2(w);
w.WriteBool(isRealObject(this.style));
if(isRealObject(this.style))
{
this.style.Write_ToBinary2(w);
}
w.WriteBool(isRealObject(this.txBody));
if(isRealObject(this.txBody))
{
this.txBody.writeToBinaryForCopyPaste(w);
}
return start_string + w.pos + ";" + w.GetBase64Memory();
},
readFromBinaryForCopyPaste: function(r, group, drawingObjects)
{
this.group = group;
this.drawingObjects = drawingObjects;
this.spPr.Read_FromBinary2(r);
if(r.GetBool())
{
this.style = new CShapeStyle();
this.style.Read_FromBinary2(r);
}
if(r.GetBool())
{
this.txBody = new CTextBody(this);
this.txBody.Read_FromBinary2(r);
}
if(!isRealObject(group))
{
this.recalculate();
this.recalculateTransform();
this.calculateContent();
this.calculateTransformTextMatrix();
}
}
};
......
......@@ -903,5 +903,16 @@ CTextBody.prototype =
break;
}
}
},
writeToBinaryForCopyPaste: function(w)
{
this.bodyPr.Write_ToBinary2(w);
},
readFromBinaryForCopyPaste: function(r, drawingDocument)
{
this.bodyPr.Read_FromBinary2(r);
this.content = new CDocumentContent(this, drawingDocument, 0, 0, 0, 20000, false, false);
}
};
\ No newline at end of file
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