Description: When I have a Calc spreadsheet with multiple filled columns (3 columns) without adjustment, if I select one column (column B) and double click between columns header (A and B or C and D) to auto fit column width to content, the column not fit properly. Steps to Reproduce: 1. Create a Calc spreadsheet with 3 filled columns without adjustment to their content; 2. Select one column (column B) and double click between columns header (A and B or C and D) to auto fit column width to content. Actual Results: The column don't auto fit to it content, only selected column fit properly. Expected Results: The column auto fit to it content. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.0.0.2 (x86) Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c Threads da CPU: 8; SO: Windows 10.0 Build 19041; Realizador da interface: Skia/Vulkan; VCL: win Locale: pt-BR (pt_BR); Interface: pt-BR Calc: threaded
*** Bug 139482 has been marked as a duplicate of this bug. ***
NEW per duplicate
Possibly this is the consequence of the *intended* behavior, that selection defines the width. The idea is, that you can select (selection is not equal to focusing!) a cell or a cell range, and the auto-fit feature will consider the cells in the selection, ignoring cells outside. Note that when you select column B, and try to auto-fit column A, there is no cells in A that in the selection -> no cells must be taken into account, hence the width resets to a default. Note also, that the discussed feature is broken since 4.1 (bug 148008). Regardless of the bug 148008, I don't know if the behavior discussed here is bad, or is it actually reasonable and logical in the frame of the feature. IMO, it looks logical: a selection is present, and has no cells to consider for this column -> use a default. OTOH, in the same case, "-> use the widest cell" would be also a viable option... Note that, no matter how this should resolve, the other case, when an *empty* cell in A is selected, A should continue to reset to a default.
*IIF* this is decided to be changed, here's a code pointer: ScColumn::GetOptimalColWidth in sc/source/core/data/column2.cxx When an existing selection doesn't cover the column in question, aMarkedSpans stays empty. The change could be to generalize the '"Select" the entire column if no selection exists' code to all cases when aMarkedSpans is empty after the previous check.
(noting that Mike fixed the bug 148008 regression for 7.5.3+ and 7.6.0+.) Copying UX/Design team to decide if this is working as expected, or if something needs to change. I agree that it is surprising that nothing happens when trying to optimize the column width if a selection outside the resized column is active. In my opinion, this feature should only be active if part of the column being resized are selected.
(In reply to Stéphane Guillou (stragu) from comment #5) > nothing happens when trying to optimize > the column width if a selection outside the resized column is active. (or resets to the default width if its width differs)
I think double-click between the column headers should trigger the optimal width function- and behave the same consequently. In fact you can use the command for multiple selections but not double click, neither the selection nor any other column.
Dear falecomoadilson, 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