Bug 131944 - FORMATTING Wrap text automatically not working when value inserted using vlookup() function
Summary: FORMATTING Wrap text automatically not working when value inserted using vloo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap Function-Vlookup
  Show dependency treegraph
 
Reported: 2020-04-06 22:45 UTC by Óvári
Modified: 2024-08-17 03:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Wrap text automatically not working when value inserted using vlookup() function (9.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-06 22:46 UTC, Óvári
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2020-04-06 22:45:51 UTC
Description:
FORMATTING Wrap text automatically not working when value inserted using vlookup() function

Steps to Reproduce:
For cells B6 and E2, Format Cells, Alignment have:
* Horizontal: Left
* Vertical: Top
* Wrap text automatically: Enabled 

In cell A6, change the values between: 0, 1 and 2.

It is understood that the B6 and E2 cell sizes should change when more or less space in required.

Are you able to reproduce and fix?

Thank you

Actual Results:
Cell sizes don't change to fix the data.

Expected Results:
Cell sizes should change (expand or reduce) to fill the data


Reproducible: Always


User Profile Reset: No



Additional Info:
Attachment will be added in the next entry as unfortunately there is no option to add it now.

LibreOffice
Version: 6.4.2.2
Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
CPU threads: 2; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Calc: threaded

Linux Mint 19.3 Cinnamon 64-bit
Comment 1 Óvári 2020-04-06 22:46:36 UTC
Created attachment 159373 [details]
Wrap text automatically not working when value inserted using vlookup() function
Comment 2 raal 2020-04-07 05:30:02 UTC
Confirm with Version: 7.0.0.0.alpha0+
Build ID: aa191f35978ea48bbacc0e613ae8f0e6536ebcfc
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
and 
Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Óvári 2020-04-07 08:24:51 UTC
Please enable this to work correctly when "Protect Sheet..." has also been enable. Thank you
Comment 4 QA Administrators 2022-08-14 04:11:22 UTC Comment hidden (obsolete)
Comment 5 Óvári 2022-08-14 06:52:29 UTC
(In reply to QA Administrators from comment #4)

Present with

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded
Comment 6 QA Administrators 2024-08-14 03:14:06 UTC Comment hidden (obsolete)
Comment 7 Óvári 2024-08-14 20:14:24 UTC
(In reply to QA Administrators from comment #6)
> If the bug is present, please leave a comment that includes the information
> from Help - About LibreOffice.
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 12; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 8 ady 2024-08-15 10:07:19 UTC
(In reply to Óvári from comment #0)

> Expected Results:
> Cell sizes should change (expand or reduce) to fill the data

Is that expectation realistic? Based on what? Is there any case in which Calc automatically and dynamically modifies the size of a cell according to its content?
Comment 9 Óvári 2024-08-16 23:59:29 UTC
(In reply to ady from comment #8)
> (In reply to Óvári from comment #0)
> 
> > Expected Results:
> > Cell sizes should change (expand or reduce) to fill the data
> 
> Is that expectation realistic? Based on what? Is there any case in which
> Calc automatically and dynamically modifies the size of a cell according to
> its content?
1. It was understood that there are spreadsheet programs that already this issue.

2. LibreOffice Calc automatically and dynamically changes the value in a cell which has a formula based on another cell.

3. There are spreadsheet programs that support dynamics arrays and dynamic charts which automatically and dynamically modify ranges.
Comment 10 ady 2024-08-17 03:58:40 UTC
ATM, in Calc, the size of the cell is expanded when the cell has the Wrap Text attribute and you (directly) introduce some text. At that instant, the size of the cell can be expanded.

Continuing from that status (i.e. "size of the cell expanded, according to some rather long text within it"), changing the content of the cell in order to have a text that is shorter than the prior one, will not automatically shrink the cell's size. You will have to resize it (manually, for example to the new "optimal" size) after the new (shorter) text is introduced.

Calc ATM does not automatically change the size of the cell according to the (text) result of a formula. I don't recall this was ever the case (but I will be happy to be misremembering).

IMO, in comment 2 the confirmation of the behavior is rather partial. IOW, the confirmation is about the behavior, but not about the existence of a bug.

So, again I ask... Is there any Help Content, or documentation, or Guide, or some tutorial, or some other case **in Calc** that would suggest that this was already the expected behavior? Could you provide a link to such Help Content (or similar)?

From your comment 9, my impression is that this is not a bug report, but rather a request for enhancement. In other words, you seem to be expecting a certain behavior, but there is no indication or some base to suggest that Calc was already supposed to behave in that way.

Moreover, while I can understand the desire for the described behavior under certain conditions, I am sure that such change would be also disruptive and unwanted for some other cases. A user might not want to have the size of cells constantly changing depending on the varying results of formulas. Forcing such change for every cell that has the Wrap Text attribute without any other condition might not be welcome by many users with valid use-cases. Some other/additional attribute would have to be set in order to trigger the described (requested) behavior. Perhaps something related to automatically recalculating the "Optimal height"? (I have not tried it myself.)

As a side note, there are alternatives to the request, although the result is not exactly the same.

One possibility is to have the initial size of the cell to be the biggest possible (according to the longest possible text). Every shorter text will be entirely contained within the cell.

Another alternative is to set the alignment to "Shrink to fit cell size" (whichever the initial size of the cell would be).