Pman.Gnumeric.js
[Pman.Core] / Pman.Gnumeric.js
index 53a388f..e318f3c 100644 (file)
@@ -1119,23 +1119,6 @@ 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) 
-    {
-        
     },
     
     /**
@@ -1154,6 +1137,7 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
     
     writeImage : function (row, col, data, width, height, type) 
     {
+        
         if (!data) {
             throw "write Image called with missing data";
         }
@@ -1188,21 +1172,21 @@ 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));
-            this.RCtoCell(row,col) + ':' + this.RCtoCell(row,col));
+            this.RCtoCell(row,col) + ':' + this.RCtoCell(row,endcol));
      
         var ww = 0.01; // offset a bit...
         var hh = 0.01; //
@@ -1260,6 +1244,15 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
 
     },
     
+    /**
+     * writeFixedImageOld:
+     * write an image in old gnumberic format (needs base64 data to write it)
+     */
+    writeFixedImageOld : function (startCol, startRow, endCol, endRow, type, data, width, height) 
+    {
+        
+    },
+    
     writeFixedImage : function (startCol, startRow, endCol, endRow, type, data, width, height) 
     {
         if (!data) {