Commit da696f06 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Функции для поверки прилегания формул.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57195 954022d7-b5bf-4e40-9824-e11837661b57
parent 551bea67
......@@ -14,6 +14,7 @@ function ParaMath()
this.Id = g_oIdCounter.Get_NewId();
this.Type = para_Math;
this.ParaMath = true; // false - внутристроковая формула, true - формула на отдельной строке (w:oMath/w:oMathPara)
this.Jc = undefined;
//this.Math = new CMathComposition();
//this.Math.Parent = this;
......@@ -782,6 +783,17 @@ ParaMath.prototype =
return true;
},
Check_Range_OnlyMath : function(Checker, CurRange, CurLine)
{
if (null !== Checker.Math)
{
Checker.Math = null;
Checker.Result = false;
}
else
Checker.Math = this;
},
Check_BreakPageInRange : function(_CurLine, _CurRange)
{
return false;
......
......@@ -2686,6 +2686,30 @@ ParaRun.prototype =
return false;
},
Check_Range_OnlyMath : function(Checker, _CurRange, _CurLine)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var Range = this.Lines[CurLine].Ranges[CurRange];
var StartPos = Range.StartPos;
var EndPos = Range.EndPos;
for (var Pos = StartPos; Pos < EndPos; Pos++)
{
var Item = this.Content[Pos];
if (para_End === Item.Type || (para_Drawing === Item.Type && true !== Item.Is_Inline()))
continue;
else
{
Checker.Result = false;
Checker.Math = null;
break;
}
}
},
Check_BreakPageInRange : function(_CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
......
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