Bug 100537 - Width and relative checkboxes disabled in Table dialog by default with automatic alignment
Summary: Width and relative checkboxes disabled in Table dialog by default with automa...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
: 111421 (view as bug list)
Depends on:
Blocks: Dialog Writer-Table-Properties-Dialog
  Show dependency treegraph
 
Reported: 2016-06-22 06:26 UTC by Elmar
Modified: 2022-12-18 19:27 UTC (History)
10 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 Elmar 2016-06-22 06:26:01 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build Identifier: LibreOffice 5.2.0.1.0

Cannot set tables to automatically adjust column width automatically

Reproducible: Always

Steps to Reproduce:
1. create table
2. open Table Format dialog
3. Width, Relative; Left; Right greyed out
4. Select Columns tab
5. Adapt table width; Adjust columns proportionally greyed out
Actual Results:  
columns created with fixed width according to text margins

Expected Results:  
want to set to automatically adjust columns based on content

[Information automatically included from LibreOffice]
Locale: en-GB
Module: TextDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes


Reset User Profile?No
Comment 1 Buovjaga 2016-06-26 11:52:43 UTC
If you select some Alignment option in the Table tab, these options become available.

Set to NEEDINFO.
Change back to UNCONFIRMED, if you are not happy with this. Change to RESOLVED INVALID, if you are happy.
Comment 2 Elmar 2016-06-27 05:49:01 UTC
OK. but seems counter-intuitive, especially as there seems to be no other way to do this than via
1. select table
2. click on optimize size icon in table toolbar

Is one of those things that I am likely to forget how it is done and thus have to waste time trying to figure it out again.

