Commit 7d0427cb authored by Alexander.Trofimov's avatar Alexander.Trofimov

add asc_endPaste

parent 2bc9ed37
......@@ -3247,6 +3247,9 @@ var editor;
History.StartTransaction();
return true;
};
spreadsheet_api.prototype.asc_endPaste = function () {
History.EndTransaction();
};
spreadsheet_api.prototype.asc_Recalculate = function () {
History.EndTransaction();
this._onUpdateAfterApplyChanges();
......
......@@ -404,11 +404,12 @@
{
if (pluginData.privateData.resize || window.g_asc_plugins.api.asc_canPaste())
{
var oLogicDocument, i;
var editorId = window.g_asc_plugins.api.getEditorId();
if (AscCommon.c_oEditorId.Word === editorId ||
AscCommon.c_oEditorId.Presentation === editorId)
{
var oLogicDocument = window.g_asc_plugins.api.WordControl ?
oLogicDocument = window.g_asc_plugins.api.WordControl ?
window.g_asc_plugins.api.WordControl.m_oLogicDocument : null;
if(AscCommon.c_oEditorId.Word === editorId){
oLogicDocument.LockPanelStyles();
......@@ -420,16 +421,15 @@
if (pluginData.getAttribute("recalculate") == true)
{
var editorId = window.g_asc_plugins.api.getEditorId();
if (AscCommon.c_oEditorId.Word === editorId ||
AscCommon.c_oEditorId.Presentation === editorId)
{
var oLogicDocument = window.g_asc_plugins.api.WordControl ?
oLogicDocument = window.g_asc_plugins.api.WordControl ?
window.g_asc_plugins.api.WordControl.m_oLogicDocument : null;
var _fonts = oLogicDocument.Document_Get_AllFontNames();
var _imagesArray = oLogicDocument.Get_AllImageUrls();
var _images = {};
for (var i = 0; i < _imagesArray.length; i++)
for (i = 0; i < _imagesArray.length; i++)
{
_images[_imagesArray[i]] = _imagesArray[i];
}
......@@ -458,7 +458,7 @@
var oFonts = oApi.wbModel._generateFontMap();
var aImages = oApi.wbModel.getAllImageUrls();
var oImages = {};
for (var i = 0; i < aImages.length; i++)
for (i = 0; i < aImages.length; i++)
{
oImages[aImages[i]] = aImages[i];
}
......@@ -470,6 +470,11 @@
window.g_asc_plugins.api.asc_Recalculate();
});
}
} else {
if (AscCommon.c_oEditorId.Spreadsheet === editorId) {
// На asc_canPaste создается точка в истории и startTransaction. Поэтому нужно ее закрыть без пересчета.
window.g_asc_plugins.api.asc_endPaste();
}
}
}
} catch (err)
......
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