- // step 1 - work out how many columns it will span..
- // lets hope the spreadsheet is big enought..
- var colwidth = 0;
- var endcol=col;
- for ( endcol=col;endcol <100; endcol++) {
- if (!this.colInfo[endcol]) {
- this.colInfo[endcol] = 100; // eak fudge
- }
- colwidth += this.colInfo[endcol];
- if (colwidth > width) {
- break;
- }
+// var name = 'Image' + Math.random().toString(36).substring(2);
+ var content = this.doc.createElement('Content');
+ content.setAttribute('image-type', type ? type : 'jpeg');
+
+// content.setAttribute('name', name);
+ soi.appendChild(content);
+ objs.appendChild(soi);
+
+ var godoc = this.doc.getElementsByTagNameNS('*','GODoc')[0];
+
+ var goimage = this.doc.createElement('GOImage');
+ goimage.setAttribute('image-type', type ? type : 'jpeg');
+ goimage.setAttribute('name', name);
+ goimage.setAttribute('type', 'GOPixbuf');
+ goimage.setAttribute('width', width);
+ goimage.setAttribute('height', height);
+ goimage.textContent = data;
+
+ godoc.appendChild(goimage);
+
+ if (typeof(this.grid[startRow]) == 'undefined') {
+ this.grid[startRow] = [];
+ }
+ if (typeof(this.grid[startRow][startCol]) == 'undefined') {
+ this.createCell(startRow,startCol);