Spreadsheet: add new API PropertySheet::getNonEmptyCells()
To exclude cells without any text content. Used when printing (among other cases) to skip empty cells.
This commit is contained in:
@@ -769,7 +769,7 @@ void SheetTableView::finishEditWithMove(int keyPressed, Qt::KeyboardModifiers mo
|
||||
{
|
||||
// End should take you to the last occupied cell in the current column
|
||||
// Ctrl-End takes you to the last cell in the sheet
|
||||
auto usedCells = sheet->getCells()->getUsedCells();
|
||||
auto usedCells = sheet->getCells()->getNonEmptyCells();
|
||||
for (const auto& cell : usedCells) {
|
||||
if (modifiers == Qt::NoModifier) {
|
||||
if (cell.col() == targetColumn)
|
||||
@@ -984,7 +984,7 @@ void SheetTableView::contextMenuEvent(QContextMenuEvent *)
|
||||
|
||||
QString SheetTableView::toHtml() const
|
||||
{
|
||||
std::set<App::CellAddress> cells = sheet->getCells()->getUsedCells();
|
||||
auto cells = sheet->getCells()->getNonEmptyCells();
|
||||
int rowCount = 1;
|
||||
int colCount = 1;
|
||||
for (const auto& it : cells) {
|
||||
|
||||
Reference in New Issue
Block a user