Bug 142415 - Using mouse click in a base to launch a macro from a cell in a table control does not work
Summary: Using mouse click in a base to launch a macro from a cell in a table control ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.3.0 target:7.2.2 target:7.1.7
Keywords: bibisected, bisected, regression
: 142416 144772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-21 21:47 UTC by Dan McNamara
Modified: 2021-11-10 10:28 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 Dan McNamara 2021-05-21 21:47:45 UTC
Description:
Macros run from buttons. the macro that will not launch will run when manually started.

Steps to Reproduce:
1. mouse click on cell
2.
3.

Actual Results:
Nothing

Expected Results:
Run macro


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Robert Großkopf 2021-05-22 06:41:14 UTC
*** Bug 142416 has been marked as a duplicate of this bug. ***
Comment 2 Robert Großkopf 2021-05-22 06:44:19 UTC
Could you please describe it a little bit more?
When reading the title you are using a form in Base? 
There is a tablecontrol and you want to execute a macro when clicking on the cell of a tablecontrol?
Comment 3 Dan McNamara 2021-05-22 12:45:42 UTC
Your comments are correct. Form with table control. When I click on a cell I want to run a macro that will act on the data in that row. Nothing happens. I can run the macro manually. Macros assigned to buttons work.

My first line of code is a message box to show if it is running.
I hope this helps.
Comment 4 Robert Großkopf 2021-05-22 13:33:46 UTC
First I thought this might be a duplicate of bug 89917. Then I tested with https://bugs.documentfoundation.org/attachment.cgi?id=113999 and detected: Not only the events of write protected tablecontrol has been gone. The events from mouse in editable tablecontrols has also been gone.

This works in LO 7.5.0.2, fails with LO 7.1.3.2 on OpenSUSE 15.2 64bit rpm Linux.
Comment 5 Buovjaga 2021-08-26 17:44:22 UTC
(In reply to Robert Großkopf from comment #4)
> First I thought this might be a duplicate of bug 89917. Then I tested with
> https://bugs.documentfoundation.org/attachment.cgi?id=113999 and detected:
> Not only the events of write protected tablecontrol has been gone. The
> events from mouse in editable tablecontrols has also been gone.
> 
> This works in LO 7.5.0.2, fails with LO 7.1.3.2 on OpenSUSE 15.2 64bit rpm
> Linux.

Please, can you explain how I can see the problem in attachment 113999 [details]? If I edit the form and control properties of the control in Tablecontrol, the events are empty even in 7.0 and 6.3.
Comment 6 Robert Großkopf 2021-08-26 19:49:08 UTC
(In reply to Buovjaga from comment #5)
> (In reply to Robert Großkopf from comment #4)
> > First I thought this might be a duplicate of bug 89917. Then I tested with
> > https://bugs.documentfoundation.org/attachment.cgi?id=113999 and detected:
> > Not only the events of write protected tablecontrol has been gone. The
> > events from mouse in editable tablecontrols has also been gone.
> > 
> > This works in LO 7.0.5.2, fails with LO 7.1.3.2 on OpenSUSE 15.2 64bit rpm
> > Linux.
> 
> Please, can you explain how I can see the problem in attachment 113999 [details]
> [details]? If I edit the form and control properties of the control in
> Tablecontrol, the events are empty even in 7.0 and 6.3.

Have a look at form Kontakte_Query_not_editable_Tablecontrol.
Open the form for editing.
Right Mousbutton on "Name" → Column → Events: Mous button released is linked to Main
Right Mousbutton on "EMail" → Column → Events: Mous button pressed is linked to Main
Right Mousbutton on "Web" → Column → Events: When receiving focus is linked to Main
It is nearly the same in the form Kontakte_Query_editable_Tablecontrol. Only "Web" is linked by "Mouse inside".

Every field is linked to the same macro which only shows a msgbox "Event happens".
Please click with mouse on the tablecontrol of Kontakte_Query_editable_Tablecontrol. The msgbox will appear. Might be you have to click not only one time for it. on LO t.o.* and earlier versions.
Comment 7 Buovjaga 2021-08-26 20:19:26 UTC
(In reply to Robert Großkopf from comment #6)
> (In reply to Buovjaga from comment #5)
> > (In reply to Robert Großkopf from comment #4)
> > Please, can you explain how I can see the problem in attachment 113999 [details]
> > [details]? If I edit the form and control properties of the control in
> > Tablecontrol, the events are empty even in 7.0 and 6.3.
> 
> Have a look at form Kontakte_Query_not_editable_Tablecontrol.
> Open the form for editing.
> Right Mousbutton on "Name" → Column → Events: Mous button released is linked
> to Main
> Right Mousbutton on "EMail" → Column → Events: Mous button pressed is linked
> to Main
> Right Mousbutton on "Web" → Column → Events: When receiving focus is linked
> to Main
> It is nearly the same in the form Kontakte_Query_editable_Tablecontrol. Only
> "Web" is linked by "Mouse inside".
> 
> Every field is linked to the same macro which only shows a msgbox "Event
> happens".
> Please click with mouse on the tablecontrol of
> Kontakte_Query_editable_Tablecontrol. The msgbox will appear. Might be you
> have to click not only one time for it. on LO t.o.* and earlier versions.

Thanks, I was actually looking at the wrong attachment, but your explanation was still crucial :)

I double-clicked Kontakte_Query_editable_Tablecontrol to open it and then clicked on the data entries a few times to try and provoke the event.

Bibisected with linux-64-7.1 to
https://git.libreoffice.org/core/commit/a751d9c414fc63f36ae4b54b8adbaba042b31f60
weld FormattedControl

Adding Cc: to Caolán McNamara
Comment 8 Commit Notification 2021-09-13 20:20:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1e531c31600a76e1d55e2f2e5abd351ff80bc4fd

tdf#142415 mouse events not propogated to table control event handlers

It will be available in 7.3.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 9 Caolán McNamara 2021-09-13 20:21:09 UTC
backports to 7-2 and 7-1 in gerrit
Comment 10 Commit Notification 2021-09-14 09:27:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/242dc1877c6ba75a3a6d995495c17af23487960f

tdf#142415 mouse events not propogated to table control event handlers

It will be available in 7.2.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 Commit Notification 2021-09-14 09:27:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/c53ef108af61421fb36cc21ce3d19e81050d1f10

tdf#142415 mouse events not propogated to table control event handlers

It will be available in 7.1.7.

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 12 Aron Budea 2021-10-31 23:10:26 UTC
*** Bug 144772 has been marked as a duplicate of this bug. ***
Comment 13 bugReportLOm 2021-11-10 10:15:08 UTC
With Version: 7.2.2.2 (x64), makros can again be started by "Mouse button pressed".
Problem solved for me.

Thanks to all involved for fixing this.


Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 6; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL
Comment 14 Aron Budea 2021-11-10 10:28:58 UTC
Great, marking as VERIFIED, thanks for the feedback!