Commit d4e5635c 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@59497 954022d7-b5bf-4e40-9824-e11837661b57
parent 2ccdb77c
......@@ -3397,7 +3397,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return nRes;
};
spreadsheet_api.prototype.asc_nativeOpenFile = function(base64File)
spreadsheet_api.prototype.asc_nativeOpenFile = function(base64File, version)
{
this.DocumentUrl = "TeamlabNative";
......@@ -3414,7 +3414,16 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.initGlobalObjects(this.wbModel);
var oBinaryFileReader = new Asc.BinaryFileReader(this.DocumentUrl);
if (undefined === version)
{
oBinaryFileReader.Read(base64File, this.wbModel);
}
else
{
g_nCurFileVersion = version;
oBinaryFileReader.ReadData(base64File, this.wbModel);
}
g_oIdCounter.Set_Load(false);
this._coAuthoringInit();
......@@ -3441,12 +3450,28 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.collaborativeEditing.applyChanges();
};
spreadsheet_api.prototype.asc_nativeApplyChanges2 = function(data, isFull)
{
// TODO:
};
spreadsheet_api.prototype.asc_nativeGetFile = function()
{
this.wb._initCommentsToSave();
var oBinaryFileWriter = new Asc.BinaryFileWriter(this.wbModel);
return oBinaryFileWriter.Write();
};
spreadsheet_api.prototype.asc_nativeGetFileData = function()
{
this.wb._initCommentsToSave();
var oBinaryFileWriter = new Asc.BinaryFileWriter(this.wbModel);
oBinaryFileWriter.Write2();
var _header = c_oSerFormat.Signature + ";v" + c_oSerFormat.Version + ";" + oBinaryFileWriter.Memory.GetCurPosition() + ";";
window["native"]["Save_End"](_header, oBinaryFileWriter.Memory.GetCurPosition());
return oBinaryFileWriter.Memory.ImData.data;
};
spreadsheet_api.prototype.asc_nativeCheckPdfRenderer = function(_memory1, _memory2)
{
......
......@@ -3508,6 +3508,13 @@
window.global_pptx_content_writer._End();
return this.WriteFileHeader(this.Memory.GetCurPosition()) + this.Memory.GetBase64Memory();
};
this.Write2 = function(idWorksheet)
{
//если idWorksheet не null, то надо серализовать только его.
window.global_pptx_content_writer._Start();
this.WriteMainTable(idWorksheet);
window.global_pptx_content_writer._End();
};
this.WriteFileHeader = function(nDataSize)
{
return c_oSerFormat.Signature + ";v" + c_oSerFormat.Version + ";" + nDataSize + ";";
......@@ -6703,6 +6710,17 @@
if(!pasteBinaryFromExcel)
History.TurnOn();
};
this.ReadData = function(data, wb)
{
History.TurnOff();
this.ReadFile(wb);
ReadDefCellStyles(wb, wb.CellStyles.DefaultStyles);
ReadDefTableStyles(wb, wb.TableStyles.DefaultStyles);
wb.TableStyles.concatStyles();
History.TurnOn();
};
this.ReadFile = function(wb)
{
return this.ReadMainTable(wb);
......
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