Commit b9388d78 authored by GoshaZotov's avatar GoshaZotov

various changes

parent ee8361ea
......@@ -185,6 +185,7 @@
//только значения(вместо формул также вставляются значения)
this.revert();
this.val = true;
break;
}
case c_oSpecialPasteProps.valueNumberFormat:
{
......@@ -207,7 +208,6 @@
}
case c_oSpecialPasteProps.transpose:
{
break;
}
case c_oSpecialPasteProps.link:
......@@ -229,6 +229,9 @@
}
case c_oSpecialPasteProps.destinationFormatting:
{
//только значения(вместо формул также вставляются значения)
this.revert();
this.val = true;
break;
}
}
......
......@@ -711,7 +711,7 @@
},
"showSpecialPasteOptions": function(val) {
self.handlers.trigger("asc_onShowSpecialPasteOptions", val);
console.log("showSpecialPasteOptions");
//console.log("showSpecialPasteOptions");
}
});
......@@ -827,7 +827,7 @@
});
this.model.handlers.add("hideSpecialPasteOptions", function() {
self.handlers.trigger("asc_onHideSpecialPasteOptions");
console.log("hideSpecialPasteOptions");
//console.log("hideSpecialPasteOptions");
});
this.cellCommentator = new AscCommonExcel.CCellCommentator({
......
......@@ -8746,6 +8746,9 @@
if(!window["Asc"]["editor"].wb.clipboard.specialPasteProps)
{
var sBinary = window["Asc"]["editor"].wb.clipboard.copyProcessor.getBinaryForCopy(this, newRange);
var specialPasteSelectionRange = new AscCommonExcel.SelectionRange();
specialPasteSelectionRange.ranges[0] = newRange.clone();
window['AscCommon'].g_clipboardBase.specialPasteData.activeRange = specialPasteSelectionRange;
window['AscCommon'].g_clipboardBase.specialPasteUndoData.data = sBinary;
}
......@@ -8761,6 +8764,9 @@
WorksheetView.prototype.specialPaste = function (preSpecialPasteData, specialPasteData, props) {
var api = window["Asc"]["editor"];
History.Create_NewPoint();
History.StartTransaction();
//откатываемся до того, что было до вставки
if(preSpecialPasteData && preSpecialPasteData.data)
{
......@@ -8802,6 +8808,8 @@
api.wb.clipboard.specialPasteProps = props;
api.wb.clipboard.pasteData(this, specialPasteData._format, specialPasteData.data1, specialPasteData.data2, specialPasteData.text_data, true);
}
History.EndTransaction();
};
WorksheetView.prototype._pasteData = function (isLargeRange, fromBinary, val, bIsUpdate, canChangeColWidth) {
......@@ -8951,7 +8959,7 @@
var sProps = Asc.c_oSpecialPasteProps;
if(fromBinary)
{
allowedSpecialPasteProps = [sProps.paste, sProps.pasteOnlyFormula, sProps.formulaNumberFormat, sProps.formulaAllFormatting, sProps.formulaWithoutBorders, sProps.formulaColumnWidth, sProps.mergeConditionalFormating, sProps.pasteOnlyValues, sProps.valueNumberFormat, sProps.valueAllFormating, sProps.pasteOnlyFormating, sProps.link];
allowedSpecialPasteProps = [sProps.paste, sProps.pasteOnlyFormula, sProps.formulaNumberFormat, sProps.formulaAllFormatting, sProps.formulaWithoutBorders, sProps.formulaColumnWidth, sProps.pasteOnlyValues, sProps.valueNumberFormat, sProps.valueAllFormating, sProps.pasteOnlyFormating/*, sProps.link*/];
}
else
{
......@@ -9658,7 +9666,7 @@
range.setCellStyle(rangeStyle.cellStyle);
}
//numFormat
if(rangeStyle.numFormat && specialPasteProps.cellStyle)
if(rangeStyle.numFormat && specialPasteProps.numFormat)
{
range.setNumFormat(rangeStyle.numFormat);
}
......@@ -9732,7 +9740,7 @@
range.setWrap(rangeStyle.wrap);
}
//fill
if(rangeStyle.fill && specialPasteProps.fill)
if(specialPasteProps.fill)
{
range.setFill(rangeStyle.fill);
}
......
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