fpspreadsheet: Fix pasting from LibreOffice clipboard.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5066 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-08-02 13:58:08 +00:00
parent d5fb5a417e
commit cb4466eef7

View File

@ -8595,6 +8595,7 @@ begin
end;
end;
// Select all copied cells
sel := Range(Cardinal(-1), Cardinal(-1), Cardinal(-1), Cardinal(-1));
SetLength(selArray, nselS);
for i := 0 to nselS-1 do
begin
@ -8615,14 +8616,15 @@ begin
r := sel.Row2;
c := sel.Col2;
end;
ActiveWorksheet.SelectCell(r + dr, c + dc);
if (r <> -1) and (c <> -1) then
ActiveWorksheet.SelectCell(r + dr, c + dc);
end
else
// -------------------------------------------------------------------------
// Case (2): Source is a single block (not necessarily a cell), Dest can be
// any shape --> source is tiled into destination
// -------------------------------------------------------------------------
if nselS = 1 then
// if nselS = 1 then
begin
// size of source block
with clipsheet do
@ -8672,13 +8674,15 @@ begin
end; // while r...
end; // for i
// No need to select copied cells - they already are.
end
end ;
{
else
// -------------------------------------------------------------------------
// Other arrangements of source and destination are not supported
// -------------------------------------------------------------------------
raise Exception.Create('This arrangement of source and destination '+
'cells in not supported for copy & paste');
}
finally
clipbook.Free;
end;