FpSpreadsheet: Fix range overflow when a cell range is copied in spready to the clipboard.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9741 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
fc71c0cf31
commit
7e0d30209a
@ -4539,6 +4539,12 @@ var
|
||||
len: Integer;
|
||||
wideStr: WideString;
|
||||
begin
|
||||
if AString = '' then
|
||||
begin
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// string constant is stored as widestring in BIFF8
|
||||
wideStr := UTF8Decode(AString);
|
||||
len := Length(wideStr);
|
||||
|
@ -5724,6 +5724,12 @@ var
|
||||
len: Byte;
|
||||
s: ansistring;
|
||||
begin
|
||||
if AString = '' then
|
||||
begin
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
s := ConvertEncoding(AString, encodingUTF8, FCodePage);
|
||||
len := Length(s);
|
||||
AStream.WriteByte(len);
|
||||
|
Loading…
Reference in New Issue
Block a user