Bug 155768 - PRINTING: If "Default" cell style has border, black lines bleed over the printing range IF page border is also applied in default page style.
Summary: PRINTING: If "Default" cell style has border, black lines bleed over the prin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-10 16:43 UTC by Mio Taalas
Modified: 2023-06-10 17:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODS document that reproduces the bug as per described steps (11.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-06-10 16:48 UTC, Mio Taalas
Details
PDF that was exported from the example ODS file and displays the issue. (11.98 KB, application/pdf)
2023-06-10 16:50 UTC, Mio Taalas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mio Taalas 2023-06-10 16:43:42 UTC
Description:
Summary:
--------------------
Assuming that "Supress output of empty pages" is ON from calc options.

If all cells on the sheet have direct formatting cleared and "Default" style applied, if that style has a border defined AND page border is also applied from page style, it causes black lines bleeding over the page border when printing/exporting, even with print ranges defined.

It seems there's an issue with how calc handles border defined in the default style.
It shouldn't try to render ANY empty cells, even if they have a border or other styles applied to them.

If you disable border in Default style, and define your documents cell styles with any other style, issue goes away. So there's a workaround, but it's very unoptimal because that means you cannot use the Default style unless you disable the border.

I've created two files that demonstrate the issue. First document displays the issue (use print preview or export as PDF and see what happens when you select between page border on/off and "default" cell style having border on/off)

Second file is a PDF that was exported from said document by me, proving that the issue isn't just visual but affects printing and exporting as well.

I will download a bunch of older portable versions in the following days and do some spot checking if I can see where the issue came up in or if it's a regression.

I'll update the bug report after that.

Steps to Reproduce:
1.
Enable "Supress output of empty pages" from calc options.

Create a new calc sheet.
Define/edit Default page style: Size A4, add full border,
Set scaling mode to "Reduce/enlarge printout".

2.
Edit the "Default" cell style and enable full border on that style.

3.
Select the whole sheet, and clear direct formatting. Then double click the "default" style from the list to apply it to every cell of the sheet.

4.
Select (for example) first 3 columns and 100 rows, then fill them with data.
Make sure the contents doesn't go over cell borders.

5.
Define following Print Range:
Print Range: - entire sheet -
rows to repeat: - user defined - with value of $1
columns to repeat: - user defined - with value of $A:$C

6.
Go to View -> page break. And confirm that print range is properly defined and you have enough data that it can't fit on single sheet and you have multiple pages when you scroll downwards

7.
Go to "print preview" and confirm that there are black lines on left and bottom of the pages that extend outside of the page border and print range.

Actual Results:
Every printed page has black line bleeding over the print range and page border on the top right and bottom right of the page that shouldn't be there.

Expected Results:
Only borders and other cell contents of the current page and print range are rendered/printed and if the cell is outside of print range of the current page, it's contents nor borders won't be displayed even if it's adjacent to the cells in the print range or page.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
If you disable either Page Border OR Default Cell Style border and check the preview again. Black lines should be gone.

So the issue is with these two features having issue with each other and the printing rendering is misbehaving.
Comment 1 Mio Taalas 2023-06-10 16:48:40 UTC
Created attachment 187825 [details]
ODS document that reproduces the bug as per described steps
Comment 2 Mio Taalas 2023-06-10 16:50:24 UTC
Created attachment 187826 [details]
PDF that was exported from the example ODS file and displays the issue.
Comment 3 m_a_riosv 2023-06-10 17:18:30 UTC
Reprodubile
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Version: 7.7.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3b294f6139028014e72379ebe8eda24a2bd32195
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded