mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +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:
parent
8bd138cbbe
commit
bba3a7a2cb
Notes:
sideshowbarker
2024-07-18 21:10:06 +09:00
Author: https://github.com/alimpfard
Commit: bba3a7a2cb
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
1 changed files with 2 additions and 0 deletions
|
@ -495,6 +495,8 @@ Position Sheet::written_data_bounds() const
|
||||||
{
|
{
|
||||||
Position bound;
|
Position bound;
|
||||||
for (auto& entry : m_cells) {
|
for (auto& entry : m_cells) {
|
||||||
|
if (entry.value->data().is_empty())
|
||||||
|
continue;
|
||||||
if (entry.key.row >= bound.row)
|
if (entry.key.row >= bound.row)
|
||||||
bound.row = entry.key.row;
|
bound.row = entry.key.row;
|
||||||
if (entry.key.column >= bound.column)
|
if (entry.key.column >= bound.column)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue