Bug 127027 - When importing CSV with multiline text, column width is the sum of all lines instead of the longest line
Summary: When importing CSV with multiline text, column width is the sum of all lines ...
Status: RESOLVED DUPLICATE of bug 59820
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-19 13:09 UTC by xtrajoris
Modified: 2020-04-19 14:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
screenshot (138.43 KB, image/png)
2019-09-03 17:43 UTC, xtrajoris
Details
example file exhibiting the bug (238 bytes, text/plain)
2020-04-18 17:47 UTC, xtrajoris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xtrajoris 2019-08-19 13:09:35 UTC
Description:
I have a collection (CSV file) of very long strings containing newline characters to improve readability (not my choice - the API forces me to).
When opening the CSV with LibreOffice Calc, the vertical size of the cells containing the 'array strings' is correct (shows multiple lines), but the horizontal cell size seems to be determined by the character count of the longest string, disregarding newline characters. As a result, the column is much broader than needs to be for this kind of content. It should only be as broad as the longest line (which ends on a newline character).

Note: I don't know the earliest affected version, but it's been this way for as long as I can remember. At least 2 years?

Steps to Reproduce:
1.create long strings that contain newline characters
2.save to csv
3.open again with Calc

Actual Results:
column with long strings is very broad

Expected Results:
column with long strings should be as broad as the longest line (which ends on a newline character)


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 xtrajoris 2019-09-03 17:43:56 UTC
Created attachment 153847 [details]
screenshot
Comment 2 xtrajoris 2019-09-03 17:46:06 UTC
Apologies, it seems that there are NO newline characters present in the string. This means this bug considers text wrapping and is not based on the presence of newline characters.
This implies the problem is more general that previously thought.
I also added a screenshot.
Comment 3 xtrajoris 2019-09-03 17:47:15 UTC
Comment on attachment 153847 [details]
screenshot

the bottom few entries of column agg_sc exhibit text wrapping (as desired) but the column width is not adapted to the wrapped text.
Comment 4 Buovjaga 2020-04-18 15:03:08 UTC
Please attach an example document.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 5 xtrajoris 2020-04-18 17:47:15 UTC
Created attachment 159687 [details]
example file exhibiting the bug

csv file.
the value in column 'agg_sc' exhibits the erroneous behaviour described in the original report.
Comment 6 QA Administrators 2020-04-19 03:37:58 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2020-04-19 14:45:28 UTC
Thanks, now I understand it and I found an older report.

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