Description: If a Calc cell has Alignment set to "wrap", a formatted date with time which contains a space should wrap at the space. But it does not wrap. Instead "###" appears. It is as if the text-wrapping machine works on the cell value before applying formatting, which in this case introduces a space where wrapping can occur. If that is true, then I think wrapping should use the post-formatted value. Steps to Reproduce: (Demo spreadsheet will be attached to this bug) 1. Format a cell with with the Number Format set to a Date form which introduces a space, for example format code MM/DD/YY HH:MM AM/PM (note space between date and time). 2. Set the "Alignment" format to "Wrap" 3. Increase the height of the cell to allow several lines to be visible. 4. Store a value in the cell, for example 9/10/11 12:13:14 4. Adjust the column width to be slightly too narrow for the entire date & time Actual Results: "###" appears in the cell Expected Results: Value should be wrapped, e.g. 09/10/11 12:13:14 Reproducible: Always User Profile Reset: No Additional Info: Version: 6.4.8.0.0+ Build ID: 71a3f015f2ac45ad4a2625a3b6398f5d75feed40 CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3; TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-01_08:33:37 Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded
Created attachment 182692 [details] Small demo spreadsheet
Formatted numeric values are not wrapped. Dates are numeric values. Also note that if dates would be wrapped, wrapping would not only occur on spaces, but also at / and punctuation or even any other character if the cell is too narrow to wrap at spaces, which likely would not be wanted.
(In reply to Eike Rathke from comment #2) > Formatted numeric values are not wrapped. Dates are numeric values. > Also note that if dates would be wrapped, wrapping would not only occur on > spaces, but also at / and punctuation or even any other character if the > cell is too narrow to wrap at spaces, which likely would not be wanted. This is weird though. For instance, when you format the date to be fully written with text as in "Wednesday, May 25, 2022", this text should be able to wrap, but it isn't.
@Eike I see your point. On the other hand "###" is much less helpful to a human reader than wrapping at unexpected places while still showing the data. Perhaps formatted numbers can be wrapped if and only if an "overflow" would otherwise occur (i.e. when no useful information would be displayed)
Thank you for reporting the bug. I can confirm that the bug is present in 7.5.4.2