Commit 99d0df4e authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

новый сборщик. полная реализация

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59494 954022d7-b5bf-4e40-9824-e11837661b57
parent 736574f7
...@@ -254,12 +254,12 @@ function NativeOpenFileData(data, version) ...@@ -254,12 +254,12 @@ function NativeOpenFileData(data, version)
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_docs_api"](""); _api = new window["asc_docs_api"]("");
_api.asc_nativeOpenFile2(data, version); _api.asc_nativeOpenFile(data, version);
} }
else else
{ {
_api = new window["Asc"]["spreadsheet_api"](); _api = new window["Asc"]["spreadsheet_api"]();
_api.asc_nativeOpenFile2(data, version); _api.asc_nativeOpenFile(data, version);
} }
} }
......
...@@ -7670,7 +7670,7 @@ asc_docs_api.prototype.asc_AddMath2 = function(Type) ...@@ -7670,7 +7670,7 @@ asc_docs_api.prototype.asc_AddMath2 = function(Type)
}; };
window["asc_docs_api"] = asc_docs_api; window["asc_docs_api"] = asc_docs_api;
window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File) window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File, version)
{ {
this.DocumentUrl = "TeamlabNative"; this.DocumentUrl = "TeamlabNative";
...@@ -7693,7 +7693,9 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File) ...@@ -7693,7 +7693,9 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File)
var openParams = {checkFileSize: this.isMobileVersion, charCount: 0, parCount: 0}; var openParams = {checkFileSize: this.isMobileVersion, charCount: 0, parCount: 0};
var oBinaryFileReader = new BinaryFileReader(this.WordControl.m_oLogicDocument, openParams); var oBinaryFileReader = new BinaryFileReader(this.WordControl.m_oLogicDocument, openParams);
if(oBinaryFileReader.Read(base64File)) if (undefined === version)
{
if (oBinaryFileReader.Read(base64File))
{ {
g_oIdCounter.Set_Load(false); g_oIdCounter.Set_Load(false);
this.LoadedObject = 1; this.LoadedObject = 1;
...@@ -7701,49 +7703,10 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File) ...@@ -7701,49 +7703,10 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File)
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open); this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
} }
else else
this.asc_fireCallback("asc_onError",c_oAscError.ID.MobileUnexpectedCharCount,c_oAscError.Level.Critical); this.asc_fireCallback("asc_onError", c_oAscError.ID.MobileUnexpectedCharCount, c_oAscError.Level.Critical);
}
//callback
this.DocumentOrientation = (null == editor.WordControl.m_oLogicDocument) ? true : !editor.WordControl.m_oLogicDocument.Orientation;
var sizeMM;
if(this.DocumentOrientation)
sizeMM = DocumentPageSize.getSize(Page_Width, Page_Height);
else else
sizeMM = DocumentPageSize.getSize(Page_Height, Page_Width);
this.sync_DocSizeCallback(sizeMM.w_mm, sizeMM.h_mm);
this.sync_PageOrientCallback(editor.get_DocumentOrientation());
if (this.GenerateNativeStyles !== undefined)
{ {
this.GenerateNativeStyles();
if (this.WordControl.m_oDrawingDocument.CheckTableStylesOne !== undefined)
this.WordControl.m_oDrawingDocument.CheckTableStylesOne();
}
};
window["asc_docs_api"].prototype["asc_nativeOpenFile2"] = function(base64File, version)
{
this.DocumentUrl = "TeamlabNative";
window.g_cAscCoAuthoringUrl = "";
window.g_cAscSpellCheckUrl = "";
this.User = new Asc.asc_CUser();
this.User.asc_setId("TM");
this.User.asc_setUserName("native");
this.WordControl.m_bIsRuler = false;
this.WordControl.Init();
this.InitEditor();
this.DocumentType = 2;
this.LoadedObjectDS = Common_CopyObj(this.WordControl.m_oLogicDocument.Get_Styles().Style);
g_oIdCounter.Set_Load(true);
var openParams = {checkFileSize: this.isMobileVersion, charCount: 0, parCount: 0};
var oBinaryFileReader = new BinaryFileReader(this.WordControl.m_oLogicDocument, openParams);
g_nCurFileVersion = version; g_nCurFileVersion = version;
if(oBinaryFileReader.ReadData(base64File)) if(oBinaryFileReader.ReadData(base64File))
{ {
...@@ -7754,6 +7717,7 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile2"] = function(base64File, v ...@@ -7754,6 +7717,7 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile2"] = function(base64File, v
} }
else else
this.asc_fireCallback("asc_onError",c_oAscError.ID.MobileUnexpectedCharCount,c_oAscError.Level.Critical); this.asc_fireCallback("asc_onError",c_oAscError.ID.MobileUnexpectedCharCount,c_oAscError.Level.Critical);
}
//callback //callback
this.DocumentOrientation = (null == editor.WordControl.m_oLogicDocument) ? true : !editor.WordControl.m_oLogicDocument.Orientation; this.DocumentOrientation = (null == editor.WordControl.m_oLogicDocument) ? true : !editor.WordControl.m_oLogicDocument.Orientation;
...@@ -7773,7 +7737,6 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile2"] = function(base64File, v ...@@ -7773,7 +7737,6 @@ window["asc_docs_api"].prototype["asc_nativeOpenFile2"] = function(base64File, v
this.WordControl.m_oDrawingDocument.CheckTableStylesOne(); this.WordControl.m_oDrawingDocument.CheckTableStylesOne();
} }
}; };
window["asc_docs_api"].prototype["asc_nativeCalculateFile"] = function() window["asc_docs_api"].prototype["asc_nativeCalculateFile"] = function()
{ {
if (null == this.WordControl.m_oLogicDocument) if (null == this.WordControl.m_oLogicDocument)
......
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