mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 04:20:19 +02:00
fixed writing empty strings to lfm
git-svn-id: trunk@8933 -
This commit is contained in:
parent
5c372c949e
commit
2ed9fee8a6
@ -2825,7 +2825,7 @@ begin
|
||||
if CompilerOptions<>'' then
|
||||
CmdLine:=CmdLine+CompilerOptions+' ';
|
||||
CmdLine:=CmdLine+TestPascalFile;
|
||||
DebugLn('TDefinePool.CreateFPCTemplate CmdLine="',CmdLine,'"');
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate CmdLine="',CmdLine,'"');
|
||||
ShortTestFile:=ExtractFileName(TestPascalFile);
|
||||
|
||||
TheProcess := TProcess.Create(nil);
|
||||
|
@ -173,14 +173,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TCustomMemo.InitializeWnd;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomMemo.InitializeWnd;
|
||||
begin
|
||||
inherited InitializeWnd;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TCustomMemo.Loaded;
|
||||
------------------------------------------------------------------------------}
|
||||
|
@ -1482,31 +1482,35 @@ procedure LRSObjectBinaryToText(Input, Output: TStream);
|
||||
i: Integer;
|
||||
InString, NewInString: Boolean;
|
||||
begin
|
||||
res := '';
|
||||
InString := False;
|
||||
for i := 1 to Length(s) do begin
|
||||
NewInString := InString;
|
||||
case s[i] of
|
||||
#0..#31: begin
|
||||
NewInString := False;
|
||||
NewStr := '#' + IntToStr(Ord(s[i]));
|
||||
end;
|
||||
'''': begin
|
||||
if s<>'' then begin
|
||||
res := '';
|
||||
InString := False;
|
||||
for i := 1 to Length(s) do begin
|
||||
NewInString := InString;
|
||||
case s[i] of
|
||||
#0..#31: begin
|
||||
NewInString := False;
|
||||
NewStr := '#' + IntToStr(Ord(s[i]));
|
||||
end;
|
||||
'''': begin
|
||||
NewInString := True;
|
||||
NewStr:=''''''; // write two ticks, so the reader will read one
|
||||
end;
|
||||
else begin
|
||||
NewInString := True;
|
||||
NewStr:='''''';
|
||||
NewStr := s[i];
|
||||
end;
|
||||
else begin
|
||||
NewInString := True;
|
||||
NewStr := s[i];
|
||||
end;
|
||||
if NewInString <> InString then begin
|
||||
NewStr := '''' + NewStr;
|
||||
InString := NewInString;
|
||||
end;
|
||||
res := res + NewStr;
|
||||
end;
|
||||
if NewInString <> InString then begin
|
||||
NewStr := '''' + NewStr;
|
||||
InString := NewInString;
|
||||
end;
|
||||
res := res + NewStr;
|
||||
if InString then res := res + '''';
|
||||
end else begin
|
||||
res:='''''';
|
||||
end;
|
||||
if InString then res := res + '''';
|
||||
OutStr(res);
|
||||
end;
|
||||
|
||||
|
@ -688,7 +688,6 @@ type
|
||||
procedure SetLines(const Value: TStrings);
|
||||
procedure SetWordWrap(const Value: boolean);
|
||||
procedure SetScrollBars(const Value: TScrollStyle);
|
||||
procedure InitializeWnd; override;
|
||||
procedure Loaded; override;
|
||||
function WordWrapIsStored: boolean; virtual;
|
||||
procedure ControlKeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
|
Loading…
Reference in New Issue
Block a user