Bug 148423 - The width of columns with a long word collapses after opening a TSV
Summary: The width of columns with a long word collapses after opening a TSV
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium trivial
Assignee: Stephan Bergmann
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-04-06 12:26 UTC by fabian
Modified: 2022-04-12 12:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example of complete column collapse with long word content (825 bytes, text/tab-separated-values)
2022-04-06 12:35 UTC, fabian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fabian 2022-04-06 12:26:03 UTC
Description:
After opening a TSV file with a

Steps to Reproduce:
1.Save the following text into a file:

Column 1	Column 2
short	longLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONGlongLONG

2.Open that file with LibreOffice Calc

Actual Results:
The column containing the "column 2" header is so narrow that no content can be seen.

Expected Results:
Have the column width at leas so broad that some content can be read.

I the case of the test file described above, it would be nice to have the column width adjusted to the column header "column 2".


Reproducible: Always


User Profile Reset: No



Additional Info:
MacOS 10.14.6
Comment 1 fabian 2022-04-06 12:35:08 UTC
Created attachment 179355 [details]
example of complete column collapse with long word content
Comment 2 fabian 2022-04-06 12:40:24 UTC
The example in the original post does only partially reproduce the described behaviour because the overflow of the rightmost column is displayed by Calc. To completely reproduce the behaviour with the disappearance of all content the column containing a longLONG word needs to be followed by another column with content. Such an example is created by changing the place of the long string to column 1 and the short string to column 2. This has been done for the example file attached to this issue.
Comment 3 raal 2022-04-07 20:59:39 UTC
bisected with bibisect-linux-64-6.4. This seems to have begun at the below commit.
Adding Cc: to Stephan Bergmann; Could you possibly take a look at this one?
Thanks
 eeca218d2c041dcc593ad9d27a68c3eaf2de018e is the first bad commit
commit eeca218d2c041dcc593ad9d27a68c3eaf2de018e
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Jun 4 12:07:36 2019 +0200

    source de4d296619b978ec303f1d7b1e2c78e13fa7a512

https://git.libreoffice.org/core/+/de4d296619b978ec303f1d7b1e2c78e13fa7a512
Comment 4 Commit Notification 2022-04-08 14:45:36 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/126b1826c465002dccc7c354a584731fa70ec5fd

tdf#148423: Half a hack

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 fabian 2022-04-08 15:06:36 UTC
BTW: Once the document is open, a double-click on the right column header border of the super-narrow column will adjust the column width for the reasonable width. I assume the width appropriate for the content in row 1. I assume there are multiple places in the codebase that automatically calculate column width? Maybe there is something somewhere to reach a complete solution?

Anyway, I will test the daily build next week.
Comment 6 Rafael Lima 2022-04-08 19:18:18 UTC
Tested with the current master and the sample file opened as expected.

Verified with:
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 3bfac2a7fad9737f31443292699bd6fee6ac3a6f
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL
Comment 7 Commit Notification 2022-04-12 09:41:03 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/d4f46f0968c30d525c9a5274c6ffeac2f8358262

tdf#148423: Half a hack

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-04-12 12:50:36 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58e156bc54177d0ed60f50181640f62189f72ac4

tdf#148423: subsequent_filters_test2: Add unittest

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.