Commit dbf4ba92 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add 'Api' variable to use in builder

parent 426fe3d1
...@@ -259,15 +259,15 @@ document.createComment = function() { return undefined; }; ...@@ -259,15 +259,15 @@ document.createComment = function() { return undefined; };
document.documentElement = _null_object; document.documentElement = _null_object;
document.body = _null_object; document.body = _null_object;
var native; var native;
if(typeof NativeEngine === "undefined") if(typeof NativeEngine === "undefined")
{ {
native = CreateNativeEngine(); native = CreateNativeEngine();
} }
else else
{ {
native = NativeEngine; native = NativeEngine;
} }
window.native = native; window.native = native;
...@@ -279,6 +279,7 @@ function GetNativeEngine() ...@@ -279,6 +279,7 @@ function GetNativeEngine()
} }
var native_renderer = null; var native_renderer = null;
var Api = null;
var _api = null; var _api = null;
function NativeOpenFileData(data, version) function NativeOpenFileData(data, version)
...@@ -295,6 +296,7 @@ function NativeOpenFileData(data, version) ...@@ -295,6 +296,7 @@ function NativeOpenFileData(data, version)
_api = new window["Asc"]["spreadsheet_api"]({}); _api = new window["Asc"]["spreadsheet_api"]({});
_api.asc_nativeOpenFile(data, version); _api.asc_nativeOpenFile(data, version);
} }
Api = _api;
} }
function NativeOpenFile() function NativeOpenFile()
...@@ -304,7 +306,7 @@ function NativeOpenFile() ...@@ -304,7 +306,7 @@ function NativeOpenFile()
if (window.NATIVE_DOCUMENT_TYPE == "presentation" || window.NATIVE_DOCUMENT_TYPE == "document") if (window.NATIVE_DOCUMENT_TYPE == "presentation" || window.NATIVE_DOCUMENT_TYPE == "document")
{ {
_api = new window["Asc"]["asc_docs_api"](""); _api = new window["Asc"]["asc_docs_api"]("");
_api.asc_nativeOpenFile(doc_bin); _api.asc_nativeOpenFile(doc_bin);
} }
else else
...@@ -312,6 +314,7 @@ function NativeOpenFile() ...@@ -312,6 +314,7 @@ function NativeOpenFile()
_api = new window["Asc"]["spreadsheet_api"](); _api = new window["Asc"]["spreadsheet_api"]();
_api.asc_nativeOpenFile(doc_bin); _api.asc_nativeOpenFile(doc_bin);
} }
Api = _api;
} }
function NativeOpenFile2(_params) function NativeOpenFile2(_params)
...@@ -338,8 +341,10 @@ function NativeOpenFile2(_params) ...@@ -338,8 +341,10 @@ function NativeOpenFile2(_params)
else else
{ {
_api = new window["Asc"]["spreadsheet_api"](); _api = new window["Asc"]["spreadsheet_api"]();
_api.asc_nativeOpenFile(doc_bin); _api.asc_nativeOpenFile(doc_bin);
} }
Api = _api;
} }
function NativeCalculateFile() function NativeCalculateFile()
...@@ -355,7 +360,7 @@ function NativeApplyChangesData(data, isFull) ...@@ -355,7 +360,7 @@ function NativeApplyChangesData(data, isFull)
} }
else else
{ {
_api.asc_nativeApplyChanges2(data, isFull); _api.asc_nativeApplyChanges2(data, isFull);
} }
} }
......
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