Commit 62b55499 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 19726 - Изменение атрибутов текста возвращает тексту стиль до Clear...

Bug 19726 - Изменение атрибутов текста возвращает тексту стиль до Clear Format, прописанный в самой таблице

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49001 954022d7-b5bf-4e40-9824-e11837661b57
parent 30ed7806
...@@ -3278,6 +3278,8 @@ Woorksheet.prototype._getRow=function(row){ ...@@ -3278,6 +3278,8 @@ Woorksheet.prototype._getRow=function(row){
if(!oCurRow){ if(!oCurRow){
oCurRow = new Row(this); oCurRow = new Row(this);
oCurRow.create(row + 1); oCurRow.create(row + 1);
if(null != this.oAllCol && null != this.oAllCol.xfs)
oCurRow.xfs = this.oAllCol.xfs.clone();
this.aGCells[row] = oCurRow; this.aGCells[row] = oCurRow;
this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount ; this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount ;
//History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_CreateRow, this.getId(), null, new UndoRedoData_SingleProperty(row)); //History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_CreateRow, this.getId(), null, new UndoRedoData_SingleProperty(row));
...@@ -4157,17 +4159,6 @@ Cell.prototype.setType=function(type){ ...@@ -4157,17 +4159,6 @@ Cell.prototype.setType=function(type){
Cell.prototype.getType=function(){ Cell.prototype.getType=function(){
return this.oValue.type; return this.oValue.type;
}; };
Cell.prototype.getDefaultFormat=function(oDefault){
var nRow = this.oId.getRow0();
var nCol = this.oId.getCol0();
var row = this.ws._getRowNoEmpty(nRow);
if(null != row && null != row.xfs)
return row.xfs;
var col = this.ws._getColNoEmptyWithAll(nCol);
if(null != col && null != col.xfs)
return col.xfs;
return oDefault;
};
Cell.prototype.setCellStyle=function(val){ Cell.prototype.setCellStyle=function(val){
var newVal = this.cs._prepareCellStyle(val); var newVal = this.cs._prepareCellStyle(val);
var oRes = this.sm.setCellStyle(this, newVal); var oRes = this.sm.setCellStyle(this, newVal);
......
...@@ -1428,7 +1428,7 @@ StyleManager.prototype = ...@@ -1428,7 +1428,7 @@ StyleManager.prototype =
_prepareSet : function(oItemWithXfs) _prepareSet : function(oItemWithXfs)
{ {
if(null == oItemWithXfs.xfs) if(null == oItemWithXfs.xfs)
oItemWithXfs.xfs = oItemWithXfs.getDefaultFormat(this.oDefaultXfs).clone(); oItemWithXfs.xfs = this.oDefaultXfs.clone();
return oItemWithXfs.xfs; return oItemWithXfs.xfs;
}, },
_prepareSetFont : function(oItemWithXfs) _prepareSetFont : function(oItemWithXfs)
...@@ -2059,13 +2059,6 @@ Col.prototype = ...@@ -2059,13 +2059,6 @@ Col.prototype =
else else
this.BestFit = null; this.BestFit = null;
}, },
getDefaultFormat : function(oDefault)
{
if(null != this.ws.oAllCol && null != this.ws.oAllCol.xfs)
return this.ws.oAllCol.xfs;
else
return oDefault;
},
getMerged : function() getMerged : function()
{ {
return this.merged; return this.merged;
...@@ -2338,13 +2331,6 @@ Row.prototype = ...@@ -2338,13 +2331,6 @@ Row.prototype =
if(null != otherRow.hd) if(null != otherRow.hd)
this.hd = otherRow.hd; this.hd = otherRow.hd;
}, },
getDefaultFormat : function(oDefault)
{
if(null != this.ws.oAllCol && null != this.ws.oAllCol.xfs)
return this.ws.oAllCol.xfs;
else
return oDefault;
},
getMerged : function() getMerged : function()
{ {
return this.merged; return this.merged;
......
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