better would be if the tick boxes in table properties were enabled all the time.
Comment 3 Buovjaga 2016-06-27 08:26:44 UTC Comment hidden (obsolete)
Comment 4 Heiko Tietze 2016-09-23 09:15:29 UTC
(In reply to Elmar from comment #2)
> better would be if the tick boxes in table properties were enabled all the
> time.

What should happen when you change the cell width having automatic alignment set? Admittedly there is room for improvement, e.g. the dependency between alignment and modification could be clearer, but always active is not a solution. 

I'd say WONTFIX.
Comment 5 Yousuf Philips (jay) (retired) 2016-10-07 17:51:14 UTC
Setting the table alignment to left by default would enable most of these disable checkboxes, so is there a compelling reason why we default to automatic alignment?

@Cor, @Regina, @Stuart: Your thoughts?
Comment 6 Heiko Tietze 2017-01-17 15:36:59 UTC Comment hidden (obsolete)
Comment 7 Yousuf Philips (jay) (retired) 2017-01-19 10:56:09 UTC
(In reply to Heiko Tietze from comment #6)
> No other opinion than WF, closing now.

No one giving their opinion isnt a reason to close, we should poke them again. :D
Comment 8 Heiko Tietze 2017-01-19 12:40:34 UTC
(In reply to Yousuf Philips (jay) from comment #7)
> (In reply to Heiko Tietze from comment #6)
> > No other opinion than WF, closing now.
> 
> No one giving their opinion isnt a reason to close, we should poke them
> again. :D

My argument for WF is in comment 4.
Comment 9 Cor Nouws 2017-01-19 13:47:36 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> Setting the table alignment to left by default would enable most of these
> disable checkboxes, so is there a compelling reason why we default to
> automatic alignment?
> 
> @Cor, @Regina, @Stuart: Your thoughts?

I'm not aware of, and didn't find, a reason why Left alignment by default would not be OK.
Looks as a good thing to me.
Comment 10 Regina Henschel 2017-08-07 01:32:02 UTC
*** Bug 111421 has been marked as a duplicate of this bug. ***
Comment 11 Adalbert Hanßen 2017-08-12 12:04:56 UTC
I tried this (With Libre Office 5.1.6.2. and with Version 6.0.0.0.alpha0+ Build ID: e0bafa78e3ad0df397d78cd65ad19bd5b07dc5f2 under Linux):

Open LO Writer.

Make a table with 21 columns.

Go to the table properties dialogue in the tab "columns" and enlarge the width of the first two columns to something larger than 3 cm. "Remaining space" was 0 before and remains 0 after this step.

Some of the adjacent columns to the right shrink to almost zero by this (they shrink to 0,04 cm.  Those to the right of the shrinkage area remain unchanged). This is my test case.

I left the table properties dialogue clicking the OK button.

I marked the table again and then is inquired its properties dialogue to enter the tab "Table". As proposed, I switched Alignment from Automatic to Left. I left the check-mark "relative" unchecked.

Then I went to the columns tab. Yes, the first two options "Adapt table width" (German: "Tabellenbreite anpassen") and "Adjust columns proportionally" (German: "Spalten gleichmäßig ändern") are no longer greyed out. If I check the second one, the first one automatically gets checked too. 

But nothing happens to the displayed column widths, nor does anything happen to the table and its columns. Even after I have left the dialogue (OK button), nothing happens to the table. The columns do not become distributed equally!

I repeated the trial with Alignment Center in the Table tab rather than Left. Same result!

Please fix this bug. 

===

BTW: From a logical standpoint, the question of alignment of the whole table has nothing to do with the distribution of columns in it. All questions on the alignment in the Table tab refer to the right and the left boundary of the whole table. The distribution of columns within that range is an independent issue. Therefore the overall structure of the table properties dialogue is logical. However, the restriction is not logical at all to disable "Adjust columns proportionally" in the Columns tab when Automatic alignment in the Table tab is selected for the whole table. 

The best thing for the user would be to make the dialogue also available for a selection of adjacent columns. If it is invoked for less than the whole table, one should then disable the „Table tab“, but the tab Columns should still be accessible. This would offer to the user the option to proportionally distribute the column width between the left and the right boundary of the selected columns or enter widths values for the selected columns, such that the widths of the not selected columns remain unaltered in this dialogue. 

Apparently at the moment, setting a column width triggers adaptation of columns to the right, if the maximum size would be exceeded. This is apparently done by shrinking as many columns down to 0,04cm such that the total table width would not exceed its maximum. 

If you accidentally enter a too large number, the whole table to the right gets messed up! In order to repair it, you have to manually enter all column widths, since „Adjust columns proportionally“ is currently not available.

If the width of the whole table (or the width of the selected columns) exceeds its maximum, I would prefer to first leave it that way and indicate a negative margin (possibly in red) in the field „Remaining Space“ and also I would indicate the widths of the columns to the right which hit the right boundary (of the selection or of the whole table) or go beyond it in red. The user might want to correct his chosen column widths accordingly. Only when he clicks on „ok“, a valid choice must be coerced (like it is done currently, but too early in the decision process). 

If some columns shrink to almost zero then, the user may select them together with some adjacent ones and re-enter my amended dialogue to select „Adjust columns proportionally“ to the selected columns, leaving all other columns unchanged.

I further propose to show the widths of the unchangeable (because not selected) columns in the dialogue as greyed out and I would restrict the column selectors such that they confine the user to display at most one greyed out column at the left and at most one at the right of his selection. One might change the headline to "Widths of selected columns" if the dialogue is invoked for less than the whole table and leave it as "Widths of columns" (or whatever the English version displays).
Comment 12 Telesto 2018-01-03 11:47:40 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> Setting the table alignment to left by default would enable most of these
> disable checkboxes, so is there a compelling reason why we default to
> automatic alignment?
> 

Yes automatic has some dynamic (relative) resizing feature (not working perfectly, though: bug 107665)
1. Insert a 2x2 table in writer (table 1)
2. Embed a 2x2 table into a table cell (table 2)
3. Move the inner table border of table 1. The size of table 2 will adapt. The table size will be absolute when setting it to the left.
Comment 13 Justin L 2020-12-11 19:00:29 UTC
The big question in my mind is WHY would automatic positioning prevent adjusting width, relativity, or proportional column adjustment?

The answer looks pretty simple. Automatic means relative size always = 100%, right? So then it also doesn't make sense to talk about shrinking or growing all columns. They can't shrink or grow if they must always maintain 100% table size.

The benefit of automatic comes when changing page size etc - the table will automatically increase/decrease to match the new page size. So in a sense it is synonymous with relative == 100%, but probably there is also more to it than that.

In any case, this seems to be a good enough reason NOT to make "Left" alignment be the default - unless relative 100% is also forced by default. (RTL people I am sure would not be happy with a default of Left as well.)

In terms of blocking the checkbox for adjusting column width proportionally, the code exists this way (without any documented reason) since initial import.
    m_bModifyTable = true;
    if (m_pTableData->GetWidthPercent() ||
                text::HoriOrientation::FULL == nTableAlign ||
                        m_pTableData->IsLineSelected()  )
        m_bModifyTable = false;

"Percentage" based columns can not be proportionally adjusted for the same reason as "Automatic". IsLineSelected suggests possibly multiple rows have been selected, and that should also prevent self-adjusting columns (since merged cells might mean different number of columns for different rows).