Commit ab6b6ada authored by Ilya Kirillov's avatar Ilya Kirillov

Write/read from binary a new classes.

parent 5096379d
...@@ -1102,6 +1102,7 @@ ...@@ -1102,6 +1102,7 @@
window['AscDFH'].historyitem_type_Footnotes = 56 << 16; window['AscDFH'].historyitem_type_Footnotes = 56 << 16;
window['AscDFH'].historyitem_type_FootEndNote = 57 << 16; window['AscDFH'].historyitem_type_FootEndNote = 57 << 16;
window['AscDFH'].historyitem_type_Presentation = 58 << 16; window['AscDFH'].historyitem_type_Presentation = 58 << 16;
window['AscDFH'].historyitem_type_BlockLevelSdt = 59 << 16;
window['AscDFH'].historyitem_type_CommonShape = 1000 << 16; // Этот класс добавлен для элементов, у которых нет конкретного класса window['AscDFH'].historyitem_type_CommonShape = 1000 << 16; // Этот класс добавлен для элементов, у которых нет конкретного класса
......
...@@ -260,6 +260,7 @@ ...@@ -260,6 +260,7 @@
this.m_oFactoryClass[AscDFH.historyitem_type_rad] = AscCommonWord.CRadical; this.m_oFactoryClass[AscDFH.historyitem_type_rad] = AscCommonWord.CRadical;
this.m_oFactoryClass[AscDFH.historyitem_type_deg_subsup] = AscCommonWord.CDegreeSubSup; this.m_oFactoryClass[AscDFH.historyitem_type_deg_subsup] = AscCommonWord.CDegreeSubSup;
this.m_oFactoryClass[AscDFH.historyitem_type_deg] = AscCommonWord.CDegree; this.m_oFactoryClass[AscDFH.historyitem_type_deg] = AscCommonWord.CDegree;
this.m_oFactoryClass[AscDFH.historyitem_type_BlockLevelSdt] = AscCommonWord.CBlockLevelSdt;
if (window['AscCommonSlide']) if (window['AscCommonSlide'])
{ {
......
...@@ -1544,10 +1544,6 @@ CDocument.prototype.constructor = CDocument; ...@@ -1544,10 +1544,6 @@ CDocument.prototype.constructor = CDocument;
CDocument.prototype.Init = function() CDocument.prototype.Init = function()
{ {
};
CDocument.prototype.Get_Id = function()
{
return this.Id;
}; };
CDocument.prototype.On_EndLoad = function() CDocument.prototype.On_EndLoad = function()
{ {
......
...@@ -154,10 +154,6 @@ function CDocumentContent(Parent, DrawingDocument, X, Y, XLimit, YLimit, Split, ...@@ -154,10 +154,6 @@ function CDocumentContent(Parent, DrawingDocument, X, Y, XLimit, YLimit, Split,
CDocumentContent.prototype = Object.create(CDocumentContentBase.prototype); CDocumentContent.prototype = Object.create(CDocumentContentBase.prototype);
CDocumentContent.prototype.constructor = CDocumentContent; CDocumentContent.prototype.constructor = CDocumentContent;
CDocumentContent.prototype.Get_Id = function()
{
return this.Id;
};
CDocumentContent.prototype.Save_StartState = function() CDocumentContent.prototype.Save_StartState = function()
{ {
this.StartState = new CDocumentContentStartState(this); this.StartState = new CDocumentContentStartState(this);
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
*/ */
function CDocumentContentBase() function CDocumentContentBase()
{ {
this.Id = null;
this.StartPage = 0; // Номер стартовой страницы в родительском классе this.StartPage = 0; // Номер стартовой страницы в родительском классе
this.CurPage = 0; // Номер текущей страницы this.CurPage = 0; // Номер текущей страницы
...@@ -45,7 +47,14 @@ function CDocumentContentBase() ...@@ -45,7 +47,14 @@ function CDocumentContentBase()
this.ReindexStartPos = 0; this.ReindexStartPos = 0;
} }
CDocumentContentBase.prototype.Get_Id = function()
{
return this.GetId();
};
CDocumentContentBase.prototype.GetId = function()
{
return this.Id;
};
/** /**
* Получаем тип активной части документа. * Получаем тип активной части документа.
* @returns {(docpostype_Content | docpostype_HdrFtr | docpostype_DrawingObjects | docpostype_Footnotes)} * @returns {(docpostype_Content | docpostype_HdrFtr | docpostype_DrawingObjects | docpostype_Footnotes)}
......
...@@ -135,6 +135,13 @@ CDocumentContentElementBase.prototype.Is_EmptyPage = function(CurPage) ...@@ -135,6 +135,13 @@ CDocumentContentElementBase.prototype.Is_EmptyPage = function(CurPage)
CDocumentContentElementBase.prototype.Reset_RecalculateCache = function() CDocumentContentElementBase.prototype.Reset_RecalculateCache = function()
{ {
}; };
CDocumentContentElementBase.prototype.Write_ToBinary2 = function(Writer)
{
Writer.WriteLong(AscDFH.historyitem_type_Unknown);
};
CDocumentContentElementBase.prototype.Read_FromBinary2 = function(Reader)
{
};
//--------------------------------------------------------export-------------------------------------------------------- //--------------------------------------------------------export--------------------------------------------------------
window['AscCommonWord'] = window['AscCommonWord'] || {}; window['AscCommonWord'] = window['AscCommonWord'] || {};
......
...@@ -99,6 +99,18 @@ CBlockLevelSdt.prototype.Reset_RecalculateCache = function() ...@@ -99,6 +99,18 @@ CBlockLevelSdt.prototype.Reset_RecalculateCache = function()
{ {
this.Content.Reset_RecalculateCache(); this.Content.Reset_RecalculateCache();
}; };
CBlockLevelSdt.prototype.Write_ToBinary2 = function(Writer)
{
Writer.WriteLong(AscDFH.historyitem_type_BlockLevelSdt);
// String : Content id
Writer.WriteString(this.Content.GetId());
};
CBlockLevelSdt.prototype.Read_FromBinary2 = function(Reader)
{
// String : Content id
this.Content = this.LogicDocument.Get_TableId().Get_ById(Reader.GetString2());
};
//--------------------------------------------------------export-------------------------------------------------------- //--------------------------------------------------------export--------------------------------------------------------
window['AscCommonWord'] = window['AscCommonWord'] || {}; window['AscCommonWord'] = window['AscCommonWord'] || {};
......
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