Bug 158689 - Calc's double-click on column header boundary always uses the default +2 mm for optimal width, instead of what is defined in Format>Columns>Optimal Width
Summary: Calc's double-click on column header boundary always uses the default +2 mm f...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Cell-Management
  Show dependency treegraph
 
Reported: 2023-12-13 16:23 UTC by David Lynch
Modified: 2024-01-18 18:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Lynch 2023-12-13 16:23:37 UTC
Do the following:
a. File>New>Spreadsheet
b. Select all cells
c. Format>Columns>Optimal Width enter 0 in Add, unselect Default value [OK]
d. Enter 1 in cell A1
e. Select column A, double-click right column separator in column A.
f. Column width changes to .53cm
g. Format>Columns>Optimal Width Add still shows 0, just do [OK]
h. Column width changes to .33cm 

The correct column width value is at step h: the value at step f is that with the default add value of 2mm, rather than the correct value of 0.

Same result in safe mode.

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 1 ady 2023-12-13 23:36:10 UTC
(In reply to David Lynch from comment #0)
> Do the following:
> a. File>New>Spreadsheet
> b. Select all cells
> c. Format>Columns>Optimal Width enter 0 in Add, unselect Default value [OK]
> d. Enter 1 in cell A1
> e. Select column A, double-click right column separator in column A.
> f. Column width changes to .53cm
> g. Format>Columns>Optimal Width Add still shows 0, just do [OK]
> h. Column width changes to .33cm 
> 
> The correct column width value is at step h: the value at step f is that
> with the default add value of 2mm, rather than the correct value of 0.

I don't understand what you mean. The resulting width in step f depends on the content of the selected cells (cell A1 in this case) for step e. So I don't see how the width of the column in step f would result in some specific expected value (which would be incorrect in Calc according to your description in comment 0?)

Additionally, the width also depends on other factors, such as the size of the font and the zoom value.
Comment 2 David Lynch 2023-12-14 07:11:52 UTC
I agree that the width in step f depends on the contents of selected cells. Call this width x. If A1="1", x=.53.
Step g should do nothing, all it does is invoke the Optimal width dialog, change nothing and close the dialog. Yet the column width in step h changes to x-.2cm.
If I enter w in cell A1, x=.59cm, and the width at step h changes to .39cm=x-.2cm.
Comment 3 Stéphane Guillou (stragu) 2023-12-28 16:14:03 UTC
(In reply to David Lynch from comment #0)
> Do the following:
> a. File>New>Spreadsheet
> b. Select all cells
> c. Format>Columns>Optimal Width enter 0 in Add, unselect Default value [OK]
> d. Enter 1 in cell A1
> e. Select column A, double-click right column separator in column A.
> f. Column width changes to .53cm
I get .50 cm
> g. Format>Columns>Optimal Width Add still shows 0, just do [OK]
> h. Column width changes to .33cm 
I get .30 cm.

So I still reproduce as described: double-click on column header boundary results in an optimal width of minimal + 2 mm.

The same happens in OOo 3.3.

It's true the documentation doesn't say the two actions (dialog or double-click boundary) are disconnected: https://help.libreoffice.org/7.6/en-US/text/scalc/01/05040200.html

UX/Design team, is this expected, or should the double-click use the latest "Add" value? In my opinion, it makes sense to make uniform, and allow users to set the Add value to then directly reuse it with the faster double-click method.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 40617d867346956588ac023511f31210107217f4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 4 Heiko Tietze 2024-01-02 13:30:02 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> UX/Design team, is this expected, or should the double-click use the latest
> "Add" value?
No idea, it's rather a question to the developers. Btw, the last value is slightly below 0.3cm since okaying the optimal width dialog enlarges the column.

(In reply to Stéphane Guillou (stragu) from comment #3)
> In my opinion, it makes sense to make uniform...
I struggle with the need to add something to the _optimum_. It makes the whole function hard to understand. But clearly one could expect the double-click method being the same function as the optimal width command.