You've already forked lazarus-ccr
fpspreadsheet: Avoid creating a blank cell if the row/col indexes passed to Worksheet.ReadAsText(row, col) are those of a non-existing cell (see https://forum.lazarus.freepascal.org/index.php/topic,41132.msg284876.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6377 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -2792,13 +2792,18 @@ end;
|
|||||||
@return The text representation of the cell
|
@return The text representation of the cell
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
function TsWorksheet.ReadAsText(ARow, ACol: Cardinal): string;
|
function TsWorksheet.ReadAsText(ARow, ACol: Cardinal): string;
|
||||||
|
var
|
||||||
|
cell: PCell;
|
||||||
begin
|
begin
|
||||||
Result := ReadAsText(GetCell(ARow, ACol));
|
cell := FindCell(ARow, ACol);
|
||||||
|
if cell <> nil then Result := ReadAsText(cell) else Result := '';
|
||||||
|
{ avoid creating a blenk cell if the cell does not exist
|
||||||
|
Result := ReadAsText(GetCell(ARow, ACol)); }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsWorksheet.ReadAsUTF8Text(ARow, ACol: Cardinal): string;
|
function TsWorksheet.ReadAsUTF8Text(ARow, ACol: Cardinal): string;
|
||||||
begin
|
begin
|
||||||
Result := ReadAsText(GetCell(ARow, ACol));
|
Result := ReadAsText(ARow, ACol);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user