fixed TrimEmptyCells removing empty cells in the middle of a row (patch from Reinier Olislagers)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3688 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
vvzh
2014-10-25 08:54:33 +00:00
parent c4d1e08656
commit f3c66179a3

View File

@ -720,8 +720,14 @@ var
begin begin
MaxCol := FCells.Count - 1; MaxCol := FCells.Count - 1;
for I := MaxCol downto 0 do for I := MaxCol downto 0 do
if (TCSVCell(FCells[I]).Value = '') and (FCells.Count > 1) then begin
FCells.Delete(I); if (TCSVCell(FCells[I]).Value = '') then
begin
if (FCells.Count > 1) then
FCells.Delete(I);
end else
break; // We hit the first non-empty cell so stop
end;
end; end;
procedure TCSVRow.SetValuesLineEnding(const ALineEnding: String); procedure TCSVRow.SetValuesLineEnding(const ALineEnding: String);