Commit 946e1f40 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 19460 - Стиль Форматировать как таблицу отменяется не полностью для ячеек с данными (Undo)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48401 954022d7-b5bf-4e40-9824-e11837661b57
parent 4755641b
...@@ -4925,6 +4925,27 @@ Range.prototype.setCellStyle=function(val){ ...@@ -4925,6 +4925,27 @@ Range.prototype.setCellStyle=function(val){
cell.setCellStyle(val); cell.setCellStyle(val);
}); });
}; };
Range.prototype.setTableStyle=function(val){
this.createCellOnRowColCross();
var fSetProperty = this._setProperty;
var nRangeType = this._getRangeType();
if(c_oRangeType.All == nRangeType)
{
//this.worksheet.getAllCol().setCellStyle(val);
fSetProperty = this._setPropertyNoEmpty;
}
fSetProperty.call(this, function(row){
if(c_oRangeType.All == nRangeType && null == row.xfs)
return;
//row.setCellStyle(val);
},
function(col){
//col.setCellStyle(val);
},
function(cell){
cell.setTableStyle(val);
});
};
Range.prototype.setNumFormat=function(val){ Range.prototype.setNumFormat=function(val){
History.Create_NewPoint(); History.Create_NewPoint();
var oBBox = this.bbox; var oBBox = this.bbox;
......
...@@ -1640,6 +1640,7 @@ ...@@ -1640,6 +1640,7 @@
{ {
if(cloneData.refTable == aWs.TableParts[l].Ref) if(cloneData.refTable == aWs.TableParts[l].Ref)
{ {
this._cleanStyleTable(aWs, cloneData.refTable);
aWs.TableParts.splice(l,1); aWs.TableParts.splice(l,1);
} }
} }
...@@ -1708,6 +1709,7 @@ ...@@ -1708,6 +1709,7 @@
{ {
if(cloneData.Ref == aWs.TableParts[l].Ref) if(cloneData.Ref == aWs.TableParts[l].Ref)
{ {
this._cleanStyleTable(aWs, cloneData.Ref);
aWs.TableParts.splice(l,1); aWs.TableParts.splice(l,1);
} }
} }
...@@ -2917,7 +2919,11 @@ ...@@ -2917,7 +2919,11 @@
} }
}, },
_cleanStyleTable : function(ws, sRef)
{
var oRange = ws.getRange2(sRef);
oRange.setTableStyle(null);
},
_setColorStyleTable: function(id,idNext,ws,options, isOpenFilter) _setColorStyleTable: function(id,idNext,ws,options, isOpenFilter)
{ {
var firstCellAddress = new CellAddress(id); var firstCellAddress = new CellAddress(id);
......
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