fpspreadsheet: Fix location of merged cells in TsWorksheetGrid

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3539 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-09-10 16:44:56 +00:00
parent 66b0b44998
commit e63ff6ab6c

View File

@ -3155,15 +3155,25 @@ end;
}
procedure TsCustomWorksheetGrid.MergeCells;
begin
FWorksheet.MergeCells(Selection.Top, Selection.Left, Selection.Bottom, Selection.Right);
FWorksheet.MergeCells(
GetWorksheetRow(Selection.Top),
GetWorksheetCol(Selection.Left),
GetWorksheetRow(Selection.Bottom),
GetWorksheetCol(Selection.Right)
);
end;
{@@
Merges the selected cells to a single large cell
Splits a merged cell block into single cells
}
procedure TsCustomWorksheetGrid.UnmergeCells;
begin
FWorksheet.UnmergeCells(Selection.Top, Selection.Left, Selection.Bottom, Selection.Right);
FWorksheet.UnmergeCells(
GetWorksheetRow(Selection.Top),
GetWorksheetCol(Selection.Left),
GetWorksheetRow(Selection.Bottom),
GetWorksheetCol(Selection.Right)
);
end;
{@@