Commit 6152a07b authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Разбивка на строки формул, размещенных на нескольких странице


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61054 954022d7-b5bf-4e40-9824-e11837661b57
parent be472b19
This diff is collapsed.
...@@ -1446,19 +1446,10 @@ Paragraph.prototype.private_RecalculateLineAlign = function(CurLine, CurPa ...@@ -1446,19 +1446,10 @@ Paragraph.prototype.private_RecalculateLineAlign = function(CurLine, CurPa
var ParaMath = this.Check_Range_OnlyMath(CurRange, CurLine); var ParaMath = this.Check_Range_OnlyMath(CurRange, CurLine);
if (null !== ParaMath) if (null !== ParaMath)
{ {
var Math_Jc = ParaMath.Get_Align();
var Math_X = ( 1 === RangesCount ? this.Pages[CurPage].X + ParaPr.Ind.Left : Range.X ); var Math_X = ( 1 === RangesCount ? this.Pages[CurPage].X + ParaPr.Ind.Left : Range.X );
var Math_XLimit = ( 1 === RangesCount ? this.Pages[CurPage].XLimit - ParaPr.Ind.Right : Range.XEnd ); var Math_XLimit = ( 1 === RangesCount ? this.Pages[CurPage].XLimit - ParaPr.Ind.Right : Range.XEnd );
X = ParaMath.Get_AlignToLine(CurLine, CurRange, Math_X, Math_XLimit); X = ParaMath.Get_AlignToLine(CurLine, CurRange, PRS.Page, Math_X, Math_XLimit);
/*switch(Math_Jc)
{
case align_Left : X = Math_X; break;
case align_Right : X = Math_XLimit - ParaMath.Width; break;
case align_Center : X = Math.max(Math_X + (Math_XLimit - Math_X - ParaMath.Width) / 2, Math_X); break;
}*/
} }
else else
{ {
......
...@@ -1651,6 +1651,9 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -1651,6 +1651,9 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
var UpdateLineMetricsText = false; var UpdateLineMetricsText = false;
var ContentLen = this.Content.length; var ContentLen = this.Content.length;
var WidthLine = PRS.XEnd - PRS.X;
var XRange = PRS.XRange;
if (false === StartWord && true === FirstItemOnLine && XEnd - X < 0.001 && RangesCount > 0) if (false === StartWord && true === FirstItemOnLine && XEnd - X < 0.001 && RangesCount > 0)
{ {
NewRange = true; NewRange = true;
...@@ -2176,11 +2179,22 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -2176,11 +2179,22 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
} }
} }
if(true === Word)
{
WidthLine = X - XRange;
}
if (true === NewRange) if (true === NewRange)
break; break;
} }
} }
if(this.Type == para_Math_Run && true === NewRange)
{
this.ParaMath.UpdateMaxWidthLine(PRS, WidthLine);
}
if ( true === UpdateLineMetricsText ) if ( true === UpdateLineMetricsText )
{ {
// Пересчитаем метрику строки относительно размера данного текста // Пересчитаем метрику строки относительно размера данного текста
......
...@@ -1704,6 +1704,11 @@ CMathBase.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange ...@@ -1704,6 +1704,11 @@ CMathBase.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange
{ {
PRSC.Range.W += this.size.width; PRSC.Range.W += this.size.width;
}; };
CMathBase.prototype.Is_EmptyRange = function()
{
return false;
};
CMathBase.prototype.Get_CurrentParaPos = CMathContent.prototype.Get_CurrentParaPos; CMathBase.prototype.Get_CurrentParaPos = CMathContent.prototype.Get_CurrentParaPos;
CMathBase.prototype.private_UpdatePosOnAdd = CMathContent.prototype.private_UpdatePosOnAdd; CMathBase.prototype.private_UpdatePosOnAdd = CMathContent.prototype.private_UpdatePosOnAdd;
...@@ -1724,7 +1729,7 @@ CMathBase.prototype.private_CorrectCurPos = function() ...@@ -1724,7 +1729,7 @@ CMathBase.prototype.private_CorrectCurPos = function()
this.CurPos = this.Content.length - 1; this.CurPos = this.Content.length - 1;
this.Content[this.CurPos].Cursor_MoveToStartPos(); this.Content[this.CurPos].Cursor_MoveToStartPos();
} }
} };
CMathBase.prototype.Search = CParagraphContentWithParagraphLikeContent.prototype.Search; CMathBase.prototype.Search = CParagraphContentWithParagraphLikeContent.prototype.Search;
......
...@@ -264,9 +264,9 @@ CNary.prototype.ApplyProperties = function(RPI) ...@@ -264,9 +264,9 @@ CNary.prototype.ApplyProperties = function(RPI)
var oMathSettings = Get_WordDocumentDefaultMathSettings(); var oMathSettings = Get_WordDocumentDefaultMathSettings();
if(bIntegral) if(bIntegral)
limLoc = oMathSettings.intLim; limLoc = oMathSettings.Get_IntLim();
else else
limLoc = oMathSettings.naryLim; limLoc = oMathSettings.Get_NaryLim();
} }
var PropsInfo = var PropsInfo =
......
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