diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-11 16:34:43 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-11 16:34:43 +0200 |
commit | a12affe6e6f7c14303dd8e4c8eec834fe73a5be2 (patch) | |
tree | e231dcb10ddc39b1baedf46e28ff100990e6c5f5 /docview/components/richtext/RichTextLayoutUnit.pas | |
parent | 31dc8b6a853e7334be9431496f94d290d7173e5d (diff) | |
download | fpGUI-a12affe6e6f7c14303dd8e4c8eec834fe73a5be2.tar.xz |
minor code formatting, improved code comments
Diffstat (limited to 'docview/components/richtext/RichTextLayoutUnit.pas')
-rw-r--r-- | docview/components/richtext/RichTextLayoutUnit.pas | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/docview/components/richtext/RichTextLayoutUnit.pas b/docview/components/richtext/RichTextLayoutUnit.pas index 491c6f11..f79567e0 100644 --- a/docview/components/richtext/RichTextLayoutUnit.pas +++ b/docview/components/richtext/RichTextLayoutUnit.pas @@ -269,7 +269,7 @@ Var CurrentLine: TLayoutLine; CurrentLinkIndex: longint; WrapX: longint; // X to wrap at - WordX: longint; // width of word so far + WordX: longint; // width of the current word so far P: PChar; NextP: PChar; NextP2: PChar; @@ -362,20 +362,16 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>'); teLineBreak: begin DoLine( P, NextP, WordStartX + WordX ); - // remember start of line WordStart := NextP; WordX := 0; - P := NextP; - continue; end; teTextEnd: begin DoLine( P, NextP, WordStartX + WordX ); - // end of text, done break; end; @@ -396,7 +392,6 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>'); WordStarted := true; BitmapHeight := Trunc(Bitmap.Height * FVerticalImageScale); end; - end; teText: @@ -457,7 +452,6 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>'); // at least not for IPF :) end; { teSetLeftMargin } - else begin // before processing the tag see if font height needs updating @@ -480,11 +474,10 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>'); P := NextP; continue; // continue loop end; - end; + end; { case CurrentElement.Tag.TagType of... } + end { teStyle } - end - - end; + end; { case CurrentElement.ElementType of... } if OnBreak then begin |