mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 08:47:59 +02:00
TAChart: Fix compilation with FPC 3.0.4, issue #38623. Undo part of r64450 #47499875e6 which does not compile with 3.0.4 either.
git-svn-id: trunk@64811 -
This commit is contained in:
parent
fe03edd4aa
commit
2c5911c6d3
@ -19,9 +19,6 @@
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<IgnoredMessages idx6058="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-dCHECK_VALID_SCALING"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="CHECK_VALID_SCALING"/>
|
||||
|
@ -808,7 +808,7 @@ function WordWrap(const AText: String; ADrawer: IChartDrawer;
|
||||
AMaxWidth: Integer; ATextFormat: TChartTextFormat): string;
|
||||
var
|
||||
L: TStrings;
|
||||
sa: TStringArray;
|
||||
words: TStrings;
|
||||
line, testline: String;
|
||||
s: String;
|
||||
w, ws, wspace: Integer;
|
||||
@ -820,14 +820,15 @@ begin
|
||||
begin
|
||||
wspace := ADrawer.TextExtent(' ').X;
|
||||
L := TStringList.Create;
|
||||
words := TStringList.Create;
|
||||
try
|
||||
L.Text := AText;
|
||||
for i := 0 to L.Count-1 do
|
||||
begin
|
||||
sa := SplitString(L[i], ' ');
|
||||
Split(L[i], words, ' ');
|
||||
line := '';
|
||||
w := 0;
|
||||
for s in sa do
|
||||
for s in words do
|
||||
begin
|
||||
ws := ADrawer.TextExtent(s).X;
|
||||
if w + wspace + ws <= AMaxWidth then
|
||||
@ -855,6 +856,7 @@ begin
|
||||
Result := Result + LineEnding;
|
||||
end;
|
||||
finally
|
||||
words.Free;
|
||||
L.Free;
|
||||
end;
|
||||
end else
|
||||
|
Loading…
Reference in New Issue
Block a user