Commit 23b9db2
authored
Remove empty rows/columns from the range returned by worksheet::rows(true) (#8)
Note that the iterator already skipped those empty rows/cells, but those
rows/columns were included in the returned range.reference(). If someone
is interested in the old range_reference (i.e. the envolope of all
non-empty cells or rows with properties), calculate_dimension(true) can
be called directly.
Note that Google Sheets sometimes add empty rows (with only properties
being defined). This results in a different range being returned by
rows/columns before or after the file is saved by Google Sheets.
Note that the (old) default behaviour of calculate_dimension is kept, as
this is how the dimensions are stored in the worksheet. Changing this
behaviour results in failed unit tests.
Fixes #53 files changed
Lines changed: 34 additions & 10 deletions
File tree
- include/xlnt/worksheet
- source/worksheet
- tests/worksheet
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| 256 | + | |
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
| |||
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
| 443 | + | |
439 | 444 | | |
440 | | - | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | | - | |
599 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
600 | 604 | | |
601 | | - | |
602 | 605 | | |
603 | 606 | | |
604 | 607 | | |
| |||
724 | 727 | | |
725 | 728 | | |
726 | 729 | | |
727 | | - | |
| 730 | + | |
728 | 731 | | |
729 | 732 | | |
730 | 733 | | |
731 | 734 | | |
732 | | - | |
| 735 | + | |
733 | 736 | | |
734 | 737 | | |
735 | 738 | | |
736 | 739 | | |
737 | | - | |
| 740 | + | |
738 | 741 | | |
739 | 742 | | |
740 | 743 | | |
741 | 744 | | |
742 | | - | |
| 745 | + | |
743 | 746 | | |
744 | 747 | | |
745 | 748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
1674 | 1675 | | |
1675 | 1676 | | |
1676 | 1677 | | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
1677 | 1693 | | |
1678 | 1694 | | |
1679 | 1695 | | |
0 commit comments