Bug 143917

Summary: Row's "optimal height" does not adapt when entering text with fonts needing extra vertical space (Thai, Javanese, Arabic, Japanese...) (steps in comment 6)
Product: LibreOffice Reporter: Nukool Chompuparn <nukool>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: stephane.guillou, yosi3260+libre
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=121227
https://bugs.documentfoundation.org/show_bug.cgi?id=152024
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108364    
Attachments: Cell Style : Default
Enter Thai text into cell A1, the row height doesn't change.
Double click on the bottom line of row name to make cell's height A1 or cell A2 fit
Thai fonts

Description Nukool Chompuparn 2021-08-17 10:55:47 UTC
Description:
After entering a text of Thai language into a cell, the cell needs higher row height but Calc doesn't increase cell's height to fit the Thai fonts.

Steps to Reproduce:
1. Create a blank Calc file | Press F11 key | Right click on menu 'Default' of tab 'Styles' | Select 'Modify'
2. Select tab 'Font' on box 'Cell Style:Default'
3. Select Garuda/Regular/10 pt/ English(USA) > on 'Western Text Font'
3. Select Garuda/Regular/10 pt/ Thai > on 'CTL Font'
4. Click 'OK' button | Press F11 key 
5. Click menu 'File' | Select submenu 'Template' | Select submenu 'Save As Template'
6. Enter 'GarudaEnglish10ptGarudaThai10pt' on Template Name box
7. Select 'My Template' for Template Category
8. Tick on 'Set as default template'
9. Click 'OK' button
10. Close such blank Calc file
11. Create a blank Calc file
12. Enter text with Thai font into cell A1 & A2


Actual Results:
Thai font needs higher row, but Calc doesn't increase automatically.

Expected Results:
Calc must increase row height automatically to fit Thai fonts.


Reproducible: Always


User Profile Reset: No



Additional Info:
In order to make row height fit with Thai font text, double click on the bottom line of row name header is needed. Please see attached images.
Comment 1 Nukool Chompuparn 2021-08-17 10:57:32 UTC
Created attachment 174346 [details]
Cell Style : Default
Comment 2 Nukool Chompuparn 2021-08-17 11:00:10 UTC
Created attachment 174347 [details]
Enter Thai text into cell A1, the row height doesn't change.
Comment 3 Nukool Chompuparn 2021-08-17 11:02:29 UTC
Created attachment 174348 [details]
Double click on the bottom line of row name to make cell's height A1 or cell A2 fit

In order to make row height fit with Thai font text, double click on the bottom line of row name header is needed.
Comment 4 Nukool Chompuparn 2021-08-17 11:05:39 UTC
LibreOffice Community | Version Information :
Version: 7.1.5.2
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Nukool Chompuparn 2021-08-17 11:09:37 UTC
Created attachment 174349 [details]
Thai fonts
Comment 6 Stéphane Guillou (stragu) 2023-11-17 12:09:11 UTC
This issue can be reproduced with simpler steps:
1. Open Calc
2. Change A1 font to e.g. Noto Sans Javanese
3. Write "test" in the cell, press Enter

Result: about half the text is hidden. Row height does not adapt to show all the text.
Changing vertical alignment to "top" will make it overflow at the bottom of the cell, as shown in bug 148316's attachment 179817 [details]
Entering an extra line of text in the cell does adapt the row height somewhat suitably.

Behaviour is inherited, but make sure to test with a word that does not trigger the spellcheck underline, as in my tests this _would_ trigger an increase on row height between OOo 3.3 and LO 4.1.6.2.

Reproduced in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5fe2bf914c251009ec4709fa8fdc45c3b53f676b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 7 Stéphane Guillou (stragu) 2023-11-17 12:11:58 UTC
*** Bug 148316 has been marked as a duplicate of this bug. ***
Comment 8 Tom Haws 2024-02-22 16:05:09 UTC
I think this bug is broader than as described. See [this question](https://ask.libreoffice.org/t/adjust-row-height-to-row-cells-wrapped-content-height/59592) that has various duplicates, but no solution. Row heights do not reliably automatically adjust to wrapped plain text content edits even for the simplest default fonts.

To reproduce in v24.2.0.3 (and versions going back forever):

1. In a new spreadsheet, add text on multiple columns of the same row.

2. Edit the text on multiple columns to increase their number of lines to various lengths. Row height responsively increases repeatedly.

3. Edit the text on the longer cells to decrease their number of lines.

4. Row height does not responsively decrease. You must double-click between the row number and the row+1 number to adjust the row height to fit.
Comment 9 Tom Haws 2024-02-22 16:07:21 UTC
Clarification:

Use words and spaces only (no manual line breaks) to vary cell content lengths in reproducing this bug.