Spreadsheet: fix extra row or column when printing
If there is only one single row or column in the table
This commit is contained in:
@@ -985,8 +985,8 @@ void SheetTableView::contextMenuEvent(QContextMenuEvent *)
|
||||
QString SheetTableView::toHtml() const
|
||||
{
|
||||
auto cells = sheet->getCells()->getNonEmptyCells();
|
||||
int rowCount = 1;
|
||||
int colCount = 1;
|
||||
int rowCount = 0;
|
||||
int colCount = 0;
|
||||
for (const auto& it : cells) {
|
||||
rowCount = std::max(rowCount, it.row());
|
||||
colCount = std::max(colCount, it.col());
|
||||
|
||||
Reference in New Issue
Block a user