{
data = data || this.data;
-
- Roo.log(data);
-
for (var r = 0; r < this.rmax;r++) {
if (typeof(this.grid[r]) == 'undefined') {
continue;
*/
- writeImage : function (row, col, data, width, height)
+ writeImage : function (row, col, data, width, height, type)
{
if (!data) {
break;
}
}
-
soi.setAttribute('ObjectBound',
//gnumeric_colRowToName(row,col) + ':' + gnumeric_colRowToName(row+1,col+1));
soi.setAttribute('crop-left','0.000000');
soi.setAttribute('crop-right','0.000000');
// <Content image-type="jpeg" size-bytes="3900">...... < / Content>
+
+ var name = 'Image' + Math.random().toString(36).substring(2);
var content = this.doc.createElement('Content');
- content.setAttribute('image-type','jpeg');
- //alert(imgsrc);
+ content.setAttribute('image-type', type ? type : 'jpeg');
+ content.setAttribute('name', name);
+ soi.appendChild(content);
+ objs.appendChild(soi);
+
+ var worksheet = this.sheet.getElementsByTagNameNS('*','Workbook')[0];
+ var godoc = this.doc.createElementNS('http://www.gnumeric.org/v10.dtd', 'GODoc');
+
+ var goimage = this.doc.createElement('GOImage');
+ content.setAttribute('image-type', type ? type : 'jpeg');
+ content.setAttribute('name', name);
+ content.setAttribute('type', 'GOPixbuf');
+ content.setAttribute('width', width);
+ content.setAttribute('height', height);
+
content.setAttribute('size-bytes',data.length);
content.textContent = data;
- soi.appendChild(content);
- objs.appendChild(soi);
+
return true;
//< /gnm:SheetObjectImage>
// < /gnm:Objects>