Bug 156932 - FORMATTING Font size issues when editing a cell
Summary: FORMATTING Font size issues when editing a cell
Status: RESOLVED DUPLICATE of bug 156209
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-26 13:54 UTC by Luc
Modified: 2023-08-27 10:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Animated PNG video showcasing the problem (1.73 MB, image/apng)
2023-08-26 13:54 UTC, Luc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luc 2023-08-26 13:54:22 UTC
Created attachment 189165 [details]
Animated PNG video showcasing the problem

Issue description
-----------------

When editing a cell, the font size value is changed automatically to a bigger value. For multiple lines of texts in a cell, the font is rendered much smaller than its actual size when the cell is in edit mode and rendered correctly if the cell is not in edit mode. If the file is saved and opened again, the cells with multiple lines of texts are rendered smaller than their actual font size and when entering edit mode they are rendered even smaller (barely visible).

For actual behavior please check the attached file (an animated PNG showcasing the problem - please watch it until the end where the file is saved and opened again).

How to reproduce
----------------

1. Create a new Calc document
2. Notice the default font size: (e.g. 10 pt)
3. Double-click a cell to enter edit mode - notice the font size changed (e.g. 17.6 pt)
4. Write a line of text in the cell and before committing the content notice the wrong font size (e.g. 17.6 pt)
5. Commit the content of the cell and notice the font size for the cell while not in edit mode is correct (e.g. 10 pt)
6. Enter in edit mode again in the same cell, notice the wrong font size again (e.g. 17. 6 pt)

7. Double-click another cell to enter edit mode - notice the font size changed (e.g. 17.6 pt)
8. Write a line of text in the cell, do not commit the content yet
9. Press Ctrl+Enter to start a second line of text in the cell, do not commit the content yet
10. Select first line of text with the mouse and set the font size to 10 pt - notice how the text is rendered at much smaller size (not 10 pt)
11. Select the second line of text with the mouse and set the font size to 8 pt - notice how the text is rendered at much smaller size (not 8 pt)
12. Commit the cell (via pressing Enter key or clicking another cell etc.) and notice the font size for the cell while not in edit mode is correct (10 pt for the first text line and 8 pt for the second text line)
13. Save and close the document
14. Open the document again
15. Without entering cell edit mode notice the following:
15.1. The cell with a single line of text is rendered correctly at 10 pt
15.2. The cell with two lines of text is rendered incorrectly (much smaller than 10 pt and 8pt)
16. Double-click the cell with two lines of text to enter edit mode and notice the following:
16.1. The text for both lines are rendered even smaller now (barely visible)
16.2. Click the first text line and notice the font size is displayed as 5.7 pt instead of the correct value of 10 pt 
16.2. Click the second line of text and notice the font size is displayed as 4.5 pt instead of the correct value of 8 pt

All steps mentioned above are visible in the attached animated PNG file.


Additional context
------------------

The described issue is not present in version 7.5.x or older.

This bug completely breaks the formatting of the Calc document for cells with multiple lines of text.
Comment 1 ady 2023-08-26 16:59:39 UTC
I believe this will be solved as of LO 7.6.1, if this report happens to be a duplicate of bug 156209.
Comment 2 Luc 2023-08-27 08:12:08 UTC
(In reply to ady from comment #1)
> I believe this will be solved as of LO 7.6.1, if this report happens to be a
> duplicate of bug 156209.

Thank you @ady,

while bug 156209 mentions copy / pasting, this bug manifests itself without the need of a copy / paste operation (please see the attached APNG) and from this point of view "it looks as a different bug", but I confirm that after recompiling libreoffice from 7.6.0.3 source + only the patch you mentioned (https://gerrit.libreoffice.org/c/core/+/155560), the problem was solved.

I think this bug (or the other one) should be closed as a duplicate.

Either way, I can happily use Calc again and continue my work, so many thanks again.
Comment 3 Buovjaga 2023-08-27 10:33:31 UTC

*** This bug has been marked as a duplicate of bug 156209 ***