1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

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

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)