- wxASSERT(!(lastCompletedEndPos != -1 && lastCompletedEndPos < GetRange().GetEnd()-1));
-
-#if 0
- // Add the last line - it's the current pos -> last para pos
- // Substract -1 because the last position is always the end-paragraph position.
- if (lastCompletedEndPos <= GetRange().GetEnd()-1)
- {
- currentPosition.x = availableRect.x - rect.x;
-
- wxRichTextLine* line = AllocateLine(lineCount);
-
- wxRichTextRange actualRange(lastCompletedEndPos+1, GetRange().GetEnd()-1);
-
- // Set relative range so we won't have to change line ranges when paragraphs are moved
- line->SetRange(wxRichTextRange(actualRange.GetStart() - GetRange().GetStart(), actualRange.GetEnd() - GetRange().GetStart()));
-
- line->SetPosition(currentPosition);
-
- if (lineHeight == 0 && GetBuffer())
- {
- wxFont font(GetBuffer()->GetFontTable().FindFont(attr));
- wxCheckSetFont(dc, font);
- lineHeight = dc.GetCharHeight();
- }
- if (maxDescent == 0)
- {
- int w, h;
- dc.GetTextExtent(wxT("X"), & w, &h, & maxDescent);
- }
-
- line->SetSize(wxSize(currentWidth, lineHeight));
- line->SetDescent(maxDescent);
- maxWidth = wxMax(maxWidth, currentWidth+startOffset);
- currentPosition.y += lineHeight;
- currentPosition.y += lineSpacing;
- lineCount ++;
- }
-#endif