Bug 103959

Summary: Merged cell contents do not overflow cell boundaries, but still affect print range calculations
Product: LibreOffice Reporter: tmacalp <tmacalp>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: minor CC: ilmari.lauhakangas, ming.v.hua
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108320    

Description tmacalp 2016-11-16 17:37:59 UTC
Description:
Normally, cells that contain text longer than what the cell boundaries allow will overflow to adjacent cells as long as those adjacent cells are empty (and wrapping is not enabled).  When cells are merged, they no longer are capable of overflowing, but they still extend the print range to the adjacent cells they would have overflowed to.

This has affected a few of my users.  They set up forms with merged cells, but forget to use wrapping.  It leads to all kinds of confusion when they attempt to print their form that appears to be contained in a single page, but extends to multiple pages.

Steps to Reproduce:
1. New spreadsheet
2. View->Page Break (so we can see where pages are breaking)
2. Type a super long line in cell A1 that extends to a second page
3. Note that the A1 cell contents spill over into adjacent columns and extend print range
4. Select cell range A1:B1
5. Format->Merge cells->Merge cells
6. Note that the merged cell now truncate cell contents to the cell boundary (with red triangle indicator), but the print range is still extended

Actual Results:  
The merged cell truncate cell contents to the cell boundary (with red triangle indicator), but the print range is still extended.

Expected Results:
I see no reason why merged cells should truncate contents.  IMO, they should behave like normal cells and overflow their contents to neighboring cells if they're empty.  This would make it obvious that cell wrapping should be enabled.


Reproducible: Always

User Profile Reset: No

Additional Info:
Tested using ancient OpenOffice 3.2.1 and still affects version 5.2.3.3 using Fedora 23.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Buovjaga 2016-11-24 10:40:52 UTC
Repro.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha1+
Build ID: 172325bedf69bbc162f3c1948264451c90c105a3
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-11-21_05:26:40
Locale: fi-FI (fi_FI); Calc: group
Comment 2 QA Administrators 2018-06-04 02:34:13 UTC Comment hidden (obsolete)
Comment 3 Ming Hua 2019-02-11 15:04:27 UTC
I can confirm that I still experience this bug as recent as 6.1.5.

Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 2; OS: Windows 10.0; UI render: default; 
Locale: zh-CN (zh_CN); Calc: group threaded
Comment 4 QA Administrators 2021-05-28 04:50:23 UTC Comment hidden (obsolete)
Comment 5 Timur 2022-08-12 11:52:13 UTC
(In reply to tmacalp from comment #0)
> Actual Results:  
> The merged cell truncate cell contents to the cell boundary (with red
> triangle indicator), but the print range is still extended.

Print range is still extended only with Format->Merge and Unmerge cells->Merge cells (bug that should be resolved here) and not with Merge and Center Cells. 

Both truncate cell contents (may remain as another bug of lower priority, as workaround is to merge more cells). This behavior is the same in MSO. 

Repro 7.5+.