Bug 151196 - FORMATTING "MM/DD/YYYY HH:MM" won't wrap (wrapping uses pre-formatted data?)
Summary: FORMATTING "MM/DD/YYYY HH:MM" won't wrap (wrapping uses pre-formatted data?)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4 all versions
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2022-09-27 01:05 UTC by Jim Avera
Modified: 2026-01-07 03:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Small demo spreadsheet (8.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-09-27 01:08 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2022-09-27 01:05:10 UTC
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
Comment 1 Jim Avera 2022-09-27 01:08:52 UTC
Created attachment 182692 [details]
Small demo spreadsheet
Comment 2 Eike Rathke (retired, only occasionally showing up) 2022-09-27 10:20:38 UTC
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.
Comment 3 Rafael Lima 2022-09-27 14:22:54 UTC
(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.
Comment 4 Jim Avera 2022-09-27 20:37:47 UTC
@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)
Comment 5 Mudge 2023-07-13 18:17:25 UTC
Thank you for reporting the bug. I can confirm that the bug is present in 7.5.4.2
Comment 6 QA Administrators 2026-01-07 03:11:46 UTC
Dear Jim Avera,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug