Commit 426dcff6 authored by GoshaZotov's avatar GoshaZotov

use SpecialPasteButton_Show function in clipboard_base(in cell editor)

parent 6b56873a
......@@ -403,6 +403,12 @@ var editor;
}
};
spreadsheet_api.prototype.asc_ShowSpecialPasteButton = function(props) {
if (!this.getViewMode()) {
this.wb.showSpecialPasteButton(props);
}
};
spreadsheet_api.prototype.asc_Cut = function() {
if (window["AscDesktopEditor"])
{
......
......@@ -1406,9 +1406,9 @@
var position = {x: posX, y: posY};
var allowedSpecialPasteProps = [sProps.sourceformatting, sProps.destinationFormatting];
worksheet.showSpecialPasteOptions(allowedSpecialPasteProps, null, position);
window['AscCommon'].g_clipboardBase.specialPasteButtonProps = {};
window['AscCommon'].g_clipboardBase.specialPasteButtonProps.props = {props: allowedSpecialPasteProps, position: position};
window['AscCommon'].g_clipboardBase.specialPasteButtonProps.range = cursorPos;
window['AscCommon'].g_clipboardBase.specialPasteButtonProps.shapeId = isIntoShape.Id;
}
......@@ -2560,7 +2560,7 @@
style = ' style = "text-decoration:' + underline + ";" + "font-style:" + italic + ";" + "font-weight:" + bold + ";" + '"';
$(oldElem).replaceWith("<span" + style + ">" + value + "</span>");
};
}
},
pasteTextOnSheet: function(worksheet, text)
......@@ -2602,7 +2602,6 @@
{
var sProps = Asc.c_oSpecialPasteProps;
var allowedSpecialPasteProps = [sProps.sourceformatting, sProps.destinationFormatting];
//worksheet.showSpecialPasteOptions(allowedSpecialPasteProps);
}
};
......
......@@ -2093,6 +2093,12 @@
}
};
WorkbookView.prototype.showSpecialPasteButton = function(props) {
if (!this.getCellEditMode()) {
this.getWorksheet().showSpecialPasteOptions(props);
}
};
WorkbookView.prototype.selectionCut = function() {
if (this.getCellEditMode()) {
this.cellEditor.cutSelection();
......
......@@ -9003,7 +9003,8 @@
//matchDestinationFormatting - пока не добавляю, так как работает как и values
allowedSpecialPasteProps = [sProps.sourceformatting, sProps.destinationFormatting];
}
this.showSpecialPasteOptions(allowedSpecialPasteProps, selectData[0]);
g_clipboardBase.specialPasteButtonProps.props = {props: allowedSpecialPasteProps, range: selectData[0]};
//this.showSpecialPasteOptions(allowedSpecialPasteProps, selectData[0]);
}
else
{
......@@ -10019,11 +10020,14 @@
}
};
WorksheetView.prototype.showSpecialPasteOptions = function(props, range, positionShapeContent)
WorksheetView.prototype.showSpecialPasteOptions = function(options/*, range, positionShapeContent*/)
{
var _clipboard = AscCommonExcel.g_clipboardExcel;
var specialPasteShowOptions = new Asc.SpecialPasteShowOptions();
var positionShapeContent = options.position;
var range = options.range;
var props = options.props;
var cellCoord;
if(!positionShapeContent)
{
......
......@@ -966,6 +966,7 @@
Paste_Process_End : function()
{
this.pasteStart = false;
this.specialPasteProps = null;
//процесс специальной вставки заканчивается вместе с общей вставкой
if(this.specialPasteStart)
{
......@@ -973,7 +974,6 @@
}
else//если не было специальной вставки, необходимо показать кнопку специальной вставки
{
this.specialPasteProps = null;
this.SpecialPasteButton_Show();
}
......@@ -1013,7 +1013,7 @@
}
},
SpecialPasteButton_Update_Position : function(props)
SpecialPasteButton_Update_Position : function()
{
//TODO метод должен быть общий для всех редакторов
if(this.showSpecialPasteButton && this.specialPasteButtonProps.fixPosition)
......
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