mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
Fix bug 58278
This commit is contained in:
committed by
Ilya Kirillov
parent
f89973f098
commit
774546c128
@ -183,6 +183,15 @@ var c_oAscError = Asc.c_oAscError;
|
||||
spreadsheet_api.prototype["asc_isOffline"] = spreadsheet_api.prototype.asc_isOffline;
|
||||
spreadsheet_api.prototype["asc_addImage"] = spreadsheet_api.prototype.asc_addImage;
|
||||
|
||||
spreadsheet_api.prototype["getAdditionalSaveParams"] = function()
|
||||
{
|
||||
var printOptionsObj = asc["editor"].getPrintOptionsJson();
|
||||
printOptionsObj["documentLayout"] = { "openedAt" : asc["editor"].openedAt };
|
||||
printOptionsObj["locale"] = asc["editor"].asc_getLocale();
|
||||
printOptionsObj["translate"] = AscCommon.translateManager.mapTranslate;
|
||||
return printOptionsObj;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
////////////// CHANGES /////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
@ -247,11 +256,7 @@ var c_oAscError = Asc.c_oAscError;
|
||||
{
|
||||
try
|
||||
{
|
||||
var printOptionsObj = asc["editor"].getPrintOptionsJson();
|
||||
printOptionsObj["documentLayout"] = { "openedAt" : asc["editor"].openedAt };
|
||||
printOptionsObj["locale"] = asc["editor"].asc_getLocale();
|
||||
printOptionsObj["translate"] = AscCommon.translateManager.mapTranslate;
|
||||
|
||||
var printOptionsObj = asc["editor"]["getAdditionalSaveParams"]();
|
||||
printOptions = JSON.stringify(printOptionsObj);
|
||||
}
|
||||
catch (e)
|
||||
|
||||
@ -86,6 +86,23 @@
|
||||
return Asc.c_oAscLocalRestrictionType.None;
|
||||
return this.localRestrintions;
|
||||
};
|
||||
|
||||
AscCommon.baseEditorsApi.prototype["startExternalConvertation"] = function(type)
|
||||
{
|
||||
let params = "";
|
||||
try {
|
||||
params = JSON.stringify(this["getAdditionalSaveParams"]());
|
||||
}
|
||||
catch (e) {
|
||||
params = "";
|
||||
}
|
||||
this.sync_StartAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.Waiting);
|
||||
window["AscDesktopEditor"]["startExternalConvertation"](type, params);
|
||||
};
|
||||
AscCommon.baseEditorsApi.prototype["endExternalConvertation"] = function()
|
||||
{
|
||||
this.sync_EndAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.Waiting);
|
||||
};
|
||||
})(window);
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
@ -240,7 +240,7 @@ _null_object.val = function () { return this; };
|
||||
_null_object.remove = function () {};
|
||||
_null_object.getComputedStyle = function () { return null; };
|
||||
_null_object.getContext = function (type) { return (type == "2d") ? new native_context2d(this) : null; };
|
||||
_null_object.getBoundingClientRect = function() { return { left : 0, top : 0, right : this.width(), bottom : this.height() }; };
|
||||
_null_object.getBoundingClientRect = function() { return { left : 0, top : 0, right : 0, bottom : 0 }; };
|
||||
|
||||
window._null_object = _null_object;
|
||||
|
||||
|
||||
@ -142,6 +142,16 @@ Asc['asc_docs_api'].prototype.asc_Save = function (isNoUserSave, isSaveAs, isRes
|
||||
window["DesktopOfflineAppDocumentStartSave"](isSaveAs, undefined, undefined, undefined, options);
|
||||
}
|
||||
};
|
||||
Asc['asc_docs_api'].prototype["getAdditionalSaveParams"] = function()
|
||||
{
|
||||
return {
|
||||
"documentLayout" : {
|
||||
"openedAt" : this.openedAt
|
||||
},
|
||||
"locale" : this.asc_getLocale(),
|
||||
"translate" : AscCommon.translateManager.mapTranslate
|
||||
};
|
||||
};
|
||||
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs, password, isForce, docinfo, options)
|
||||
{
|
||||
window.doadssIsSaveAs = isSaveAs;
|
||||
@ -157,13 +167,7 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs, password, isFo
|
||||
if (isSaveAs === true)
|
||||
_param += "saveas=true;";
|
||||
|
||||
var jsonOptions = {
|
||||
"documentLayout" : {
|
||||
"openedAt" : editor.openedAt
|
||||
},
|
||||
"locale" : editor.asc_getLocale(),
|
||||
"translate" : AscCommon.translateManager.mapTranslate
|
||||
};
|
||||
var jsonOptions = editor["getAdditionalSaveParams"]();
|
||||
|
||||
if (options && options.advancedOptions)
|
||||
{
|
||||
|
||||
@ -181,6 +181,16 @@ Asc['asc_docs_api'].prototype.asc_Save = function (isNoUserSave, isSaveAs, isRes
|
||||
window["DesktopOfflineAppDocumentStartSave"](isSaveAs, undefined, undefined, undefined, options);
|
||||
}
|
||||
};
|
||||
Asc['asc_docs_api'].prototype["getAdditionalSaveParams"] = function()
|
||||
{
|
||||
return {
|
||||
"documentLayout" : {
|
||||
"openedAt" : this.openedAt
|
||||
},
|
||||
"locale" : this.asc_getLocale(),
|
||||
"translate" : AscCommon.translateManager.mapTranslate
|
||||
};
|
||||
};
|
||||
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs, password, isForce, docinfo, options)
|
||||
{
|
||||
window.doadssIsSaveAs = isSaveAs;
|
||||
@ -196,13 +206,7 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs, password, isFo
|
||||
if (isSaveAs === true)
|
||||
_param += "saveas=true;";
|
||||
|
||||
var jsonOptions = {
|
||||
"documentLayout" : {
|
||||
"openedAt" : editor.openedAt
|
||||
},
|
||||
"locale" : editor.asc_getLocale(),
|
||||
"translate" : AscCommon.translateManager.mapTranslate
|
||||
};
|
||||
var jsonOptions = editor["getAdditionalSaveParams"]();
|
||||
|
||||
if (options && options.isPdfPrint)
|
||||
jsonOptions["isPrint"] = true;
|
||||
|
||||
Reference in New Issue
Block a user