Bug 128279 - TABLE: Deleting a column from an equi-distributed table should redistribute widths
Summary: TABLE: Deleting a column from an equi-distributed table should redistribute w...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Add-Delete
  Show dependency treegraph
 
Reported: 2019-10-20 17:56 UTC by John
Modified: 2023-05-23 14:38 UTC (History)
3 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 John 2019-10-20 17:56:59 UTC
Description:
1. Create a table with 5 columns and 3 rows.
2. Notice that the columns have the same width.
3. Remove column 3.
4. Notice that columns aren't the same width anymore.

Before:

|------------|------------|------------|------------|

After:

|------------|-------------------|------------------|

Expected:

|----------------|-----------------|----------------|

Steps to Reproduce:
-

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Heiko Tietze 2019-10-21 08:51:38 UTC
Basically I agree with the request. One option is to introduce a new function/command "Distribute evenly". But we should try to keep code base and UI clean. So it could be realized as macro and maybe distributed per third-party extension.

But there is also the option "Adjust columns proportionally" (Table Properties > Columns, disabled for "Automatic" alignment (under the Table tab). So far this checkbox controls only the UI interaction, meaning when checked it shares the width over some columns. This works far from what user expects (see bug 111421 and bug 100537) but could be improved and made persistent. It would remain checked and when columns are deleted the col width gets recalculated. See also bug 41817.
Comment 2 John 2019-10-21 11:42:55 UTC
(In reply to Heiko Tietze from comment #1)

> One option is to introduce a new function/command "Distribute evenly".

The command "Distribute columns evenly" already exists. The only issue is that it doesn't work automatically.

5. Select all table with Ctrl-A.
6. Open its context menu.
7. Select "Size" > "Distribute Columns Evenly".
Comment 3 Heiko Tietze 2019-10-21 11:54:46 UTC
(In reply to John from comment #2)
> The command "Distribute columns evenly" already exists. The only issue is
> that it doesn't work automatically.

Oh yes, forgot this. So it's a bug not an enhancement request (automatically resize after deletion).
Comment 4 Justin L 2020-12-21 10:02:39 UTC
(In reply to Heiko Tietze from comment #3)
> (In reply to John from comment #2)
> > The command "Distribute columns evenly" already exists. The only issue is
> > that it doesn't work automatically.
> 
> Oh yes, forgot this. So it's a bug not an enhancement request (automatically
> resize after deletion).
No - I don't think it is a bug. "Distribute columns evenly" is a command, not a setting. It is an action that the user can take every time he wants to "rebalance" the table.

So you are back to the suggestion about adding an option to keep the table columns balanced. In general, I don't think that is necessary (unless ODF already has a specification that a table should do this). Designing tables is a user task, not a computer task. It is easy enough to re-balance the table once the infrequent "design change" is finished.
Comment 5 Eyal Rozenberg 2021-11-30 21:51:48 UTC
(In reply to Justin L from comment #4)
> So you are back to the suggestion about adding an option to keep the table
> columns balanced. In general, I don't think that is necessary (unless ODF
> already has a specification that a table should do this). Designing tables
> is a user task, not a computer task. It is easy enough to re-balance the
> table once the infrequent "design change" is finished.

Let me try to suggest a "compromise suggestion", which may satisfy both @John's initial expectation and agree with what you (@JustinL) have written.

I believe John was expecting a rebalancing of widths based on that fact that he had not explicitly set the width of any column, nor done anything else to countermand his initial expressed wish of equi-distributed columns. So, one could argue that, for the special case of columns whose last width setting was an equi-distribution, a deletion could be expected to equi-distribute among the remaining columns; but in any other situation, only the two surrounding columns would gain width as is the current behavior.

I'm personally of two minds regarding what I would feel meets my expectations as a user.

Anyway, rephrased the title to better express what John seems to ask for.