Fix build pdf files

This commit is contained in:
Oleg Korshul
2024-09-11 01:05:42 +03:00
parent 5cfff088bc
commit 7e4f1ff0b5
7 changed files with 10476 additions and 10406 deletions

View File

@ -267,15 +267,28 @@ function NativeCreateApi(options)
if (options && undefined !== options["translate"])
configApi["translate"] = options["translate"];
if (window.NATIVE_DOCUMENT_TYPE === "presentation" || window.NATIVE_DOCUMENT_TYPE === "document")
switch (window.NATIVE_DOCUMENT_TYPE)
{
Api = new window["Asc"]["asc_docs_api"](configApi);
if (options && options["documentLayout"] && undefined !== options["documentLayout"]["openedAt"])
Api.setOpenedAt(options["documentLayout"]["openedAt"]);
}
else
{
Api = new window["Asc"]["spreadsheet_api"](configApi);
case "document":
case "presentation":
{
Api = new window["Asc"]["asc_docs_api"](configApi);
if (options && options["documentLayout"] && undefined !== options["documentLayout"]["openedAt"])
Api.setOpenedAt(options["documentLayout"]["openedAt"]);
break;
}
case "spreadsheet":
{
Api = new window["Asc"]["spreadsheet_api"](configApi);
break;
}
case "pdf":
{
Api = new window["Asc"]["PDFEditorApi"](configApi);
break;
}
default:
break;
}
if (options && undefined !== options["locale"])
@ -286,14 +299,26 @@ function NativeOpenFileData(data, version, xlsx_file_path, options)
{
NativeCreateApi(options);
if (window.NATIVE_DOCUMENT_TYPE === "presentation" ||
window.NATIVE_DOCUMENT_TYPE === "document")
switch (window.NATIVE_DOCUMENT_TYPE)
{
Api.asc_nativeOpenFile(data, version);
}
else
{
Api.asc_nativeOpenFile(data, version, undefined, xlsx_file_path);
case "document":
case "presentation":
{
Api.asc_nativeOpenFile(data, version);
break;
}
case "spreadsheet":
{
Api.asc_nativeOpenFile(data, version, undefined, xlsx_file_path);
break;
}
case "pdf":
{
Api.asc_nativeOpenFile(data, version);
break;
}
default:
break;
}
}