Commit 4ce49c81 authored by GoshaZotov's avatar GoshaZotov

fix bug 34505

parent 4505c702
......@@ -5443,7 +5443,7 @@ Woorksheet.prototype.isApplyFilterBySheet = function(){
}
}
};
Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
if(null != action)
{
var oBBox = this.bbox, minC = Math.min( this.worksheet.getColsCount(), oBBox.c2 ), minR = Math.min( this.worksheet.getRowsCount(), oBBox.r2 );
......@@ -5813,6 +5813,15 @@ Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
});
History.EndTransaction();
};
Range.prototype.setValueData = function(val){
History.Create_NewPoint();
History.StartTransaction();
this._foreach(function(cell){
cell.setValueData(val);
});
History.EndTransaction();
};
Range.prototype.setCellStyle=function(val){
History.Create_NewPoint();
this.createCellOnRowColCross();
......@@ -6535,6 +6544,13 @@ Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
return oTempCell.getValue2(dDigitsCount, fIsFitMeasurer);
}
};
Range.prototype.getValueData=function(){
var res = null;
var cell = this.worksheet._getCellNoEmpty(this.bbox.r1, this.bbox.c1);
if(null != cell)
res = cell.getValueData();
return res;
};
Range.prototype.getXfId=function(){
var nRow = this.bbox.r1;
var nCol = this.bbox.c1;
......
......@@ -9813,7 +9813,21 @@
var skipFormat = null;
var noSkipVal = null;
rangeStyle.val = newVal.getValue();
var cellValueData = newVal.getValueData();
if(cellValueData && cellValueData.value)
{
rangeStyle.cellValueData = cellValueData;
}
else if(cellValueData && cellValueData.formula && !specialPasteProps.formula)
{
cellValueData.formula = null;
rangeStyle.cellValueData = cellValueData;
}
else
{
rangeStyle.val = newVal.getValue();
}
var value2 = newVal.getValue2();
for (var nF = 0; nF < value2.length; nF++) {
if (value2[nF] && value2[nF].sId) {
......@@ -9886,7 +9900,7 @@
if (cellFrom && cellTo && cellFrom[0] && cellTo[0]) {
//cellTo[0].setValueData(cellFrom[0].getValueData());
rangeStyle.cellValueData = {valueData: cellFrom[0].getValueData(), cell: cellTo[0]};
rangeStyle.cellValueData2 = {valueData: cellFrom[0].getValueData(), cell: cellTo[0]};
}
}
......@@ -9983,9 +9997,9 @@
{
arrFormula.push(rangeStyle.formula);
}
else if(rangeStyle.cellValueData && specialPasteProps.font && specialPasteProps.val)
else if(rangeStyle.cellValueData2 && specialPasteProps.font && specialPasteProps.val)
{
rangeStyle.cellValueData.cell.setValueData(rangeStyle.cellValueData.valueData);
rangeStyle.cellValueData2.cell.setValueData(rangeStyle.cellValueData2.valueData);
}
else if(rangeStyle.value2 && specialPasteProps.font && specialPasteProps.val)
{
......@@ -9998,6 +10012,10 @@
range.setValue2(rangeStyle.value2);
}
}
else if(rangeStyle.cellValueData && specialPasteProps.val)
{
range.setValueData(rangeStyle.cellValueData);
}
else if(rangeStyle.val && specialPasteProps.val)
{
range.setValue(rangeStyle.val);
......
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