Description: Cells that have been created with the functions TEXT & TEXTJOIN are not correctly assessed when column > optimal width is invoked from the context menu. The assessment is affected by the contents of "informal header" cells. Attached sheet with highlighted cells demonstrates the effect. Steps to Reproduce: Note Word Wrap is active for the entire sheet as is Centred Text Utilising the attached sheet select columns to include D 1. Right click the header and select optimal width 2. Observe how the column shrinks to facilitate the single character in D2 3. Undo the action 4. Delete "D" from D2 5. Redo 1 6. Observe how the column expands to over-compensate for the cell content 7. Undo 8. Enter text into D2 that is "almost" as lengthy as the contents of D3:D4 9. Redo 1 Columns y & Z demonstrate the same anomaly whereas AF seems to be on its own planet as it shrinks the column to the contents of AF3:AF4 leaving AF2 in an overflow condition 10. Undo II. Change Global Alignment to Left Justified 12. Select columns B:G 13. Redo 1 14. Observe Note that Column A is a simple assignment of Column D and is processed correctly Observation: Wordwrap has the same effect as Left Justified Actual Results: Inconsistent and incorrect column width adjustment Expected Results: Consistency would be good - accuracy aven better Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Version: 7.2.2.2 (x64) / LibreOffice Community Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56 CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: sv-SE (en_GB); UI: en-GB Calc: threaded
Created attachment 176534 [details] Example
It seems that word wrap is all that's needed to show this problem. 1 In New sheet,enter "X" in a cell 3 Optimal width (or double click the right border in the column header) 4 Cell shrinks down to correct width 5 Activate word wrap for that cell 6 Optimal width 7 Cell expands
(In reply to geoff183 from comment #2) > It seems that word wrap is all that's needed to show this problem. > 1 In New sheet,enter "X" in a cell > 3 Optimal width (or double click the right border in the column header) > 4 Cell shrinks down to correct width > 5 Activate word wrap for that cell > 6 Optimal width > 7 Cell expands Already in 6.3 and 3.5 Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: d33dbd8d3bee4dfd614ae0153ebca3db3948e9f8 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 30 January 2023
*** Bug 155172 has been marked as a duplicate of this bug. ***
Was also in OOo 3.3, so marking as inherited. Very much related to bug 57150, likely a duplicate.