Commit df918a71 authored by Ilya Kirillov's avatar Ilya Kirillov

Added function to classes ParaPageNum, ParaPageCount to get a value.

parent 008ca811
......@@ -219,6 +219,10 @@ CRunElementBase.prototype.Write_ToBinary = function(Writer)
CRunElementBase.prototype.Read_FromBinary = function(Reader)
{
};
CRunElementBase.prototype.GetType = function()
{
return this.Type;
};
// Класс ParaText
function ParaText(value)
......@@ -1425,6 +1429,18 @@ ParaPageNum.prototype =
{
}
};
ParaPageNum.prototype.GetPageNumValue = function()
{
var nPageNum = parseInt(this.String);
if (isNaN(nPageNum))
return 1;
return nPageNum;
};
ParaPageNum.prototype.GetType = function()
{
return this.Type;
};
function CPageNumRecalculateObject(Type, Widths, String, Width, Copy)
{
......@@ -1527,7 +1543,7 @@ function ParaFootnoteReference(Footnote, CustomMark)
this.Run = null;
this.Widths = [];
}
ParaFootnoteReference.prototype = Object.create(CRunElementBase.prototype);
ParaFootnoteReference.prototype = Object.create(CRunElementBase.prototype);
ParaFootnoteReference.prototype.constructor = ParaFootnoteReference;
ParaFootnoteReference.prototype.Type = para_FootnoteReference;
ParaFootnoteReference.prototype.Get_Type = function()
......@@ -1713,7 +1729,7 @@ function ParaFootnoteRef(Footnote)
{
ParaFootnoteReference.call(this, Footnote);
}
ParaFootnoteRef.prototype = Object.create(ParaFootnoteReference.prototype);
ParaFootnoteRef.prototype = Object.create(ParaFootnoteReference.prototype);
ParaFootnoteRef.prototype.constructor = ParaFootnoteRef;
ParaFootnoteRef.prototype.Type = para_FootnoteRef;
ParaFootnoteRef.prototype.Get_Type = function()
......@@ -1751,7 +1767,7 @@ function ParaSeparator()
CRunElementBase.call(this);
this.LineW = 0;
}
ParaSeparator.prototype = Object.create(CRunElementBase.prototype);
ParaSeparator.prototype = Object.create(CRunElementBase.prototype);
ParaSeparator.prototype.constructor = ParaSeparator;
ParaSeparator.prototype.Type = para_Separator;
ParaSeparator.prototype.Get_Type = function()
......@@ -1805,7 +1821,7 @@ function ParaContinuationSeparator()
CRunElementBase.call(this);
this.LineW = 0;
}
ParaContinuationSeparator.prototype = Object.create(CRunElementBase.prototype);
ParaContinuationSeparator.prototype = Object.create(CRunElementBase.prototype);
ParaContinuationSeparator.prototype.constructor = ParaContinuationSeparator;
ParaContinuationSeparator.prototype.Type = para_ContinuationSeparator;
ParaContinuationSeparator.prototype.Get_Type = function()
......@@ -1857,7 +1873,7 @@ function ParaPageCount(PageCount)
this.String = "";
this.PageCount = undefined !== PageCount ? PageCount : 1;
}
ParaPageCount.prototype = Object.create(CRunElementBase.prototype);
ParaPageCount.prototype = Object.create(CRunElementBase.prototype);
ParaPageCount.prototype.constructor = ParaPageCount;
ParaPageCount.prototype.Type = para_PageCount;
ParaPageCount.prototype.Copy = function()
......@@ -1942,6 +1958,10 @@ ParaPageCount.prototype.Read_FromBinary = function(Reader)
{
this.PageCount = Reader.GetLong();
};
ParaPageCount.prototype.GetPageCountValue = function()
{
return this.PageCount;
};
function ParagraphContent_Read_FromBinary(Reader)
{
......
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