mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:06:19 +02:00
* Merging revisions r43491 from trunk:
------------------------------------------------------------------------ r43491 | michael | 2019-11-16 13:59:25 +0100 (Sat, 16 Nov 2019) | 1 line * Implement option to replace too-long words with asterisks (bug ID 33639) ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@43721 -
This commit is contained in:
parent
61ff151b2e
commit
dbb053a67e
@ -143,7 +143,11 @@ type
|
|||||||
moResetAggregateOnColumn
|
moResetAggregateOnColumn
|
||||||
);
|
);
|
||||||
TFPReportMemoOptions = set of TFPReportMemoOption;
|
TFPReportMemoOptions = set of TFPReportMemoOption;
|
||||||
TFPReportWordOverflow = (woTruncate,woOverflow,woSplit);
|
TFPReportWordOverflow = (woTruncate, // truncate the word
|
||||||
|
woOverflow, // Allow to overflow
|
||||||
|
woSplit, // Split word at max char count that fits length.
|
||||||
|
woAsterisk // Replace word with * chars.
|
||||||
|
);
|
||||||
|
|
||||||
TFPReportSections = set of rsPage..rsColumn;
|
TFPReportSections = set of rsPage..rsColumn;
|
||||||
|
|
||||||
@ -3984,6 +3988,12 @@ begin
|
|||||||
m:=Length(S); // Discard the remainder of the word.
|
m:=Length(S); // Discard the remainder of the word.
|
||||||
woSplit:
|
woSplit:
|
||||||
m:=Length(S3); // S3 was the longest possible part of the word. Split after
|
m:=Length(S3); // S3 was the longest possible part of the word. Split after
|
||||||
|
woAsterisk:
|
||||||
|
begin
|
||||||
|
w:= lFC.TextWidth('*', Font.Size);
|
||||||
|
S2:=StringOfChar('*',round(MaxW / w));
|
||||||
|
m:=Length(S); // Discard the remainder of the word.
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
FTextLines.Add(s2);
|
FTextLines.Add(s2);
|
||||||
|
Loading…
Reference in New Issue
Block a user