Commit 48f1040a authored by konovalovsergey's avatar konovalovsergey

findCellText and some other changes

parent d3c486d3
...@@ -3415,7 +3415,6 @@ var g_nInt16InitVal = 1<<15; ...@@ -3415,7 +3415,6 @@ var g_nInt16InitVal = 1<<15;
function Row(worksheet) function Row(worksheet)
{ {
this.ws = worksheet; this.ws = worksheet;
this.c = {};
this.index = null; this.index = null;
this.xfs = null; this.xfs = null;
this.h = null; this.h = null;
...@@ -3464,22 +3463,12 @@ Row.prototype = ...@@ -3464,22 +3463,12 @@ Row.prototype =
}, },
isEmpty : function() isEmpty : function()
{ {
if(!this.isEmptyProp()) return this.isEmptyProp();
return false;
var bEmptyCells = true;
for(var i in this.c)
{
bEmptyCells = false;
break;
}
if(false == bEmptyCells)
return false;
return true;
}, },
isEmptyProp : function() isEmptyProp : function()
{ {
//todo //todo
return null == this.xfs && null == this.h && g_nRowFlag_empty == this.flags; return null == this.xfs && null == this.h && g_nRowFlag_init == this.flags;
}, },
clone : function(oNewWs, renameParams) clone : function(oNewWs, renameParams)
{ {
...@@ -3540,7 +3529,6 @@ Row.prototype = ...@@ -3540,7 +3529,6 @@ Row.prototype =
{ {
var oldVal = this.xfs; var oldVal = this.xfs;
this.xfs = xfs; this.xfs = xfs;
this.flags |= g_nRowFlag_init;
this._hasChanged = true; this._hasChanged = true;
if (History.Is_On() && oldVal != this.xfs) { if (History.Is_On() && oldVal != this.xfs) {
History.Add(AscCommonExcel.g_oUndoRedoRow, AscCH.historyitem_RowCol_SetStyle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, this.xfs)); History.Add(AscCommonExcel.g_oUndoRedoRow, AscCH.historyitem_RowCol_SetStyle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, this.xfs));
...@@ -3708,7 +3696,6 @@ Row.prototype = ...@@ -3708,7 +3696,6 @@ Row.prototype =
} else { } else {
this.flags &= ~g_nRowFlag_hd; this.flags &= ~g_nRowFlag_hd;
} }
this.flags |= g_nRowFlag_init;
this._hasChanged = true; this._hasChanged = true;
if (this.index >= 0) { if (this.index >= 0) {
this.ws.hiddenManager.setDirty(true); this.ws.hiddenManager.setDirty(true);
...@@ -3723,7 +3710,6 @@ Row.prototype = ...@@ -3723,7 +3710,6 @@ Row.prototype =
} else { } else {
this.flags &= ~g_nRowFlag_CustomHeight; this.flags &= ~g_nRowFlag_CustomHeight;
} }
this.flags |= g_nRowFlag_init;
this._hasChanged = true; this._hasChanged = true;
}, },
getCustomHeight: function() { getCustomHeight: function() {
...@@ -3735,7 +3721,6 @@ Row.prototype = ...@@ -3735,7 +3721,6 @@ Row.prototype =
} else { } else {
this.flags &= ~g_nRowFlag_CalcHeight; this.flags &= ~g_nRowFlag_CalcHeight;
} }
this.flags |= g_nRowFlag_init;
this._hasChanged = true; this._hasChanged = true;
}, },
getCalcHeight: function() { getCalcHeight: function() {
...@@ -3754,7 +3739,6 @@ Row.prototype = ...@@ -3754,7 +3739,6 @@ Row.prototype =
val = Asc.c_oAscMaxRowHeight; val = Asc.c_oAscMaxRowHeight;
} }
this.h = this._prepareHeight(val); this.h = this._prepareHeight(val);
this.flags |= g_nRowFlag_init;
this._hasChanged = true; this._hasChanged = true;
}, },
getHeight: function() { getHeight: function() {
......
...@@ -1632,7 +1632,7 @@ ...@@ -1632,7 +1632,7 @@
} }
if (rowCache && rowCache.columnsWithText[c]) { if (rowCache && rowCache.columnsWithText[c]) {
rightSide = 0; rightSide = 0;
var ct = this._getCellTextCache(c, r); var ct = t._getCellTextCache(c, r);
if (ct !== undefined) { if (ct !== undefined) {
if (!ct.flags.isMerged() && !ct.flags.wrapText) { if (!ct.flags.isMerged() && !ct.flags.wrapText) {
rightSide = ct.sideR; rightSide = ct.sideR;
...@@ -10974,10 +10974,11 @@ ...@@ -10974,10 +10974,11 @@
if (c < minC || c > maxC || r < minR || r > maxR) { if (c < minC || c > maxC || r < minR || r > maxR) {
return undefined; return undefined;
} }
var cell = self.model._getCellNoEmpty(r, c); self.model._getCellNoEmpty(r, c, function(cell){
if (cell && !cell.isEmptyTextString()) { if (cell && !cell.isEmptyTextString()) {
ct = true; ct = true;
} }
});
} while (!ct); } while (!ct);
return ct; return ct;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment