Bug 152532 - Assign Action dialog does not scroll to the event automatically in kf5
Summary: Assign Action dialog does not scroll to the event automatically in kf5
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:7.6.0 target:7.4.6 target:7.5.0.2
Keywords:
Depends on:
Blocks: KDE
  Show dependency treegraph
 
Reported: 2022-12-15 21:59 UTC by Rafael Lima
Modified: 2023-01-24 10:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample document with macro dialog (9.27 KB, application/vnd.oasis.opendocument.text)
2022-12-19 15:40 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-12-15 21:59:16 UTC
In the Dialog Editor of the Basic Dialog, when you select a control and choose an event to assign a macro, the Assign Action will open.

If the selected event is way down in the list, the dialog will not scroll automatically to the selected event.

This is a kf5-only issue. Works fine in gtk3 and in gen.

System info

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 01c9c971e43782800ebf63acc763a7e7fba096c1
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2022-12-19 15:40:39 UTC
Created attachment 184241 [details]
Sample document with macro dialog
Comment 2 Michael Weghorn 2022-12-19 15:47:07 UTC
Do I understand correctly that steps to reproduce are as follows?

1) open attachment 184241 [details]
2) Tools -> Macros -> Organize Dialogs
3) expand treeview for the document node, then press "Edit"
4) left-click on the "CommandButton 1" control
5) switch to tab "Events" in the left pane
6) Press the "..." button next to e.g. "Mouse outside"

-> The "Assign Action" dialog shows up, with the "Mouse outside" row preselected.

For gtk3, the selected entry is visible (scrolled to), for kf5 it is not.

In my case, it isn't visible (scrolled to) for gen either. Could you please double-check that it actually works for you?

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d640bfe7767292c8a89de57d378dd752a8ec8342
CPU threads: 12; OS: Linux 6.0; UI render: default; VCL: x11
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 3 Rafael Lima 2022-12-19 23:45:44 UTC
> Do I understand correctly that steps to reproduce are as follows?

Hi Michael. Yes, these are the exact steps. Thanks for the detailed info.

(In reply to Michael Weghorn from comment #2)
> In my case, it isn't visible (scrolled to) for gen either. Could you please
> double-check that it actually works for you?

I don't know why, but now I'm getting a weird result now. When I follow these steps I get scrolled to in gen, gtk3 and kf5. All of them are working, even with older LO versions.

Might this be related to the KDE frameworks version?

I'm on Kubuntu 22.10 using framweorks 5.100. Tomorrow I'll run more tests on another machine.
Comment 4 Rafael Lima 2022-12-20 12:54:59 UTC
Michael, on my main desktop using a very similar setup (Kubuntu 22.10, KF 5.100) the dialog does not scroll automatically.

Works fine with gen and gtk3.

It's hard to tell what's going on.

Tested with

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f0652cb46e4e162032a763f8515354506d1683ed
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 5 Michael Weghorn 2022-12-21 12:19:34 UTC
(In reply to Rafael Lima from comment #4)
> Michael, on my main desktop using a very similar setup (Kubuntu 22.10, KF
> 5.100) the dialog does not scroll automatically.
> 
> Works fine with gen and gtk3.
> 
> It's hard to tell what's going on.

Thanks for the additional testing. Odd that the behaviour differs across machines, but I think I've understood (part of) what the problem is and plan to come up with a fix.
Comment 6 Michael Weghorn 2022-12-22 10:41:37 UTC
Suggested change that fixes what I can reproduce: https://gerrit.libreoffice.org/c/core/+/144744
Comment 7 Commit Notification 2022-12-22 17:07:39 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d0ff08f8724c6fd2b7801c7eb8fa0a41a90f883

tdf#152532 vcl: Don't convert negative entry count to unsigned

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Weghorn 2022-12-22 17:12:34 UTC
With the commit from comment 7, scrolling works.

FYI: Note that the discussion in https://gerrit.libreoffice.org/c/core/+/144744 mentions another potential deeper underlying topic in addition (which the commit does not touch), but that's not part of this bug report.
Comment 9 Commit Notification 2023-01-04 15:08:49 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/286181de69590f5e8d7f576dd99b12554760a7b0

tdf#152532 vcl: Don't convert negative entry count to unsigned

It will be available in 7.4.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2023-01-04 15:19:53 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/616abb746ebd7d42f9c532b0ead137bb58ee7feb

tdf#152532 vcl: Don't convert negative entry count to unsigned

It will be available in 7.5.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2023-01-24 10:36:18 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard