private bool InitFormat(Area area, FormatInfo previousFormatInfo)
{
this.phase = Phase.Formatting;
this.tabOffsets = new ArrayList();
ParagraphFormatInfo prevParaFormatInfo = (ParagraphFormatInfo)previousFormatInfo;
if (previousFormatInfo == null || prevParaFormatInfo.LineCount == 0)
{
((ParagraphFormatInfo)this.renderInfo.FormatInfo).isStarting = true;
ParagraphIterator parIt = new ParagraphIterator(this.paragraph.Elements);
this.currentLeaf = parIt.GetFirstLeaf();
this.isFirstLine = true;
}
else
{
this.currentLeaf = prevParaFormatInfo.GetLastLineInfo().endIter.GetNextLeaf();
this.isFirstLine = false;
((ParagraphFormatInfo)this.renderInfo.FormatInfo).isStarting = false;
}
this.startLeaf = this.currentLeaf;
this.currentVerticalInfo = CalcCurrentVerticalInfo();
this.currentYPosition = area.Y + TopBorderOffset;
this.formattingArea = area;
Rectangle rect = this.formattingArea.GetFittingRect(this.currentYPosition, this.currentVerticalInfo.height);
if (rect == null)
return false;
this.currentXPosition = rect.X + LeftIndent;
if (this.isFirstLine)
FormatListSymbol();
return true;
}