Bug 84195 - UI: Inconsistent behaviour "Wrap text automatically" and "Shrink to fit cell size"
Summary: UI: Inconsistent behaviour "Wrap text automatically" and "Shrink to fit cell ...
Status: RESOLVED NOTABUG
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:
Depends on:
Blocks: Cell-Format-Dialog
  Show dependency treegraph
 
Reported: 2014-09-22 18:57 UTC by Albrecht Müller
Modified: 2017-06-21 18:27 UTC (History)
5 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 Albrecht Müller 2014-09-22 18:57:54 UTC
The dialogue that allows to format cells shows inconsistent behaviour when handling the options "Wrap text automatically" and "Shrink to fit cell size".

How to reproduce: Open Calc, select some cell. Open the "Format Cells" dialog (select Format -> Cells... or press CTRL+1). Select the "Alignment" tab. Below the "Properties" header you will find two check boxes labeled "Wrap text automatically" and "Shrink to fit cell size". If the cell is not formatted, both are unchecked, and both are active. Check "Wrap text automatically". This disables the "Shrink to fit cell size" check box. Therefore you cannot change it. Uncheck "Wrap text automatically". "Shrink to fit cell size" is now enabled again. Check it. Wrap text automatically" remains enabled, so you can now check it. Now both controls are checked.

It is not clear what the intended behaviour of this mechanism is: Are "Wrap text automatically" and "Shrink to fit cell size" mutually exclusive? I saw some cases where the text uses some smaller font when "Shrink to fit cell size" is enabled but the text still gets truncated (see bug 84012). When a smaller font is used more lines may fit into a cell. This effect could be used to show the complete content. So the combination of "Wrap text automatically" and "Shrink to fit cell size" could make sense too. On the other hand, when both controls are checked, the text does not use a smaller font, so the state of the "Shink to fit cell size" control seems to be ignored.

The expected behaviour should convey clearly what the intended behaviour is. If both features are mutually exclusive then the interface should make sure that at most one control is checked. If Calc supports a combination of both features then there is no need to disable one of the check boxes. This is what I would consider the better solution.

Observed with Version 4.2.6.3 on Windows 7 (64 Bit)
Comment 1 raal 2014-09-27 07:59:02 UTC
Reproducible with Version: 4.3.3.0.0+ Linux
Comment 2 QA Administrators 2015-10-14 19:58:11 UTC Comment hidden (obsolete)
Comment 3 Albrecht Müller 2015-10-15 08:40:57 UTC
Problem is still there with version Version: 4.4.4.3
Build-ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8

BTW: In the German version the text "Shrink to fit cell size" appears as "An Zellgröße anpassen". This translation has a somewhat different meaning. The English version states that the cell size will be reduced, the German version includes both reduction and enlargement of cell size. I don't know which version describes the actual behaviour.
Comment 4 QA Administrators 2016-11-08 11:38:52 UTC Comment hidden (obsolete)
Comment 5 Timur 2017-06-21 16:53:53 UTC
This behavior is inherited from OO and is still the same in master LO 6.0+.

It looks logical: "Wrap text" and "Shrink to fit" are separate options, but if "Wrap text" is used then "Shrink to fit" is not available, only last state is remembered. 
You say "the interface should make sure that at most one control is checked" but how exactly? Do you have a mockup? It's not radio and this way is OK. And I find keeping that last state useful.

I cannot conceive a practical implementation of "the combination could make sense too". If wrap is on, how will LO know what size of shrinked text you want?

What could be improved, although it's self-explanatory on usage, is to amend documentation at https://help.libreoffice.org/index.php?title=Common/Alignment_1 to say in "Shrink to fit cell size" also: 
"You cannot apply this command to a cell that has text wrapped".

When this bug was confirmed, it was more reproduced then analyzed and questioned. 
So, I'll close as NotABug and cc people who may object here.
Comment 6 Yousuf Philips (jay) (retired) 2017-06-21 18:27:22 UTC
Yes wrap simply disables/overwrites the effect of shrink when it is enabled, but retains the check/uncheck setting of shrink for when wrap is disabled. This makes sense and is also how Excel functions.