Commit 30f3d833 authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete argument 'fromBinary' from setSelectionInfo

parent de2558be
......@@ -1098,6 +1098,7 @@
var oBinaryFileReader = new AscCommonExcel.BinaryFileReader(true);
var tempWorkbook = new AscCommonExcel.Workbook();
var t = this;
var newFonts;
pptx_content_loader.Start_UseFullUrl();
oBinaryFileReader.Read(base64, tempWorkbook);
......@@ -1137,7 +1138,7 @@
else if(!(window["Asc"]["editor"] && window["Asc"]["editor"].isChartEditor))
{
var newFonts = {};
newFonts = {};
for(var i = 0; i < pasteData.Drawings.length; i++)
{
pasteData.Drawings[i].graphicObject.getAllFonts(newFonts);
......@@ -1178,10 +1179,10 @@
}
else if(this._checkPasteFromBinaryExcel(worksheet, true, pasteData))
{
var newFonts = {};
newFonts = {};
pasteData.generateFontMap(newFonts);
worksheet._loadFonts(newFonts, function() {
worksheet.setSelectionInfo('paste', pasteData, false, true);
worksheet.setSelectionInfo('paste', {data: pasteData, fromBinary: true});
});
}
}
......@@ -2665,7 +2666,7 @@
var aResult = this._getTableFromText(worksheet, text);
if(aResult && !(aResult.onlyImages && window["Asc"]["editor"] && window["Asc"]["editor"].isChartEditor))
{
worksheet.setSelectionInfo('paste', aResult, this);
worksheet.setSelectionInfo('paste', {data: aResult});
}
},
......@@ -2981,7 +2982,7 @@
this.aResult.props._images = pasteData.images && pasteData.images.length ? pasteData.images : this.aResult.props._images;
this.aResult.props._aPastedImages = pasteData.aPastedImages && pasteData.aPastedImages.length ? pasteData.aPastedImages : this.aResult.props._aPastedImages;
worksheet.setSelectionInfo('paste', this.aResult, this);
worksheet.setSelectionInfo('paste', {data: this.aResult});
},
_parseChildren: function(children)
......
......@@ -8476,7 +8476,7 @@
}
};
WorksheetView.prototype.setSelectionInfo = function (prop, val, onlyActive, fromBinary) {
WorksheetView.prototype.setSelectionInfo = function (prop, val, onlyActive) {
// Проверка глобального лока
if (this.collaborativeEditing.getGlobalLock()) {
return;
......@@ -8717,7 +8717,7 @@
var clipboardBase = window['AscCommon'].g_clipboardBase;
clipboardBase.specialPasteProps = clipboardBase.specialPasteProps ? clipboardBase.specialPasteProps : new Asc.SpecialPasteProps();
t._loadDataBeforePaste(isLargeRange, fromBinary, val, bIsUpdate, canChangeColWidth);
t._loadDataBeforePaste(isLargeRange, val.fromBinary, val.data, bIsUpdate, canChangeColWidth);
bIsUpdate = false;
break;
case "hyperlink":
......@@ -8767,7 +8767,7 @@
}
//в случае, если вставляем из глобального буфера, транзакцию закрываем внутри функции _loadDataBeforePaste на callbacks от загрузки шрифтов и картинок
if (prop !== "paste" || (prop === "paste" && fromBinary)) {
if (prop !== "paste" || (prop === "paste" && val.fromBinary)) {
History.EndTransaction();
AscCommonExcel.g_clipboardExcel.end_paste();
}
......@@ -8779,13 +8779,7 @@
}
if ("paste" === prop && val.onlyImages !== true) {
var newRange;
if (fromBinary) {
newRange = this._pasteFromBinary(val, true);
} else {
newRange = this._pasteFromHTML(val, true);
}
var newRange = val.fromBinary ? this._pasteFromBinary(val.data, true) : this._pasteFromHTML(val.data, true);
var g_clipboardBase = window['AscCommon'].g_clipboardBase;
if (!AscCommonExcel.g_clipboardExcel.specialPasteStart) {
g_clipboardBase.specialPasteUndoData.data =
......
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