Commit 2d2c52f2 authored by Ilya Kirillov's avatar Ilya Kirillov

Added custom mark field to FootnoteReference class.

parent cdcc0209
...@@ -7566,12 +7566,14 @@ ParaPresentationNumbering.prototype = ...@@ -7566,12 +7566,14 @@ ParaPresentationNumbering.prototype =
/** /**
* Класс представляющий ссылку на сноску. * Класс представляющий ссылку на сноску.
* @param {CFootEndnote} Footnote - Ссылка на сноску. * @param {CFootEndnote} Footnote - Ссылка на сноску.
* @param {string} CustomMark
* @constructor * @constructor
* @extends {CRunElementBase} * @extends {CRunElementBase}
*/ */
function ParaFootnoteReference(Footnote) function ParaFootnoteReference(Footnote, CustomMark)
{ {
this.Footnote = Footnote; this.Footnote = Footnote;
this.CustomMark = CustomMark ? CustomMark : undefined;
this.Width = 0; this.Width = 0;
this.WidthVisible = 0; this.WidthVisible = 0;
...@@ -7629,13 +7631,30 @@ ParaFootnoteReference.prototype.Write_ToBinary = function(Writer) ...@@ -7629,13 +7631,30 @@ ParaFootnoteReference.prototype.Write_ToBinary = function(Writer)
{ {
// Long : Type // Long : Type
// String : FootnoteId // String : FootnoteId
// Bool : is undefined mark ?
// false -> String2 : CustomMark
Writer.WriteLong(this.Type); Writer.WriteLong(this.Type);
Writer.WriteString2(this.Footnote.Get_Id()); Writer.WriteString2(this.Footnote.Get_Id());
if (undefined === this.CustomMark)
{
Writer.WriteBool(true);
}
else
{
Writer.WriteBool(false);
Writer.WriteString2(this.CustomMark);
}
}; };
ParaFootnoteReference.prototype.Read_FromBinary = function(Reader) ParaFootnoteReference.prototype.Read_FromBinary = function(Reader)
{ {
// String : FootnoteId // String : FootnoteId
// Bool : is undefined mark ?
// false -> String2 : CustomMark
this.Footnote = g_oTableId.Get_ById(Reader.GetString2()); this.Footnote = g_oTableId.Get_ById(Reader.GetString2());
if (false === Reader.GetBool())
this.CustomMark = Reader.GetString2();
}; };
ParaFootnoteReference.prototype.Get_Footnote = function() ParaFootnoteReference.prototype.Get_Footnote = function()
{ {
......
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