X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Gnumeric.js;h=223933fede37eea9b9a7477efec39d328ee6fa8e;hb=dee81630b0cbaca06df3e6334d26481e79d49720;hp=75b30bf046351a4104f63099305ce0034d883162;hpb=e809a6d5f38cce8b7771c63b5b2877204bd7f41f;p=Pman.Core diff --git a/Pman.Gnumeric.js b/Pman.Gnumeric.js index 75b30bf0..223933fe 100644 --- a/Pman.Gnumeric.js +++ b/Pman.Gnumeric.js @@ -1197,7 +1197,7 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { var hh2 = 0.99; var offset_str = ww + ' ' + hh + ' ' + ww2 + ' '+hh2; - //console.log(offset_str ); + //alert(offset_str); soi.setAttribute('ObjectOffset', offset_str); soi.setAttribute('ObjectAnchorType','16 16 16 16'); @@ -1227,6 +1227,19 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { godoc.appendChild(goimage); + if (typeof(this.grid[row]) == 'undefined') { + this.grid[row] = []; + } + if (typeof(this.grid[row][col]) == 'undefined') { + this.createCell(row,col); + } + + this.grid[row][col].value= data; + this.grid[row][col].valueFormat = 'image'; + this.grid[row][col].imageType = type; + this.grid[row][col].width = width; + this.grid[row][col].height = height; + return true; //< /gnm:SheetObjectImage> // < /gnm:Objects> @@ -1266,8 +1279,6 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { soi.appendChild(content); objs.appendChild(soi); - Roo.log(name); - var godoc = this.doc.getElementsByTagNameNS('*','GODoc')[0]; var goimage = this.doc.createElement('GOImage'); @@ -1280,6 +1291,19 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { godoc.appendChild(goimage); + if (typeof(this.grid[startRow]) == 'undefined') { + this.grid[startRow] = []; + } + if (typeof(this.grid[startRow][startCol]) == 'undefined') { + this.createCell(startRow,startCol); + } + + this.grid[startRow][startCol].value= data; + this.grid[startRow][startCol].valueFormat = 'image'; + this.grid[startRow][startCol].imageType = type; + this.grid[startRow][startCol].width = width; + this.grid[startRow][startCol].height = height; + return true; }, @@ -1471,6 +1495,23 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { } + if(g.valueFormat == 'image') { + + out+=String.format('
', + g.colspan, g.rowspan, g.cls.join(' '), + 'overflow:hidden;' + + 'width:'+g.width+'px;' + + + 'text-overflow:ellipsis;' + + 'white-space:nowrap;', + g.imageType, + value, g.width, g.height + + ); + c+=(g.colspan-1); + continue; + } + out+=String.format('
{2}
', g.colspan, g.rowspan, value, 'overflow:hidden;' +