Description: It is not possible to trigger the Events "Before unloading" or "When unloading" when a Form is closed in Base. This malfunction already was documented in the LibreOffice Base Handbook in the year 2003 (Page 68: Unloading: This option seems not to function."). Even with LibreOffice 6.3.2.2 it is not working. Steps to Reproduce: 1. Create a Form within Base 2. Create a Macro e.g "Sub OnUnloadForm" 3. In the Form-Properties/Events assign the event "Before unloading" or "When unloading" to this Macro 4. Verify that this Macro will NOT be called when the form is unloaded Actual Results: I am not able to check if the form is getting closed. I don't know how to check if a form is open without this event. Expected Results: The Event-Triggers "Before unloading" and "When unloading" of a Form should be working. Reproducible: Always User Profile Reset: No Additional Info:
I meant the LibreOffice 4.0 Base Handbook from the year 2013, Page 68. Sorry for my faulty typed year.
Not sure this ever worked, and so probably inherited from OOo times.
Unfortunately, I'm not in a position to test older versions of LO on macOS Catalina, they either no longer work at all (32bit app support ceased with the release of Catalina) or else they refuse to recognize Java, making any Base related work impossible.
From a historical perspective, some of the UNO events, although present via the UI, were never actually implemented properly by Sun/Oracle. This could be one such pair, unless someone can show with a version of OOo that they worked at some stage.
@Hans : please provide a test ODB file with corresponding macro and form (or other object where event should be triggered), so that we can attempt to investigate further.
Created attachment 155768 [details] Attached the requested Test-ODB-File Open the database "LoadUnload.odb" and the included form "FormToTriggerEvent". Closing the form should call the macro "OnUnloadForm" showing a Messagebox. But the macro will never be called although the events "Before unloading" and "When unloading" of the form "FormToTriggerEvent" are assigned to the macro.
Thanks for investigating on this Error-Report. For more informations, please dont hesitate to contact me.
Thanks ! Confirming with test file provided by OP. Version: 6.4.0.0.alpha1+ Build ID: f7bc0204a80a4f078c63f93b9892904686ad5b36 CPU threads: 4; OS: Mac OS X 10.15.1; UI render: default; VCL: osx; Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US Calc: threaded
Seems that XEventListener is the culprit here.
See also: https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=10123
And this: https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Document_Events
@Samuel, I thought you might be interested in this issue....
Dear Hans, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
The bug (XEventListener as culprit, see comment 9]) is still active under LO 7.2.3.2 (Build: d166454616c1632304285822f9c83ce2e660fd92) and Win10x64 with newest updates.
The bug (XEventListener as culprit, see comment 9]) is still active under LO 7.6.3.2 (Build: 29d686fea9f6705b262d369fede658f824154cc0) and Win11x64 with newest updates.