Spreadsheet: Ignore empty cells when calculating data bounds

There's no reason to use extra rows/columns to represent empty cells
when exporting.
This commit is contained in:
AnotherTest 2021-03-20 13:56:35 +03:30 committed by Andreas Kling
parent 8bd138cbbe
commit bba3a7a2cb
Notes: sideshowbarker 2024-07-18 21:10:06 +09:00

View File

@ -495,6 +495,8 @@ Position Sheet::written_data_bounds() const
{
Position bound;
for (auto& entry : m_cells) {
if (entry.value->data().is_empty())
continue;
if (entry.key.row >= bound.row)
bound.row = entry.key.row;
if (entry.key.column >= bound.column)