Bug 35591 - Incorrect print range detection in calc, hidden cells are not handled correct
Summary: Incorrect print range detection in calc, hidden cells are not handled correct
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Print-Range
  Show dependency treegraph
 
Reported: 2011-03-23 05:21 UTC by Ákos
Modified: 2021-06-16 12:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example for incorrect pring rage detection in calc (8.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-03-23 05:21 UTC, Ákos
Details
Anoher example for incorrect print rage detection (9.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-31 13:23 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ákos 2011-03-23 05:21:41 UTC
Created attachment 44751 [details]
Example for incorrect pring rage detection in calc

In LibreOffice calc, on default formatting, in my example I have 10 columns data in 20 rows, this document printed on 2 pages.
When I select the last 5 columns and in the Format Cells dialog box, Cell Protection I tick Hide when printing, normally my data is fit in 1 page, but the libreoffice print one page with data and one blank page.

Is the same case, when is select only the non-empty cells and select Hide when printing, or select this option with full column selection.
Comment 1 Björn Michaelsen 2011-12-23 11:50:40 UTC Comment hidden (obsolete)
Comment 2 Ákos 2011-12-26 12:40:58 UTC Comment hidden (obsolete)
Comment 3 Ákos 2012-01-05 03:25:48 UTC Comment hidden (obsolete)
Comment 4 Cor Nouws 2012-02-23 04:45:47 UTC Comment hidden (obsolete)
Comment 5 Cor Nouws 2012-02-23 04:47:34 UTC Comment hidden (obsolete)
Comment 6 Ákos 2012-02-23 06:01:36 UTC Comment hidden (obsolete)
Comment 7 Ákos 2012-12-13 14:19:04 UTC Comment hidden (obsolete)
Comment 8 Ákos 2014-11-10 10:53:19 UTC Comment hidden (obsolete)
Comment 9 Cor Nouws 2014-11-10 11:01:28 UTC
also the same unexpected result in 4.4.0 alpha1
Comment 10 Ákos 2015-06-04 07:29:35 UTC Comment hidden (obsolete)
Comment 11 Ákos 2016-09-20 12:56:07 UTC Comment hidden (obsolete)
Comment 12 Ákos 2018-06-26 07:31:05 UTC
The bug still exist in:
Version: 6.1.0.0.beta2 (x64)
Build ID: 0f4d2060bc90b4008fbc8e6d9a49ec7eeea60b78
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: hu-HU (hu_HU); Calc: group threaded
Comment 13 Timur 2018-07-31 13:23:06 UTC
Created attachment 143842 [details]
Anoher example for incorrect print rage detection

I add Anoher example for incorrect print rage detection as simple ODS.
Due to hidden H column with text in H60, print rage detection is incorrect.
Same is valid for opening XLSX files.
Comment 14 Timur 2018-07-31 13:23:39 UTC Comment hidden (obsolete)
Comment 15 stragu 2021-06-16 12:45:48 UTC
I can reproduce with the current daily master build, but I'm wondering if this really is a bug, given that hiding columns in the middle will still show blank space where the cells would have been. (Which would make sense in particular for when you are hiding just a few cells, not whole columns.)
For example, hide columns B and C, and export as PDF. You will see the blank space between columns. So Page 2 remains in the PDF export because it would have had something if the cells weren't hidden.

To me, this is not a bug report, but rather an enhancement request that is asking "update print ranges when cells are hidden for printing".
For the attachment 44751 [details], that would be:
- once the columns are hidden, the print ranges / page breaks display should update to only show one page (columns A to E), and the rest of the columns are greyed out as if they weren't part of the print range.

But I'm not sure this is a desirable change?
Comment 16 stragu 2021-06-16 12:59:00 UTC
(In reply to Timur from comment #13)
> Created attachment 143842 [details]
> Anoher example for incorrect print rage detection
> 
> I add Anoher example for incorrect print rage detection as simple ODS.
> Due to hidden H column with text in H60, print rage detection is incorrect.
> Same is valid for opening XLSX files.

Timur, the issue you described is different as it is about hiding whole columns and rows with the right-click context menu (hidden in LO and in print), not about hiding cells for printing (shown in LO, hidden in print).
It is described in Bug 104502, which was fixed.