Bug 65200 - FORMATTING: Autofit width not behave properly if cell(s) contain text wrapping
Summary: FORMATTING: Autofit width not behave properly if cell(s) contain text wrapping
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other All
: medium minor
Assignee: Not Assigned
Keywords: bibisected, regression
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
Reported: 2013-05-31 06:57 UTC by ign_christian
Modified: 2024-04-09 18:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Sample file to test (6.00 KB, application/xls)
2013-05-31 06:57 UTC, ign_christian

Note You need to log in before you can comment on or make changes to this bug.
Description ign_christian 2013-05-31 06:57:49 UTC
Created attachment 80081 [details]
Sample file to test

After some searching, it looks like I did not find a bug like that would be my report. Please mark this as duplicate if anyone find similar bug reported before. 

Attached file contain 3 columns (A,B,C), each column have same content.
- Column A : "Wrap text automatically" disabled at all cells
- Column B : "Wrap text automatically" enabled at all cells
- Column C : "Wrap text automatically" only at cell C1, else no

Steps to reproduce bug:
1. Open that file & mark all columns A,B,C
2. Autofit width -> double click separator between column C-D
3. See that all columns behave differently 
-> width of columns A,B,C (respectively) : 1.45 cm , 2.66 cm , 0.66 cm

Autofit width behave unexpected if any/all cells contain text wrapping. Column C seems to autofit only considering number. (Test: change cell C2 with 100, then autofit width)

Another weird behavior: fill cell B10 with 1, then autofit width -> column B adjusted again to 0.55 cm

LO (Win7 32bit)
Comment 1 ign_christian 2014-04-13 14:22:15 UTC Comment hidden (obsolete)
Comment 2 Albrecht Müller 2014-09-22 18:40:19 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2015-10-14 19:58:24 UTC Comment hidden (obsolete)
Comment 4 Albrecht Müller 2015-10-15 08:56:13 UTC
Still there in Version:
Build-ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8

Observed the same data as before:
Column width after autofit A: 1.44 cm, B: 2.26 cm, C: 0.69 cm
Column width after B10 = 1 and autofit: A: 1.44 cm, B: 0.57 cm, C: 0.69 cm.
Comment 5 QA Administrators 2016-11-08 11:42:08 UTC Comment hidden (obsolete)
Comment 6 Timur 2017-06-21 17:03:36 UTC
Behavior reproduced from LO 4.0 to master 6.0+. It was as expected from OO to 3.6.
Comment 7 Buovjaga 2018-05-23 17:41:09 UTC
Still repro.

Version: (x64)
Build ID: 8fae8a6cd73b7262c3739bd4acc5c72b54934ff1
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-05-22_22:52:50
Locale: fi-FI (fi_FI); Calc: group
Comment 8 Buovjaga 2018-06-30 12:02:48 UTC
Bibisected with 43all on Linux to range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=2e053cf5ea4d93a2e1845e795a9c7fe1e08c84af...ce90f99a2d66c2b998ad3f9f028e2ea623a757f5

This seems suspicious, has column widths, including Excel: https://cgit.freedesktop.org/libreoffice/core/commit/?id=2792670a53deca5ccd5b0f23faa7f1816684945d

By Kohei, so I will not add to CC.
Comment 9 QA Administrators 2019-07-01 02:46:25 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-07-01 04:05:22 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2023-07-02 03:12:56 UTC Comment hidden (obsolete)
Comment 12 John McComb 2024-04-09 18:43:57 UTC
Tested in LibreOffice Calc The issue still exists.

Version Info:
Version: (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 8; OS: macOS 10.15.7; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded