Pman.Gnumeric.js
[Pman.Core] / Pman.Gnumeric.js
index 041fde2..7f7d3c7 100644 (file)
@@ -1121,7 +1121,22 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
         
     },
     
-    
+    /**
+     * writeImage:
+     * write an image in old gnumberic format (needs base64 data to write it)
+     * 
+     * 
+     * @param {Number} row  row to put it in (rows start at 0)
+     * @param {Number} col  column to put it in
+     * @param {Number} data  the base64 description of the images
+     * @param {Number} width image width
+     * @param {Number} width image height
+     * 
+     */
+    writeImageOld : function (row, col, data, width, height, type) 
+    {
+        
+    },
     
     /**
      * writeImage:
@@ -1139,7 +1154,6 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
     
     writeImage : function (row, col, data, width, height, type) 
     {
-        
         if (!data) {
             throw "write Image called with missing data";
         }
@@ -1174,17 +1188,17 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
         
         // 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 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;
+//            }
+//        }
         
         soi.setAttribute('ObjectBound',
             //gnumeric_colRowToName(row,col) + ':' + gnumeric_colRowToName(row+1,col+1));
@@ -1496,6 +1510,7 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
                 }
                 
                 if(g.valueFormat == 'image') {
+                
                     out+=String.format('<td colspan="{0}" rowspan="{1}"  class="{2}"><div style="{3}"><img src="data:image/{4};base64, {5}" width="{6}" height="{7}"></div></td>', 
                         g.colspan, g.rowspan, g.cls.join(' '),
                         'overflow:hidden;' +