mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 12:02:48 +02:00
lcl, valedit, don't concat strings to avoid codepage conversions, issue #26449
git-svn-id: trunk@45782 -
This commit is contained in:
parent
3c1fb6e10f
commit
8f01bb744d
@ -798,8 +798,11 @@ var
|
|||||||
NewInd, NewRow: Integer;
|
NewInd, NewRow: Integer;
|
||||||
Line: String;
|
Line: String;
|
||||||
begin
|
begin
|
||||||
if not ((KeyName = '') and (Value = '')) then
|
if not ((KeyName = '') and (Value = '')) then begin
|
||||||
Line := KeyName + Strings.NameValueSeparator + Value
|
Line := Value;
|
||||||
|
Insert(Strings.NameValueSeparator, Line, 1);
|
||||||
|
Insert(KeyName, Line, 1);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Line := '';
|
Line := '';
|
||||||
if (Row > Strings.Count) or ((Row - FixedRows) >= Strings.Count)
|
if (Row > Strings.Count) or ((Row - FixedRows) >= Strings.Count)
|
||||||
@ -844,7 +847,9 @@ begin
|
|||||||
end
|
end
|
||||||
else if (Length(Values) = 1) then
|
else if (Length(Values) = 1) then
|
||||||
AKey := Values[0];
|
AKey := Values[0];
|
||||||
Strings.InsertItem(Index, AKey + Strings.NameValueSeparator + AValue);
|
Insert(Strings.NameValueSeparator, AValue, 1);
|
||||||
|
Insert(AKey, AValue, 1);
|
||||||
|
Strings.InsertItem(Index, AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TValueListEditor.ExchangeColRow(IsColumn: Boolean; index, WithIndex: Integer);
|
procedure TValueListEditor.ExchangeColRow(IsColumn: Boolean; index, WithIndex: Integer);
|
||||||
@ -1062,8 +1067,11 @@ begin
|
|||||||
Inc(I, FixedRows);
|
Inc(I, FixedRows);
|
||||||
Cells[1,I]:=AValue;
|
Cells[1,I]:=AValue;
|
||||||
end
|
end
|
||||||
else
|
else begin
|
||||||
Strings.Add(Key + Strings.NameValueSeparator + AValue);
|
Insert(Strings.NameValueSeparator, AValue, 1);
|
||||||
|
Insert(Key, AValue, 1);
|
||||||
|
Strings.Add(AValue);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TValueListEditor.ShowColumnTitles;
|
procedure TValueListEditor.ShowColumnTitles;
|
||||||
@ -1288,8 +1296,11 @@ begin
|
|||||||
//If cells are empty don't store '=' in Strings
|
//If cells are empty don't store '=' in Strings
|
||||||
if (Key = '') and (KeyValue = '') then
|
if (Key = '') and (KeyValue = '') then
|
||||||
Line := ''
|
Line := ''
|
||||||
else
|
else begin
|
||||||
Line := Key + Strings.NameValueSeparator + KeyValue;
|
Line := KeyValue;
|
||||||
|
system.Insert(Strings.NameValueSeparator, Line, 1);
|
||||||
|
system.Insert(Key, Line, 1);
|
||||||
|
end;
|
||||||
// Empty grid: don't add a the line '' to Strings!
|
// Empty grid: don't add a the line '' to Strings!
|
||||||
if (Strings.Count = 0) and (Line = '') then Exit;
|
if (Strings.Count = 0) and (Line = '') then Exit;
|
||||||
if I>=Strings.Count then
|
if I>=Strings.Count then
|
||||||
|
Loading…
Reference in New Issue
Block a user