Add assert for row==0 and col==0
As some users consider that (0, 0) is the first valid cell, so we give a assert failure in debug mode for such cases.
This commit is contained in:
@@ -147,6 +147,9 @@ QString WorksheetPrivate::generateDimensionString() const
|
||||
*/
|
||||
int WorksheetPrivate::checkDimensions(int row, int col, bool ignore_row, bool ignore_col)
|
||||
{
|
||||
Q_ASSERT_X(row!=0, "checkDimensions", "row should start from 1 instead of 0");
|
||||
Q_ASSERT_X(col!=0, "checkDimensions", "column should start from 1 instead of 0");
|
||||
|
||||
if (row > XLSX_ROW_MAX || row < 1 || col > XLSX_COLUMN_MAX || col < 1)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user