X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Gnumeric.js;h=be4e8d75195861ee5c5144d3020cde8e6084307b;hb=b9e901eca507e6c4ce523f34308d5c8dec8f97a4;hp=75b30bf046351a4104f63099305ce0034d883162;hpb=e809a6d5f38cce8b7771c63b5b2877204bd7f41f;p=Pman.Core diff --git a/Pman.Gnumeric.js b/Pman.Gnumeric.js index 75b30bf0..be4e8d75 100644 --- a/Pman.Gnumeric.js +++ b/Pman.Gnumeric.js @@ -1121,6 +1121,10 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, { }, + writeImageOld : function (row, col, data, width, height, type) + { + + }, /** @@ -1197,7 +1201,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 +1231,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 +1283,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 +1295,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 +1499,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;' +