Files
odfstudio/sc/source
Bayram Çiçek f2531aab9b tdf#145726: Calc: print empty rows that carry a border
- a form with a header row and a hundred empty bordered rows below it
printed only the header row. Calc drops a run of 84 or more equally
formatted rows below the last cell with content, and everything under
it, so the print range ended at the last row with data. The borders
were on screen all along, so only printing, the print preview and the
PDF export showed it.

- the run is measured from the last row with data, so typing changed
the result. On a form whose borders end at row 100, text in row 16 left
84 rows below it and the borders stayed away, text in row 17 left 83
and the whole form printed.

- ScDocument::IsPrintEmpty prints a page that carries a border and no
content, and suppresses one carrying only a colour. A bordered run is
therefore kept now, unless it is wider than SC_VISATTR_BORDER_STOP in
its own length or in its distance below the data, which is the whole
column case i30830 is about. The length stays the same as the sheet is
filled in, the distance stops a chain of shorter bordered ranges
reaching the sheet end. Neither measure applies to a run under
SC_VISATTR_STOP rows, because a run that short was never dropped.

- the print range also sets where Ctrl+End lands, how far the desktop
scrolls and what range is written out on save, so all three grow with
it. In the browser the scroll extent comes from the cell area, so it
stays where it was.

- a run has to meet one more condition than before to be dropped, so no
document prints less than it did, and the ones hitting this bug print
more.

- the tests say a bordered form is printed, a colour under the content
does not pull the print area down, a border too wide or too far down
does not either, a frame round a whole column leaves the printout
ending at the last row with content, and a form is printed wherever the
content ends, including when a font change splits it in two.

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I44d041cdbbcde7bfa69b53035f5bebc8d59f9bdd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14112
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 00e5de0a8bd89e5f5c9f7b19fef85331354c4458)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211943
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-08 00:28:25 +02:00
..
2026-10-05 08:52:04 +02:00