Bug 164780 - Calc: If the whole row is (incorrectly) merged, it would cause PDF export stuck
Summary: Calc: If the whole row is (incorrectly) merged, it would cause PDF export stuck
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: cancel-long-operations
  Show dependency treegraph
 
Reported: 2025-01-21 02:22 UTC by Franklin Weng
Modified: 2025-01-23 12:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test with Excel, add border line (10.15 KB, application/pdf)
2025-01-22 06:53 UTC, Franklin Weng
Details
PDF generated by LibreOffice, with border (8.36 MB, application/pdf)
2025-01-22 06:55 UTC, Franklin Weng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franklin Weng 2025-01-21 02:22:32 UTC
Description:
In Calc, if the whole row is merged into a single cell, it would cause PDF export stuck there. 


Steps to Reproduce:
1. Start a new file in Calc
2. Input anything in a cell, like, in A4
3. Select the whole Row 4, right-click on the cell and select Merge Cells
4. Don't need to save, just directly export PDF


Actual Results:
It is stuck there forever.

Expected Results:
It should be able to produce PDF file.  Or at least give a warning since merging the whole row doesn't really make sense.


Reproducible: Always


User Profile Reset: No

Additional Info:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9e3803ae438ddcf91ec0e15431be379561d28ba6
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: zh-TW (zh_TW.UTF-8); UI: en-US
Calc: threaded
Comment 1 Franklin Weng 2025-01-21 02:58:52 UTC
Correct the result.  It doesn't stick there forever, but take a very, very long time to produce a more than 200 pages of PDF file.  Maybe it is about judging or calculating what's to print.
Comment 2 BogdanB 2025-01-21 05:55:39 UTC
I don't consider it to be a bug. LibreOffice generated 2341 pages in 10 seconds in one PDF file. Is reasonable.

Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 3 Franklin Weng 2025-01-21 06:01:55 UTC
(In reply to BogdanB from comment #2)
> I don't consider it to be a bug. LibreOffice generated 2341 pages in 10
> seconds in one PDF file. Is reasonable.
> 
> Version: 25.2.0.1 (X86_64) / LibreOffice Community
> Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
> CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
> Locale: ro-RO (ro_RO.UTF-8); UI: en-US
> Calc: threaded

Not in every system I think.  It took nearly half an hour here in my laptop to generate 265 pages PDF.  
Also, it's not "reasonable" to generate a 2341 pages PDF file while most is caused by unused merged cells.  It may not be a "bug", more like an UX issue.
Comment 4 Franklin Weng 2025-01-21 06:04:46 UTC
BTW, Excel would just generate one page PDF with its data in it.

We got a user reporting this issue to us. The original file which caused this issue seems to be converted from xls(x) file, which there is a "whole-row merged" row in it. It must not cause any problem while using Excel, but after converting it to ODS file this issue is shown.  So I think it's more like a user experience issue.
Comment 5 Franklin Weng 2025-01-22 06:53:32 UTC
Created attachment 198670 [details]
Test with Excel, add border line

You can see it has only one page with data in it, and the border line is incomplete.
Comment 6 Franklin Weng 2025-01-22 06:55:02 UTC
Created attachment 198671 [details]
PDF generated by LibreOffice, with border

It created a 2341 page PDF file, every page has the border line.  It's not wrong, but does it make sense?
Comment 7 Franklin Weng 2025-01-22 06:57:51 UTC
(In reply to Franklin Weng from comment #6)
> Created attachment 198671 [details]
> PDF generated by LibreOffice, with border
> 
> It created a 2341 page PDF file, every page has the border line.  It's not
> wrong, but does it make sense?

BTW this page took 5 hours and 50 minutes to complete generating in my laptop.
Comment 8 m_a_riosv 2025-01-22 22:28:05 UTC
Please attach a sample file(s).
Comment 9 BogdanB 2025-01-23 04:44:05 UTC
It is working in any new Calc file.
Comment 10 Heiko Tietze 2025-01-23 12:42:32 UTC
(In reply to Franklin Weng from comment #4)
> BTW, Excel would just generate one page PDF with its data in it.
Confirming, probably they ignore the cell width in some cases. 

Similar issue in bug 49701, bug 150239, bug 158604 (and others) where I commented that lengthy operations should have a feedback.
Comment 11 Heiko Tietze 2025-01-23 12:45:02 UTC
Besides the long-lasting operation on slow systems (here it takes just a two or three seconds), it is a question whether a merged row or column should result in this oversized data. Perhaps MSO does it inconsistently => needsDevAdvice