Pman.Gnumeric.js
[Pman.Core] / Pman.Gnumeric.js
index 91a7fff..03b5d6d 100644 (file)
@@ -382,7 +382,10 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
                 for (var c = s.c; c < s.c1;c++) {
                     if (c > _t.cmax) continue;
     
-                    if (typeof(_t.grid[r][c]) == 'undefined') _t.grid[r][c] = Roo.applyIf({ r: r , c : c }, _t.defaultCell);
+                    if (typeof(_t.grid[r][c]) == 'undefined') {
+                        _t.createCell(r,c);
+                        //_t.grid[r][c] = Roo.applyIf({ r: r , c : c }, _t.defaultCell);
+                    }
                     var g=_t.grid[r][c];
                     if (typeof(g.cls) =='undefined') {
                         g.cls = [];
@@ -1369,12 +1372,40 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
         for (var r = 0; r < this.rmax;r++) {
             out += '<tr style="height:'+this.rowInfo[r]+'px;">';
             for (var c = 0; c < this.cmax;c++) {
-                var g = (typeof(grid[r][c]) == 'undefined') ? this.defaultCell  : grid[r][c];
+                if (typeof(grid[r][c]) == 'undefined')  {
+                    this.createCell(r,c);
+                    
+                }
+                var g = grid[r][c];
                 
                 if (typeof(g.cls) =='undefined') g.cls = [];
                 var w= calcWidth(c,g.colspan);
+                
+                var value = g.value[0] == '=' ? 'CALCULATED' : g.value;
+                
+//                if(
+//                        typeof(g.styles.firstElementChild.attributes) != 'undefined' && 
+//                        typeof(g.styles.firstElementChild.attributes[12])
+//                ){
+//                    
+//                }
+                if(value == '01/Jan/2014'){
+                    Roo.log(g.styles[0].firstElementChild.attributes[12].value);
+                    Roo.log(value);
+                    Roo.log(typeof(value));
+                    Roo.log(typeof(g.styles[0].firstElementChild.attributes[12].value));
+                }
+                if(
+                        typeof(g.styles[0].firstElementChild.attributes[12].value) != 'undefined' && 
+                        g.styles[0].firstElementChild.attributes[12].value == "D\-MMM\-YYYY;@"
+                ){
+                    Roo.log(value);
+                    value = 'test';
+                }
+                
+                
                 out+=String.format('<td colspan="{0}" rowspan="{1}"  class="{4}"><div style="{3}">{2}</div></td>', 
-                    g.colspan, g.rowspan, g.value,
+                    g.colspan, g.rowspan, value,
                     'overflow:hidden;' + 
                     'width:'+w+'px;' +