Bug 150244 - TABLES: Command "Distribute columns evenly" affects all rows, not just the selected rows
Summary: TABLES: Command "Distribute columns evenly" affects all rows, not just the se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Management
  Show dependency treegraph
 
Reported: 2022-08-03 07:50 UTC by AccountHasBeenClosed
Modified: 2023-06-21 11:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
example (9.90 KB, application/vnd.oasis.opendocument.text)
2022-08-03 07:51 UTC, AccountHasBeenClosed
Details
a better example for comment 2? (9.86 KB, application/vnd.oasis.opendocument.text)
2022-09-07 05:30 UTC, AccountHasBeenClosed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AccountHasBeenClosed 2022-08-03 07:50:53 UTC
Description:
so is it possible to add distribute only selected cell/row/column evenly/etc? (not sure which one the correct terms)

my english is bad btw.

Steps to Reproduce:
1.open writer, insert 5x5 table, split 1 cell vertically in the middle of any row
2.hold select the 1 row with the splitted cell
3.right-click context menu, distribute column evenly

Actual Results:
not the result that i want to achieve

get

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

Expected Results:
only selected row should be distributed evenly, not the whole table/column

what i want to get is

|----|----|----|----|----|
|---|---|---|---|---|---|<-this is the same size as above and below, only this row is distributed evenly not affecting other
|----|----|----|----|----|
|----|----|----|----|----|
|----|----|----|----|----|


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.7.2 (x86) / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 AccountHasBeenClosed 2022-08-03 07:51:35 UTC
Created attachment 181557 [details]
example
Comment 2 Dieter 2022-08-11 11:10:16 UTC
I confirm it with

Version: 7.3.5.2 (x64) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps:
1.Open writer, insert 5x5 table, split 1 cell vertically in the middle of any row
2.Select the 1 row with the splitted cell
3.Right-click context menu, distribute column evenly OR use button "Optimize Size" in Table toolbar.

Actual result:
Columns in selected row are distributed evenly, but all other rows are effected, too.

Expected result:
According to LO Help other rows shouldn't be affected: https://help.libreoffice.org/7.4/en-US/text/shared/01/05120600.html?&DbPAR=writer&System=WIN

But I'm not sure, if expected result is possible. And'm also not sure, if I would still call the expected result a table.

So perhaps a only a better documentation is needed.

cc: Design-Team
Comment 3 Heiko Tietze 2022-08-11 11:39:13 UTC
IMO a selection should be respected. The "distribute columns evenly" command is different to the table properties dialog where bug 145739 proposes some improvements.

OTOH, the request in bug 128279 indicates that users see the whole table as something which is evenly distributed. If we run a command once it cannot be some kind of flag on the table doing the work automatically when the columns are modified.
Comment 4 Heiko Tietze 2022-08-18 08:23:55 UTC
We discussed the topic in the design meeting and agreed that the action should respect the selection.

The concerns raised in comment 3 in respect to the idea having an automatic redistribution flag on the whole table is irrelevant. The request is questionable itself (running the one-shot action again is cheap) and could be realized additionally as it covers another use case (if the action is execute the flag could be disabled). We should also consider the alt+left/right function that allows easy resizing of columns.
Comment 5 Justin L 2022-08-20 12:43:30 UTC
Distribute columns is a counter-part to minimize and optimize. Both of those use a selection to determine WHICH rows define minimal/optimal for the entire column.

While distribute evenly doesn't need a selection context like this to define "even" for the whole column, making the suggested change would cause it to act very differently from its companion functions.

While I can see the logic in giving selection a functional use in this case, I'm not sure doing so would be worth the effort, inconsistency, and potential disruption of existing work flows. I don't think that split/merged cells should ever drive the use of functions - they already create enough head-aches as it is.
Comment 6 AccountHasBeenClosed 2022-09-07 05:30:59 UTC
Created attachment 182277 [details]
a better example for comment 2?

for "But I'm not sure, if expected result is possible. And'm also not sure, if I would still call the expected result a table"

the earlier example is just what i make quickly just to show how it affected other column?
Comment 7 Justin L 2023-06-21 01:25:39 UTC
The current documentation very accurately says:
Adjusts the width of the selected columns to match the width of the widest column in the selection. The total width of the table cannot exceed the width of the page.

(In reply to Heiko Tietze from comment #4)
> We ... agreed that the action should respect the selection.
It is respected. This is a column function, not a row function. When a single row is selected, that means all the columns are selected, and thus the function evenly distributes all of the columns.

This bug report should be closed as WONTFIX/NOTABUG.
Comment 8 Heiko Tietze 2023-06-21 09:16:49 UTC
(In reply to Justin L from comment #7)
> (In reply to Heiko Tietze from comment #4)
> > We ... agreed that the action should respect the selection.
> It is respected.

Respect the _selection_. Changing it to an enhancement is correct.
Comment 9 Justin L 2023-06-21 11:38:00 UTC
(In reply to Heiko Tietze from comment #8)
> Respect the _selection_. Changing it to an enhancement is correct.
Well then I hope no one ever works on this. As I mentioned in comment 5, the companion commands DEPEND on the action being taken on ALL of the rows, where the selection determines WHICH CONTENT is evaluated to determine minimum/optimal size. Changing "Distribute Columns" to only affect certain rows would make it function inconsistently, so if this happens, please make sure the help explicitly notes the difference in the selection meaning.