Commit f54601ac authored by GoshaZotov's avatar GoshaZotov

WorkbookView.clipboard -> window['AscCommonExcel'].g_clipboardExcel

parent 2d2e3fc4
...@@ -484,7 +484,7 @@ CHistory.prototype.UndoRedoEnd = function (Point, oRedoObjectParam, bUndo) { ...@@ -484,7 +484,7 @@ CHistory.prototype.UndoRedoEnd = function (Point, oRedoObjectParam, bUndo) {
if (oRedoObjectParam.bIsOn) if (oRedoObjectParam.bIsOn)
this.TurnOn(); this.TurnOn();
if(!window["Asc"]["editor"].wb.clipboard.pasteStart) if(!AscCommonExcel.g_clipboardExcel.pasteStart)
{ {
this.workbook.handlers.trigger("hideSpecialPasteOptions"); this.workbook.handlers.trigger("hideSpecialPasteOptions");
} }
...@@ -741,7 +741,7 @@ CHistory.prototype._sendCanUndoRedo = function() ...@@ -741,7 +741,7 @@ CHistory.prototype._sendCanUndoRedo = function()
this.workbook.handlers.trigger("setDocumentModified", this.Have_Changes()); this.workbook.handlers.trigger("setDocumentModified", this.Have_Changes());
//скрываю кнопку специальной вставки при каждом действии/undoredo //скрываю кнопку специальной вставки при каждом действии/undoredo
//при выполнении специальной вставки и при сохранении(-1 !== this.Index) не скрываю кнопку //при выполнении специальной вставки и при сохранении(-1 !== this.Index) не скрываю кнопку
if(!window["Asc"]["editor"].wb.clipboard.pasteStart && -1 !== this.Index && !(this.workbook.bUndoChanges || this.workbook.bRedoChanges)) if(!AscCommonExcel.g_clipboardExcel.pasteStart && -1 !== this.Index && !(this.workbook.bUndoChanges || this.workbook.bRedoChanges))
{ {
this.workbook.handlers.trigger("hideSpecialPasteOptions"); this.workbook.handlers.trigger("hideSpecialPasteOptions");
} }
......
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
var t = this; var t = this;
t.pasteProcessor.clean(); t.pasteProcessor.clean();
window["Asc"]["editor"].wb.clipboard.start_paste(); this.start_paste();
if(!bIsSpecialPaste) if(!bIsSpecialPaste)
{ {
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
if(text) if(text)
{ {
window["Asc"]["editor"].wb.cellEditor.pasteText(text); window["Asc"]["editor"].wb.cellEditor.pasteText(text);
window["Asc"]["editor"].wb.clipboard.end_paste(); this.end_paste();
} }
} }
else else
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
if(text) if(text)
{ {
window["Asc"]["editor"].wb.cellEditor.pasteText(text); window["Asc"]["editor"].wb.cellEditor.pasteText(text);
window["Asc"]["editor"].wb.clipboard.end_paste(); this.end_paste();
} }
} }
else else
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
if(data1) if(data1)
{ {
window["Asc"]["editor"].wb.cellEditor.pasteText(data1); window["Asc"]["editor"].wb.cellEditor.pasteText(data1);
window["Asc"]["editor"].wb.clipboard.end_paste(); this.end_paste();
} }
} }
else else
...@@ -472,7 +472,7 @@ ...@@ -472,7 +472,7 @@
function CopyProcessorExcel() function CopyProcessorExcel()
{ {
this.Api = window["Asc"]["editor"];
} }
CopyProcessorExcel.prototype = { CopyProcessorExcel.prototype = {
...@@ -739,7 +739,7 @@ ...@@ -739,7 +739,7 @@
} }
else if(isSelectedImages && isSelectedImages != -1)//графические объекты else if(isSelectedImages && isSelectedImages != -1)//графические объекты
{ {
if(this.Api && this.Api.isChartEditor) if(window["Asc"]["editor"] && window["Asc"]["editor"].isChartEditor)
return false; return false;
objectRender.preCopy(); objectRender.preCopy();
var table = document.createElement('span'); var table = document.createElement('span');
...@@ -1011,8 +1011,6 @@ ...@@ -1011,8 +1011,6 @@
this.oSpecialPaste = {}; this.oSpecialPaste = {};
this.Api = window["Asc"]["editor"];
this.fontsNew = {}; this.fontsNew = {};
this.oImages = {}; this.oImages = {};
} }
...@@ -1144,7 +1142,7 @@ ...@@ -1144,7 +1142,7 @@
{ {
t._insertBinaryIntoShapeContent(worksheet, [docContent]); t._insertBinaryIntoShapeContent(worksheet, [docContent]);
} }
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}; };
worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback); worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback);
...@@ -1184,7 +1182,7 @@ ...@@ -1184,7 +1182,7 @@
{ {
t._insertBinaryIntoShapeContent(worksheet, pasteData.content, true); t._insertBinaryIntoShapeContent(worksheet, pasteData.content, true);
} }
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}; };
worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback); worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback);
...@@ -1221,7 +1219,7 @@ ...@@ -1221,7 +1219,7 @@
if(isCellEditMode) if(isCellEditMode)
{ {
var text = this._getTextFromWord(docContent); var text = this._getTextFromWord(docContent);
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
return text; return text;
} }
else if(isIntoShape) else if(isIntoShape)
...@@ -1232,7 +1230,7 @@ ...@@ -1232,7 +1230,7 @@
{ {
t._insertBinaryIntoShapeContent(worksheet, docContent); t._insertBinaryIntoShapeContent(worksheet, docContent);
} }
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}; };
worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback); worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback);
...@@ -1246,7 +1244,7 @@ ...@@ -1246,7 +1244,7 @@
var oTempDrawingDocument = worksheet.model.DrawingDocument; var oTempDrawingDocument = worksheet.model.DrawingDocument;
var newCDocument = new CDocument(oTempDrawingDocument, false); var newCDocument = new CDocument(oTempDrawingDocument, false);
newCDocument.bFromDocument = true; newCDocument.bFromDocument = true;
newCDocument.theme = this.Api.wbModel.theme; newCDocument.theme = window["Asc"]["editor"].wbModel.theme;
var newContent = []; var newContent = [];
for(var i = 0; i < docContent.length; i++) for(var i = 0; i < docContent.length; i++)
...@@ -1394,7 +1392,7 @@ ...@@ -1394,7 +1392,7 @@
var oInfo = new CSelectedElementsInfo(); var oInfo = new CSelectedElementsInfo();
var selectedElementsInfo = isIntoShape.Get_SelectedElementsInfo(oInfo); var selectedElementsInfo = isIntoShape.Get_SelectedElementsInfo(oInfo);
var mathObj = oInfo.Get_Math(); var mathObj = oInfo.Get_Math();
if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart && null === mathObj) if(!AscCommonExcel.g_clipboardExcel.specialPasteStart && null === mathObj)
{ {
var sProps = Asc.c_oSpecialPasteProps; var sProps = Asc.c_oSpecialPasteProps;
var curShape = isIntoShape.Parent.parent; var curShape = isIntoShape.Parent.parent;
...@@ -1500,7 +1498,7 @@ ...@@ -1500,7 +1498,7 @@
target_doc_content.Insert_Content(selectedContent, NearPos); target_doc_content.Insert_Content(selectedContent, NearPos);
//TODO записываю активную область после каждой вставки. пересомтреть! не записывать при специальной вставке. //TODO записываю активную область после каждой вставки. пересомтреть! не записывать при специальной вставке.
//if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart) //if(!AscCommonExcel.g_clipboardExcel.specialPasteStart)
//{ //{
window['AscCommon'].g_clipboardBase.specialPasteUndoData.shapeSelectionState = target_doc_content.Get_SelectionState(); window['AscCommon'].g_clipboardBase.specialPasteUndoData.shapeSelectionState = target_doc_content.Get_SelectionState();
//} //}
...@@ -1681,7 +1679,7 @@ ...@@ -1681,7 +1679,7 @@
}); });
} }
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}, },
...@@ -1863,7 +1861,7 @@ ...@@ -1863,7 +1861,7 @@
var newCDocument = new CDocument(oTempDrawingDocument, false); var newCDocument = new CDocument(oTempDrawingDocument, false);
newCDocument.bFromDocument = true; newCDocument.bFromDocument = true;
newCDocument.theme = this.Api.wbModel.theme; newCDocument.theme = window["Asc"]["editor"].wbModel.theme;
drawingObject.graphicObject.setBDeleted(true); drawingObject.graphicObject.setBDeleted(true);
drawingObject.graphicObject.setWordFlag(false, newCDocument); drawingObject.graphicObject.setWordFlag(false, newCDocument);
...@@ -1896,7 +1894,7 @@ ...@@ -1896,7 +1894,7 @@
if(isSuccess) if(isSuccess)
t._pasteInShape(worksheet, node, isIntoShape); t._pasteInShape(worksheet, node, isIntoShape);
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}; };
worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback); worksheet.objectRender.controller.checkSelectedObjectsAndCallback2(callback);
...@@ -2283,7 +2281,7 @@ ...@@ -2283,7 +2281,7 @@
var newCDocument = new CDocument(oTempDrawingDocument, false); var newCDocument = new CDocument(oTempDrawingDocument, false);
newCDocument.bFromDocument = true; newCDocument.bFromDocument = true;
newCDocument.theme = this.Api.wbModel.theme; newCDocument.theme = window["Asc"]["editor"].wbModel.theme;
var old_m_oLogicDocument = oTempDrawingDocument.m_oLogicDocument; var old_m_oLogicDocument = oTempDrawingDocument.m_oLogicDocument;
oTempDrawingDocument.m_oLogicDocument = newCDocument; oTempDrawingDocument.m_oLogicDocument = newCDocument;
...@@ -2345,7 +2343,7 @@ ...@@ -2345,7 +2343,7 @@
targetDocContent.DrawingDocument.m_oLogicDocument = null; targetDocContent.DrawingDocument.m_oLogicDocument = null;
var oPasteProcessor = new AscCommon.PasteProcessor({WordControl:{m_oLogicDocument: targetDocContent}, FontLoader: {}}, false, false, true, true); var oPasteProcessor = new AscCommon.PasteProcessor({WordControl:{m_oLogicDocument: targetDocContent}, FontLoader: {}}, false, false, true, true);
oPasteProcessor.map_font_index = this.Api.FontLoader.map_font_index; oPasteProcessor.map_font_index = window["Asc"]["editor"].FontLoader.map_font_index;
oPasteProcessor.bIsDoublePx = false; oPasteProcessor.bIsDoublePx = false;
var newFonts; var newFonts;
...@@ -2602,10 +2600,10 @@ ...@@ -2602,10 +2600,10 @@
isIntoShape.Paragraph_Add(new ParaText(_char)); isIntoShape.Paragraph_Add(new ParaText(_char));
} }
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
//for special paste //for special paste
if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart) if(!AscCommonExcel.g_clipboardExcel.specialPasteStart)
{ {
var sProps = Asc.c_oSpecialPasteProps; var sProps = Asc.c_oSpecialPasteProps;
var allowedSpecialPasteProps = [sProps.sourceformatting, sProps.destinationFormatting]; var allowedSpecialPasteProps = [sProps.sourceformatting, sProps.destinationFormatting];
...@@ -4382,8 +4380,9 @@ ...@@ -4382,8 +4380,9 @@
}; };
//---------------------------------------------------------export--------------------------------------------------- //---------------------------------------------------------export---------------------------------------------------
var g_clipboardExcel = new Clipboard();
window['AscCommonExcel'] = window['AscCommonExcel'] || {}; window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].Clipboard = Clipboard; window['AscCommonExcel'].g_clipboardExcel = g_clipboardExcel;
window["Asc"]["SpecialPasteProps"] = window["Asc"].SpecialPasteProps = СSpecialPasteProps; window["Asc"]["SpecialPasteProps"] = window["Asc"].SpecialPasteProps = СSpecialPasteProps;
prot = СSpecialPasteProps.prototype; prot = СSpecialPasteProps.prototype;
......
...@@ -68,6 +68,8 @@ ...@@ -68,6 +68,8 @@
var c_oAscFontRenderingModeType = asc.c_oAscFontRenderingModeType; var c_oAscFontRenderingModeType = asc.c_oAscFontRenderingModeType;
var c_oAscAsyncActionType = asc.c_oAscAsyncActionType; var c_oAscAsyncActionType = asc.c_oAscAsyncActionType;
var g_clipboardExcel = AscCommonExcel.g_clipboardExcel;
function WorkbookCommentsModel(handlers, aComments) { function WorkbookCommentsModel(handlers, aComments) {
this.workbook = {handlers: handlers}; this.workbook = {handlers: handlers};
...@@ -154,7 +156,6 @@ ...@@ -154,7 +156,6 @@
this.wsViewHandlers = null; this.wsViewHandlers = null;
this.element = elem; this.element = elem;
this.input = inputElem; this.input = inputElem;
this.clipboard = new AscCommonExcel.Clipboard();
this.Api = Api; this.Api = Api;
this.collaborativeEditing = collaborativeEditing; this.collaborativeEditing = collaborativeEditing;
this.lastSendInfoRange = null; this.lastSendInfoRange = null;
...@@ -857,8 +858,6 @@ ...@@ -857,8 +858,6 @@
this.handlers.trigger("asc_onAddComments", this.model.aComments); this.handlers.trigger("asc_onAddComments", this.model.aComments);
} }
this.clipboard.Api = this.Api;
this.initFormulasList(); this.initFormulasList();
this.fReplaceCallback = function() { this.fReplaceCallback = function() {
...@@ -2068,19 +2067,19 @@ ...@@ -2068,19 +2067,19 @@
}; };
WorkbookView.prototype.bIsEmptyClipboard = function() { WorkbookView.prototype.bIsEmptyClipboard = function() {
return this.clipboard.bIsEmptyClipboard(this.getCellEditMode()); return g_clipboardExcel.bIsEmptyClipboard(this.getCellEditMode());
}; };
WorkbookView.prototype.checkCopyToClipboard = function(_clipboard, _formats) { WorkbookView.prototype.checkCopyToClipboard = function(_clipboard, _formats) {
var t = this, ws; var t = this, ws;
ws = t.getWorksheet(); ws = t.getWorksheet();
t.clipboard.checkCopyToClipboard(ws, _clipboard, _formats); g_clipboardExcel.checkCopyToClipboard(ws, _clipboard, _formats);
}; };
WorkbookView.prototype.pasteData = function(_format, data1, data2, text_data) { WorkbookView.prototype.pasteData = function(_format, data1, data2, text_data) {
var t = this, ws; var t = this, ws;
ws = t.getWorksheet(); ws = t.getWorksheet();
t.clipboard.pasteData(ws, _format, data1, data2, text_data); g_clipboardExcel.pasteData(ws, _format, data1, data2, text_data);
}; };
WorkbookView.prototype.specialPasteData = function(props) { WorkbookView.prototype.specialPasteData = function(props) {
......
...@@ -8753,7 +8753,7 @@ ...@@ -8753,7 +8753,7 @@
//в случае, если вставляем из глобального буфера, транзакцию закрываем внутри функции _loadDataBeforePaste на callbacks от загрузки шрифтов и картинок //в случае, если вставляем из глобального буфера, транзакцию закрываем внутри функции _loadDataBeforePaste на callbacks от загрузки шрифтов и картинок
if (prop !== "paste" || (prop === "paste" && fromBinary)) { if (prop !== "paste" || (prop === "paste" && fromBinary)) {
History.EndTransaction(); History.EndTransaction();
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
} }
}; };
...@@ -8767,9 +8767,9 @@ ...@@ -8767,9 +8767,9 @@
} }
var g_clipboardBase = window['AscCommon'].g_clipboardBase; var g_clipboardBase = window['AscCommon'].g_clipboardBase;
if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart) if(!AscCommonExcel.g_clipboardExcel.specialPasteStart)
{ {
var sBinary = window["Asc"]["editor"].wb.clipboard.copyProcessor.getBinaryForCopy(this, newRange); var sBinary = AscCommonExcel.g_clipboardExcel.copyProcessor.getBinaryForCopy(this, newRange);
g_clipboardBase.specialPasteUndoData.data = sBinary; g_clipboardBase.specialPasteUndoData.data = sBinary;
var specialPasteSelectionRange = new AscCommonExcel.SelectionRange(); var specialPasteSelectionRange = new AscCommonExcel.SelectionRange();
...@@ -8813,7 +8813,7 @@ ...@@ -8813,7 +8813,7 @@
return false; return false;
} }
//не вызываю для отката api.wb.clipboard.pasteData, потому что внутри асинхронные методы - isLockedCells //не вызываю для отката AscCommonExcel.g_clipboardExcel.pasteData, потому что внутри асинхронные методы - isLockedCells
var undoPreviousPaste = function() var undoPreviousPaste = function()
{ {
//откатываем данные в ячейках //откатываем данные в ячейках
...@@ -8822,7 +8822,7 @@ ...@@ -8822,7 +8822,7 @@
var tempWorkbook = new AscCommonExcel.Workbook(); var tempWorkbook = new AscCommonExcel.Workbook();
pptx_content_loader.Start_UseFullUrl(); pptx_content_loader.Start_UseFullUrl();
oBinaryFileReader.Read(sBase64, tempWorkbook); oBinaryFileReader.Read(sBase64, tempWorkbook);
window["Asc"]["editor"].wb.clipboard.pasteProcessor.activeRange = oBinaryFileReader.copyPasteObj.activeRange; AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange = oBinaryFileReader.copyPasteObj.activeRange;
var pasteData = null; var pasteData = null;
if (tempWorkbook) if (tempWorkbook)
pasteData = tempWorkbook.aWorksheets[0]; pasteData = tempWorkbook.aWorksheets[0];
...@@ -8849,8 +8849,8 @@ ...@@ -8849,8 +8849,8 @@
History.Create_NewPoint(); History.Create_NewPoint();
History.StartTransaction(); History.StartTransaction();
window["Asc"]["editor"].wb.clipboard.start_specialpaste(); AscCommonExcel.g_clipboardExcel.start_specialpaste();
window["Asc"]["editor"].wb.clipboard.start_paste(); AscCommonExcel.g_clipboardExcel.start_paste();
//откатываемся до того, что было до вставки //откатываемся до того, что было до вставки
//курсор и специальная вставка не в шейпе + курсор в шейпе, специальная вставка на листе //курсор и специальная вставка не в шейпе + курсор в шейпе, специальная вставка на листе
...@@ -8893,8 +8893,8 @@ ...@@ -8893,8 +8893,8 @@
//далее специальная вставка //далее специальная вставка
clipboard_base.specialPasteProps = props; clipboard_base.specialPasteProps = props;
//TODO пока для закрытия транзации выставляю флаг. пересмотреть! //TODO пока для закрытия транзации выставляю флаг. пересмотреть!
window["Asc"]["editor"].wb.clipboard.bIsEndTransaction = true; AscCommonExcel.g_clipboardExcel.bIsEndTransaction = true;
api.wb.clipboard.pasteData(t, specialPasteData._format, specialPasteData.data1, specialPasteData.data2, specialPasteData.text_data, true); AscCommonExcel.g_clipboardExcel.pasteData(t, specialPasteData._format, specialPasteData.data1, specialPasteData.data2, specialPasteData.text_data, true);
}; };
if(specialPasteData.activeRange && !isIntoShape) if(specialPasteData.activeRange && !isIntoShape)
...@@ -8913,7 +8913,7 @@ ...@@ -8913,7 +8913,7 @@
var specialPasteProps = g_clipboardBase.specialPasteProps; var specialPasteProps = g_clipboardBase.specialPasteProps;
if ( val.props && val.props.onlyImages === true ) { if ( val.props && val.props.onlyImages === true ) {
if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart) if(!AscCommonExcel.g_clipboardExcel.specialPasteStart)
{ {
this.handlers.trigger("showSpecialPasteOptions", [Asc.c_oSpecialPasteProps.picture]); this.handlers.trigger("showSpecialPasteOptions", [Asc.c_oSpecialPasteProps.picture]);
} }
...@@ -8931,7 +8931,7 @@ ...@@ -8931,7 +8931,7 @@
var tablesMap = null; var tablesMap = null;
if (fromBinary && val.TableParts && val.TableParts.length && specialPasteProps.formatTable) { if (fromBinary && val.TableParts && val.TableParts.length && specialPasteProps.formatTable) {
var range, tablePartRange, tables = val.TableParts, diffRow, diffCol, curTable, bIsAddTable; var range, tablePartRange, tables = val.TableParts, diffRow, diffCol, curTable, bIsAddTable;
var activeRange = window["Asc"]["editor"].wb.clipboard.pasteProcessor.activeRange; var activeRange = AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange;
var refInsertBinary = AscCommonExcel.g_oRangeCache.getAscRange(activeRange); var refInsertBinary = AscCommonExcel.g_oRangeCache.getAscRange(activeRange);
for (var i = 0; i < tables.length; i++) { for (var i = 0; i < tables.length; i++) {
curTable = tables[i]; curTable = tables[i];
...@@ -9047,7 +9047,7 @@ ...@@ -9047,7 +9047,7 @@
} }
//for special paste //for special paste
if(!window["Asc"]["editor"].wb.clipboard.specialPasteStart) if(!AscCommonExcel.g_clipboardExcel.specialPasteStart)
{ {
//var specialPasteShowOptions = new Asc.SpecialPasteShowOptions(); //var specialPasteShowOptions = new Asc.SpecialPasteShowOptions();
var allowedSpecialPasteProps; var allowedSpecialPasteProps;
...@@ -9097,7 +9097,7 @@ ...@@ -9097,7 +9097,7 @@
var oObjectsForDownload = AscCommon.GetObjectsForImageDownload( pasteContent.props._aPastedImages ); var oObjectsForDownload = AscCommon.GetObjectsForImageDownload( pasteContent.props._aPastedImages );
//if already load images on server //if already load images on server
if ( api.wb.clipboard.pasteProcessor.alreadyLoadImagesOnServer === true ) if ( AscCommonExcel.g_clipboardExcel.pasteProcessor.alreadyLoadImagesOnServer === true )
{ {
var oImageMap = {}; var oImageMap = {};
for ( var i = 0, length = oObjectsForDownload.aBuilderImagesByUrl.length; i < length; ++i ) for ( var i = 0, length = oObjectsForDownload.aBuilderImagesByUrl.length; i < length; ++i )
...@@ -9105,7 +9105,7 @@ ...@@ -9105,7 +9105,7 @@
var url = oObjectsForDownload.aUrls[i]; var url = oObjectsForDownload.aUrls[i];
//get name from array already load on server urls //get name from array already load on server urls
var name = api.wb.clipboard.pasteProcessor.oImages[url]; var name = AscCommonExcel.g_clipboardExcel.pasteProcessor.oImages[url];
var aImageElem = oObjectsForDownload.aBuilderImagesByUrl[i]; var aImageElem = oObjectsForDownload.aBuilderImagesByUrl[i];
if ( name ) { if ( name ) {
if ( Array.isArray( aImageElem ) ) { if ( Array.isArray( aImageElem ) ) {
...@@ -9124,7 +9124,7 @@ ...@@ -9124,7 +9124,7 @@
} }
t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth ); t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth );
api.wb.clipboard.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap ); AscCommonExcel.g_clipboardExcel.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap );
isEndTransaction = true; isEndTransaction = true;
} }
...@@ -9136,7 +9136,7 @@ ...@@ -9136,7 +9136,7 @@
AscCommon.ResetNewUrls( data, oObjectsForDownload.aUrls, oObjectsForDownload.aBuilderImagesByUrl, oImageMap ); AscCommon.ResetNewUrls( data, oObjectsForDownload.aUrls, oObjectsForDownload.aBuilderImagesByUrl, oImageMap );
t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth ); t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth );
api.wb.clipboard.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap ); AscCommonExcel.g_clipboardExcel.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap );
isEndTransaction = true; isEndTransaction = true;
} }
...@@ -9147,11 +9147,11 @@ ...@@ -9147,11 +9147,11 @@
AscCommon.ResetNewUrls( data, oObjectsForDownload.aUrls, oObjectsForDownload.aBuilderImagesByUrl, oImageMap ); AscCommon.ResetNewUrls( data, oObjectsForDownload.aUrls, oObjectsForDownload.aBuilderImagesByUrl, oImageMap );
t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth ); t._pasteData( isLargeRange, fromBinary, pasteContent, bIsUpdate, canChangeColWidth );
api.wb.clipboard.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap ); AscCommonExcel.g_clipboardExcel.pasteProcessor._insertImagesFromBinaryWord( t, pasteContent, oImageMap );
//закрываем транзакцию, поскольку в setSelectionInfo она не закроется //закрываем транзакцию, поскольку в setSelectionInfo она не закроется
History.EndTransaction(); History.EndTransaction();
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
}, true ); }, true );
} }
...@@ -9167,7 +9167,7 @@ ...@@ -9167,7 +9167,7 @@
if ( isEndTransaction ) if ( isEndTransaction )
{ {
History.EndTransaction(); History.EndTransaction();
window["Asc"]["editor"].wb.clipboard.end_paste(); AscCommonExcel.g_clipboardExcel.end_paste();
} }
}; };
...@@ -9180,8 +9180,8 @@ ...@@ -9180,8 +9180,8 @@
var t = this; var t = this;
var wb = window["Asc"]["editor"].wb; var wb = window["Asc"]["editor"].wb;
var lastSelection = this.model.selectionRange.getLast(); var lastSelection = this.model.selectionRange.getLast();
var arn = wb && wb.clipboard && wb.clipboard.pasteProcessor && wb.clipboard.pasteProcessor.activeRange ? var arn = AscCommonExcel.g_clipboardExcel.pasteProcessor && AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange ?
wb.clipboard.pasteProcessor.activeRange : lastSelection; AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange : lastSelection;
var arrFormula = []; var arrFormula = [];
var numFor = 0; var numFor = 0;
...@@ -9379,7 +9379,7 @@ ...@@ -9379,7 +9379,7 @@
var arn = t.model.selectionRange.getLast().clone(); var arn = t.model.selectionRange.getLast().clone();
var arrFormula = []; var arrFormula = [];
var pasteRange = window["Asc"]["editor"].wb.clipboard.pasteProcessor.activeRange; var pasteRange = AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange;
var activeCellsPasteFragment = typeof pasteRange === "string" ? AscCommonExcel.g_oRangeCache.getAscRange(pasteRange) : pasteRange; var activeCellsPasteFragment = typeof pasteRange === "string" ? AscCommonExcel.g_oRangeCache.getAscRange(pasteRange) : pasteRange;
var g_clipboardBase = window['AscCommon'].g_clipboardBase; var g_clipboardBase = window['AscCommon'].g_clipboardBase;
...@@ -9986,7 +9986,7 @@ ...@@ -9986,7 +9986,7 @@
WorksheetView.prototype.showSpecialPasteOptions = function(props, range, positionShapeContent) WorksheetView.prototype.showSpecialPasteOptions = function(props, range, positionShapeContent)
{ {
var _clipboard = window["Asc"]["editor"].wb.clipboard; var _clipboard = AscCommonExcel.g_clipboardExcel;
var specialPasteShowOptions = new Asc.SpecialPasteShowOptions(); var specialPasteShowOptions = new Asc.SpecialPasteShowOptions();
var cellCoord; var cellCoord;
...@@ -10012,7 +10012,7 @@ ...@@ -10012,7 +10012,7 @@
WorksheetView.prototype.updateSpecialPasteOptionsPosition = function(changeActiveRange) WorksheetView.prototype.updateSpecialPasteOptionsPosition = function(changeActiveRange)
{ {
var _clipboard = window["Asc"]["editor"].wb.clipboard; var _clipboard = AscCommonExcel.g_clipboardExcel;
var isIntoShape = this.objectRender.controller.getTargetDocContent(true); var isIntoShape = this.objectRender.controller.getTargetDocContent(true);
if(window['AscCommon'].g_clipboardBase.showSpecialPasteButton && isIntoShape) if(window['AscCommon'].g_clipboardBase.showSpecialPasteButton && isIntoShape)
{ {
......
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