Bug 149777 - In RTL UI, cell contents overflow collapsed formula bar because of increased line height
Summary: In RTL UI, cell contents overflow collapsed formula bar because of increased ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression, topicUI
: 143440 158021 (view as bug list)
Depends on:
Blocks: Calc-Formula-Bar RTL-UI
  Show dependency treegraph
 
Reported: 2022-06-29 19:34 UTC by haim.shaposhnik
Modified: 2024-02-03 15:37 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
enter a cell after selecting an empty one. the formula is not displayed (35.20 KB, image/png)
2022-06-29 19:34 UTC, haim.shaposhnik
Details
A sample file (7.57 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-07-01 12:50 UTC, haim.shaposhnik
Details
Screen Captures (137.28 KB, application/pdf)
2022-07-01 12:51 UTC, haim.shaposhnik
Details
Screenshot comparing RTL 6.0, RTL 24.2 and LTR 24.2 (73.38 KB, image/png)
2023-11-30 13:07 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description haim.shaposhnik 2022-06-29 19:34:04 UTC
Created attachment 181018 [details]
enter a cell after selecting an empty one. the formula is not displayed

Calc bug in the formula field - contents is sometimes hidden,
appears in the second line when exteded

Steps to Reproduce:
1. start calc
2. navigate to a cell with contens and look at the formula bar

Expected Results:
the formula or contents of the cell is placed in formula bar and editable

Actual Results:
Can not edit the cell from the formula bar. it appears blank.
when openning (extending it) the contents of the cell appears on the second line instead of the first line of the formula bar.

Reproducible: Always

1.	Visit an empty cell 
2.	Visit a cell with contents
3.	Now the contents is hidden in the formula bar
4.	Expand the formula bar
5.	Now the contents is visible in the formula bar in the second line
6.	Minimize the formula bar
7.	Now the contents is *visible*+*editable* in the formula bar
8.	Visit another cell with contents
9.	Now the contents of the new cell is still visible in minimized the formula bar
10.	Visit an empty cell
11.	Now the contents is again hidden in the formula bar

Maybe duplicate of Bug 148410 ?

Version: 7.3.4.2 (x64) / LibreOffice Community
Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: he-IL (he_IL); UI: he-IL
Calc: CL
Comment 1 m_a_riosv 2022-06-29 21:27:00 UTC
Please attach a sample file.
I had never seeing such behavior. Maybe there is a new line before the formulas.
Comment 2 haim.shaposhnik 2022-07-01 12:50:36 UTC
Created attachment 181068 [details]
A sample file
Comment 3 haim.shaposhnik 2022-07-01 12:51:30 UTC
Created attachment 181069 [details]
Screen Captures
Comment 4 Scott Clewell 2022-07-05 15:00:10 UTC
Thank you for reporting Haim, I can reproduce once I set the interface language to Arabic but not in English.

Version: 7.3.2.2 (x86) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: ar-SA
Calc: CL 

and with

Version: 7.1.8.1 (x86) / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: ar-SA
Calc: CL
Comment 5 m_a_riosv 2022-10-27 13:12:18 UTC
*** Bug 151786 has been marked as a duplicate of this bug. ***
Comment 6 Telesto 2022-10-28 03:30:06 UTC
Did this happen in older version too, or is this a recent problem?
Comment 7 Tatsuhiko Shoji 2022-10-28 11:16:26 UTC
Since 7.4.0.
Comment 8 Stéphane Guillou (stragu) 2023-11-30 09:21:47 UTC
*** Bug 158021 has been marked as a duplicate of this bug. ***
Comment 9 ady 2023-11-30 10:41:49 UTC
Repro for any RTL UI.

Repro since LO 6.4, not repro in LO 6.3.

Expanding and shrinking the formula bar shows the content of the current cell, until changing to another cell (mentioned in comment 0 too).

Still happening in LO 24.2 alpha.
Comment 10 Stéphane Guillou (stragu) 2023-11-30 11:21:57 UTC
Reproduced in recent trunk build:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5589659829f8a1cef8ca1c8a468732105bbe231b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

In my tests, I see a regression with changes in 5.4, 6.1 and 6.3.

Steps used:
1. Open Calc (with gen VCL plugin)
2. Type some text in cell A1
3. Move to cell A2, then back to A1

A) In 5.4, it foes from always showing the contents, to showing them cut-off in both step 2 and step 3.
Bibisected with linux-64-releases repo to release build commit [e5ac7be2b575a592e058645acfb431cb532ca229] which is libreoffice-5.4.5.1.
The linux-64-5.4 bibisect repo stops at 328f3e7e4c67bf2e09a56f199a4332f1b1fe3b11, so I couldn't bibisect further.
RTL-related commits in the range:
- 32623337ba186bd7aac028920a1e1a6484e5e30f - tdf#114939 sal: fix endMD5() off-by-one
- 7a59ef66c268674548d13c13b19d52a25445299f - ofz#5535 max decimal places for rtl_math_round is 20

B) In 6.1, it goes from text cut off in formula bar, to being shown only in step 3.
Bibisected with linux-64-6.1 repo to first bad build commit [bae6d83b04fe4fb8e2d1d00b88de5d3b9bb59952] which points to:
commit 596fd41b9b19e28bab0c84e3821f79cb5d468f24
author	Szymon Kłos Fri Mar 23 19:51:37 2018 +0100
committer	Szymon Kłos Thu Mar 29 16:59:55 2018 +0200
tdf#116536 Fix bullet position with linespacing > 100
Reviewed-on: https://gerrit.libreoffice.org/51790

