Range check error when pasting a selection with empty cells in a string grid
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
TStringGrid supports copy&paste of cell blocks. However, if the selection contains empty cells then the paste operation fails with error 201 (range check). Range checking is normally off, but nothing prevents to user to turn it on. The provided patch fixes this error even with range-checking on.
Steps to reproduce:
* Run attached demo.
* Select the range between the two cells such that "12" is the upper/left and "34" is the lower/right cell of the selection. In this selection the first cell of the second row is empty.
* Press CTRL+C to copy the range to the clipboard
* Select another cell somewhere.
* Press CTRL+V to paste the range back into the grid
* Run-time error 201 is reported.
NOTE: the LCL has to be compiled with range-checking on to see this bug.
Mantis conversion info:
- Mantis ID: 28747
- Version: 1.5 (SVN)
- Fixed in version: 1.5 (SVN)
- Fixed in revision: 49896 (#1ab7a995)
- Target version: 1.4.4
- LazTarget: 1.6