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

Fixed bug 31508

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67884 954022d7-b5bf-4e40-9824-e11837661b57
parent b48effd0
......@@ -395,7 +395,11 @@
<script src="../../../../OfficeWeb/Word/Editor/Document.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/DocumentContent.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Table.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Serialize2.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Table/TableRecalculate.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Table/TableDraw.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Table/TableRow.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Table/TableCell.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Serialize2.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/FontClassification.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/Spelling.js"></script>
<script src="../../../../OfficeWeb/Word/Editor/GraphicObjects/WrapManager.js"></script>
......
......@@ -600,6 +600,7 @@ function CDocumentRecalcInfo()
this.WidowControlReset = false; //
this.KeepNextParagraph = null; // Параграф, который надо пересчитать из-за того, что следующий начался с новой страницы
this.KeepNextEndParagraph = null; // Параграф, на котором определилось, что нужно делать пересчет предыдущих
this.FrameRecalc = false; // Пересчитываем ли рамку
this.ParaMath = null;
......@@ -620,6 +621,7 @@ CDocumentRecalcInfo.prototype =
this.WidowControlReset = false;
this.KeepNextParagraph = null;
this.KeepNextEndParagraph = null;
this.ParaMath = null;
},
......@@ -678,9 +680,10 @@ CDocumentRecalcInfo.prototype =
return this.FlowObjectPageBreakBefore;
},
Set_KeepNext : function(Paragraph)
Set_KeepNext : function(Paragraph, EndParagraph)
{
this.KeepNextParagraph = Paragraph;
this.KeepNextParagraph = Paragraph;
this.KeepNextEndParagraph = EndParagraph;
},
Check_KeepNext : function(Paragraph)
......@@ -691,6 +694,14 @@ CDocumentRecalcInfo.prototype =
return false;
},
Check_KeepNextEnd : function(Paragraph)
{
if (Paragraph === this.KeepNextEndParagraph)
return true;
return false;
},
Need_ResetWidowControl : function()
{
this.WidowControlReset = true;
......@@ -925,7 +936,8 @@ function CDocument(DrawingDocument, isMainLogicDocument)
DragDrop : { Flag : 0, Data : null } // 0 - не drag-n-drop, и мы его проверяем, 1 - drag-n-drop, -1 - не проверять drag-n-drop
};
this.ColumnsMarkup = new CColumnsMarkup();
if (false !== isMainLogicDocument)
this.ColumnsMarkup = new CColumnsMarkup();
// Здесь мы храним инфрмацию, связанную с разбивкой на страницы и самими страницами
this.Pages = [];
......
......@@ -628,7 +628,7 @@ Paragraph.prototype.private_RecalculatePageKeepNext = function(CurLine, CurPa
{
if (true === this.Parent.RecalcInfo.Can_RecalcObject())
{
this.Parent.RecalcInfo.Set_KeepNext(Curr);
this.Parent.RecalcInfo.Set_KeepNext(Curr, this);
PRS.RecalcResult = recalcresult_PrevPage | recalcresultflags_Column;
return false;
}
......@@ -641,6 +641,13 @@ Paragraph.prototype.private_RecalculatePageKeepNext = function(CurLine, CurPa
}
}
if (true === this.Parent.RecalcInfo.Check_KeepNextEnd(this))
{
// Дошли до сюда, значит уже пересчитали данную ситуацию.
// Делаем Reset здесь, потому что Reset надо делать в том же месте, гды мы запросили пересчет заново.
this.Parent.RecalcInfo.Reset();
}
return true;
};
......@@ -725,8 +732,6 @@ Paragraph.prototype.private_RecalculatePageBreak = function(CurLine, CurPa
}
else if ( true === this.Parent.RecalcInfo.Check_KeepNext(this) && 0 === CurPage && null != this.Get_DocumentPrev() )
{
this.Parent.RecalcInfo.Reset();
this.Pages[CurPage].Set_EndLine( CurLine - 1 );
if ( 0 === CurLine )
this.Lines[-1] = new CParaLine( 0 );
......
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