wizards/source/sfdialogs/SF_Dialog.xba | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit a9e9c3b2e2ab63121573a1b832dd6ea105d3afc2 Author: Jean-Pierre Ledure <[email protected]> AuthorDate: Wed Dec 3 10:12:57 2025 +0100 Commit: Jean-Pierre Ledure <[email protected]> CommitDate: Wed Dec 3 12:02:29 2025 +0100 ScriptForge Fix Watch close button of all dialogs Cfr. patch https://gerrit.libreoffice.org/c/core/+/184662 Dialogs can either be stored in a library or created from scratch. When run in non-modal mode, the closing of a stored dialog with the window Close top-right cross was done by LO correctly in LO <= release 25.2. Since 25.8, both dialog created from scratch or stored in a library need a coded XTopWindowListener to have the job done. Since above-mentioned patch, SF activated a listener for on-the-fly dialogs only. Change-Id: I6fca927d2a2cea321eba5303d4ff3037f15b5841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194949 Reviewed-by: Jean-Pierre Ledure <[email protected]> Tested-by: Jenkins diff --git a/wizards/source/sfdialogs/SF_Dialog.xba b/wizards/source/sfdialogs/SF_Dialog.xba index 8c152925cd17..8a9b7742df06 100644 --- a/wizards/source/sfdialogs/SF_Dialog.xba +++ b/wizards/source/sfdialogs/SF_Dialog.xba @@ -2084,12 +2084,11 @@ Try: ' To make visible an on-the-fly designed dialog when macro triggered from Python _DialogModel.DesktopAsParent = Not ( _BuiltFromScratch And _BuiltInPython ) _DialogControl.setVisible(True) - ' Watch the window Close button - not to be done for stored dialogs - If _BuiltFromScratch Then - Set _TopWindowListener = CreateUnoListener("SFDialogs.SF_DialogListener._SFNONMODAL_" _ - , "com.sun.star.awt.XTopWindowListener") - _DialogControl.addTopWindowListener(_TopWindowListener) - End If + ' Watch the window Close button + Set _TopWindowListener = CreateUnoListener("SFDialogs.SF_DialogListener._SFNONMODAL_" _ + , "com.sun.star.awt.XTopWindowListener") + _DialogControl.addTopWindowListener(_TopWindowListener) + ' Default return code lExecute = 0 End If
