Commit 5de57f7a authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Поправлен баг http://bugzserver/show_bug.cgi?id=29748

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63611 954022d7-b5bf-4e40-9824-e11837661b57
parent 5d41359a
......@@ -1518,9 +1518,17 @@ ParaMath.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine, _Cu
// произойдет зацикливание
//var bEmptyRange = PRS.Ranges.length > 0 && this.Root.Is_EmptyRange(_CurLine, _CurRange);
this.Root.Recalculate_LineMetrics(PRS, ParaPr, _CurLine, _CurRange, ContentMetrics);
//PRS.EmptyLine = PRS.Ranges.length > 0 && this.Root.Is_EmptyRange(_CurLine, _CurRange);
var RootAscent = this.Root.GetAscent(_CurLine, _CurRange),
RootDescent = this.Root.GetDescent(_CurLine, _CurRange);
if(PRS.LineAscent < RootAscent)
PRS.LineAscent = RootAscent;
if(PRS.LineDescent < RootDescent)
PRS.LineDescent = RootDescent;
};
ParaMath.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
......
......@@ -2279,8 +2279,19 @@ CMathBounds.prototype.SetPage = function(Line, Range, Page)
};
CMathBounds.prototype.GetWidth = function(Line, Range)
{
this.CheckLineBound(Line);
return this.Bounds[Line][Range].W;
};
CMathBounds.prototype.GetAscent = function(Line, Range)
{
this.CheckLineBound(Line);
return this.Bounds[Line][Range].Asc;
};
CMathBounds.prototype.GetDescent = function(Line, Range)
{
this.CheckLineBound(Line);
return this.Bounds[Line][Range].H - this.Bounds[Line][Range].Asc;
};
CMathBounds.prototype.ShiftPage = function(Dx)
{
var CountLines = this.Bounds.length;
......@@ -2294,7 +2305,6 @@ CMathBounds.prototype.ShiftPage = function(Dx)
this.Bounds[CurLine][CurRange].ShiftPage(Dx);
}
}
};
CMathBounds.prototype.Get_Bounds = function()
{
......@@ -2326,6 +2336,8 @@ CMathBounds.prototype.ShiftPos = function(Line, Range, Dx, Dy)
};
CMathBounds.prototype.GetPos = function(Line, Range)
{
this.CheckLineBound(Line);
var Pos = new CMathPosition();
Pos.x = this.Bounds[Line][Range].GetX();
......
......@@ -835,6 +835,7 @@ CMathContent.prototype.GetWidthLine = function(_CurLine, _CurRange)
return W;
};
CMathContent.prototype.ShiftPage = function(Dx)
{
this.Bounds.ShiftPage(Dx);
......@@ -4230,6 +4231,20 @@ CMathContent.prototype.GetWidth = function(_CurLine, _CurRange)
return this.Bounds.GetWidth(CurLine, CurRange);
};
CMathContent.prototype.GetAscent = function(_CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine,
CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
return this.Bounds.GetAscent(CurLine, CurRange);
};
CMathContent.prototype.GetDescent = function(_CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine,
CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
return this.Bounds.GetDescent(CurLine, CurRange);
};
CMathContent.prototype.Get_StartRangePos = function(_CurLine, _CurRange, SearchPos, Depth)
{
var CurLine = _CurLine - this.StartLine;
......
......@@ -866,18 +866,13 @@ CMathText.prototype.Is_CompareOperator = function()
{
return this.value == 0x3C || this.value == 0x3D || this.value == 0x3E;
};
CMathText.prototype.Is_SpecilalOperator = function()
CMathText.prototype.Is_LeftBracket = function()
{
var val = this.value,
bSpecialOperator = val == 0x21 || val == 0x23 || (val >= 0x28 && val <= 0x2F) || (val >= 0x3A && val <= 0x3F) || (val >=0x5B && val <= 0x5F) || (val >= 0x7B && val <= 0xA1) || val == 0xAC || val == 0xB1 || val == 0xB7 || val == 0xBF || val == 0xD7 || val == 0xF7 || (val >= 0x2010 && val <= 0x2014) || val == 0x2016 || (val >= 0x2020 && val <= 0x2022) || val == 0x2026,
bSpecialArrow = val >= 0x2190 && val <= 0x21FF,
bSpecialSymbols = val == 0x2200 || val == 0x2201 || val == 0x2203 || val == 0x2204 || val == 0x2206|| (val >= 0x2208 && val <= 0x220D) || (val >= 0x220F && val <= 0x221E) || (val >= 0x2223 && val <= 0x223E) || (val >= 0x223F && val <= 0x22BD) || (val >= 0x22C0 && val <= 0x22FF) || val == 0x2305 || val == 0x2306 || (val >= 0x2308 && val <= 0x230B) || (val >= 0x231C && val <= 0x231F) || val == 0x2322 || val == 0x2323 || val == 0x2329 || val == 0x232A ||val == 0x233F || val == 0x23B0 || val == 0x23B1,
bOtherArrows = (val >= 0x27D1 && val <= 0x2980) || (val >= 0x2982 && val <= 0x299A) || (val >= 0x29B6 && val <= 0x29B9) || val == 0x29C0 || val == 0x29C1 || (val >= 0x29C4 && val <= 0x29C8) || (val >= 0x29CE && val <= 0x29DB) || val == 0x29DF || (val >= 0x29E1 && val <= 0x29E6) || val == 0x29EB || (val >= 0x29F4 && val <= 0x2AFF && val !== 0x2AE1 && val !== 0x2AF1) || (val >= 0x3014 && val <= 0x3017);
// apostrophe
// отдельно Cambria Math 0x27
return bSpecialOperator || bSpecialArrow || bSpecialSymbols || bOtherArrows;
return this.value == 0x28 || this.value == 0x7B || this.value == 0x5B || this.value == 0x27E8 || this.value == 0x230A || this.value == 0x2308 || this.value == 0x27E6 || this.value == 0x2329;
};
CMathText.prototype.Is_RightBracket = function()
{
return this.value == 0x29 || this.value == 0x7D || this.value == 0x5D || this.value == 0x27E9 || this.value == 0x230B || this.value == 0x2309 || this.value == 0x27E7 || this.value == 0x232A;
};
////
CMathText.prototype.setCoeffTransform = function(sx, shx, shy, sy)
......
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