mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03: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:
parent
8bd138cbbe
commit
bba3a7a2cb
Notes:
sideshowbarker
2024-07-18 21:10:06 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/bba3a7a2cbb Pull-request: https://github.com/SerenityOS/serenity/pull/5866 Issue: https://github.com/SerenityOS/serenity/issues/4269 Issue: https://github.com/SerenityOS/serenity/issues/4821 Issue: https://github.com/SerenityOS/serenity/issues/5550 Reviewed-by: https://github.com/awesomekling
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user