C) In 6.3, it goes from contents only visible in step 3, to not visible at all.
Bibisected with linux-64-6.3 repo to first bad build commit [7d36aa012a8250a8c1b1d177be10f0ade7d71227] which points to:
commit 04b60370a73b79e3aa0a04bc7cff45dff1db6286
author	Thorsten Wagner Tue May 21 13:36:32 2019 +0200
committer	Eike Rathke Fri May 24 19:53:30 2019 +0200
tdf#101443 Calc multiline input bar reworked
Reviewed-on: https://gerrit.libreoffice.org/71937

Caolán, I thought you might be interested.
Comment 11 ady 2023-11-30 12:28:32 UTC
(In reply to Stéphane Guillou (stragu) from comment #10)
> In my tests, I see a regression with changes in 5.4, 6.1 and 6.3.

IMO, the Version field should be 6.4 (or 6.3 if you want). According to bug 158021 comment 3, it is repro in 6.4.0.0.alpha1 but not in 6.3.0.0.alpha1, which means that whatever introduced the _last_ regression that is still currently relevant was committed after the initial release of 6.3 and before the initial release of 6.4.

Additionally, whichever other commits that triggered the problem (or a similar one) in 5.4 and 6.1 were somehow resolved by 6.3.0. They might be helpful in order to find some pattern or source of the problem (and perhaps add some comment in order to avoid its returning back yet again), but they are not the commits to review for the _current_ situation, are they?
Comment 12 Stéphane Guillou (stragu) 2023-11-30 13:07:40 UTC
Created attachment 191143 [details]
Screenshot comparing RTL 6.0, RTL 24.2 and LTR 24.2

(In reply to ady from comment #11)
> IMO, the Version field should be 6.4 (or 6.3 if you want). [...]
> Additionally, whichever other commits that triggered the problem (or a
> similar one) in 5.4 and 6.1 were somehow resolved by 6.3.0
I disagree: I understand the original issue was already introduced in 5.4. The text is not really "on the second line", but all lines are given too much vertical space, resulting in it (partly or entirely) overflowing the formula bar's height.
The change in how it manifests in a collapsed formula bar might depend on a few things (VCL plugin, what focuses it, how the UI layout updates...).
See the attached comparison.
Comment 13 Stéphane Guillou (stragu) 2023-11-30 13:12:36 UTC
...which actually makes this a duplicate of bug 143440, turns out.
But let's do it the other way around, as there is more info here.
Comment 14 Stéphane Guillou (stragu) 2023-11-30 13:13:43 UTC
*** Bug 143440 has been marked as a duplicate of this bug. ***
Comment 15 ady 2023-11-30 13:45:56 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> I disagree: I understand the original issue was already introduced in 5.4.

Yes, but somehow the behavior disappears and then comes back, and the last time it re-appeared that we know of is during the 6.4 development cycle + some patch that was backported to some 6.3.x release. In 6.3.0, it was not there.

Anyway, as long as the problem is found and resolved...
Comment 16 Stéphane Guillou (stragu) 2023-11-30 15:00:39 UTC
(In reply to ady from comment #15)
> Yes, but somehow the behavior disappears and then comes back, and the last
> time it re-appeared that we know of is during the 6.4 development cycle +
> some patch that was backported to some 6.3.x release. In 6.3.0, it was not
> there.
I don't think the behaviour disappeared and came back, I think what Kira described in bug 158021 comment 3 is the same as my Comment 10 (C): not visible anymore when focusing a cell that has content – which is the part the steps in bug 158021 focused on. But the issue with contents not showing while editing was already there.
This matches what you describe: the commit made it in after tagging 6.3.0alpha1, and before tagging 6.4.0alpha1.
Of course, happy to be proven wrong with an extra bibisect :)

Anyway, to add to the story: the larger line height (the source cause of this issue) already existed _for extra lines_ before 5.4, so it might even be an implementation error from multiline formula bar...
Comment 17 ady 2023-11-30 16:17:22 UTC
(In reply to Stéphane Guillou (stragu) from comment #16)
> I don't think the behaviour disappeared and came back, I think what Kira
> described in bug 158021 comment 3 is the same as my Comment 10 (C): not
> visible anymore when focusing a cell that has content

Just to be clear, the current behavior (LO 24.2 alpha with RTL UI) as you described it in comment 10 is that the content of the cell is not seen in the input window box of the formula bar, but:

* it is seen on the cell itself, always.

* expanding (down) the input window box of the formula bar, the content of the cell is displayed, but shown on the second line (or with a blank line space that seems as if the content would start on the second line).

* after expanding (down) the input window box of the formula bar, and then re-shrinking it, the input window box of the formula bar shows the content of the cell "correctly" (i.e. the blank line space is gone).

* by expanding (down) the input window box of the formula bar a second time, the empty line space is displayed again.

* moving the focus to another cell and then back to the original cell with content, the original problematic behavior/display is seen again.
Comment 18 Anat 2024-02-03 15:37:28 UTC
(In reply to Stéphane Guillou (stragu) from comment #14)
> *** Bug 143440 has been marked as a duplicate of this bug. ***

I opened Bug 143440 2.5 years ago, glad it pop up for others also.

I google today to find a workaround, and found I can change the formula bar to 2 lines instead of 5, thus not needing expand and close again and again.

anyway, the main problem is still that the content display in the formula's second line and you can not realy stand on the first line.

another thing I found out, that when the formula bar is not expanded, when you click to stand on the formula bar, it change and show the content, even though if you expand, the content is in the second line.

so it appear the problem is that it show after get focus to the formula bar and not showing if you just move with arrow to the next cell.

but I think the cause of the problem is realy the empty first line in the formula bar, maybe a new line hidden character or something, but it is something not disappear using backspace.