Bug 155801 - Fit to content should fit to longest text length not shortest
Summary: Fit to content should fit to longest text length not shortest
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-12 21:29 UTC by AvidSeeker
Modified: 2023-07-10 03:14 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Fit to content on Google Sheets works as expected (71.27 KB, image/jpeg)
2023-06-12 21:30 UTC, AvidSeeker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AvidSeeker 2023-06-12 21:29:49 UTC
Description:
Double clicking a vertical cell acts as "fit to content" button. When doing that, LO Calc fits the cell to the shortest content instead of longest.

Steps to Reproduce:
1. Create header with short text. E.g: title
2. Add a cell in the column of the header that have longer text.
3. Double click the cell header to "fit cell to its content"

Actual Results:
Cell is resized to the header length

Expected Results:
Cell should be resized to longest content length


Reproducible: Always


User Profile Reset: No

Additional Info:
See the attachments for how the expected output should be: https://i.imgur.com/1gy1XM2.jpg
Comment 1 AvidSeeker 2023-06-12 21:30:27 UTC
Created attachment 187876 [details]
Fit to content on Google Sheets works as expected
Comment 2 danomois 2023-07-09 18:03:39 UTC
Hi AvidSeeker:

Marking not a bug because the double click vertical cell 'fit to content' feature works correctly.

The situation you identified occurs when double clicking a vertical cell when some cells in a column have wrap text enabled and some do not.

The 'fit to content' feature fits to the longest cell without wrap text enabled.

You will notice in your Google sheets snip you do not have wrap text enabled for any cells.

Whereas in your Libre Office Calc snip you have wrap text enabled for the cells with longer strings of text.

To achieve the desired outcome, disable wrap text for the entire column and use the 'fit to content' feature.

Thank you!