wizards/source/sfdialogs/SF_Dialog.xba |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 892064f39320994331d92b1b7d5f543afcfe92c6
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 13:24: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
    (cherry picked from commit a9e9c3b2e2ab63121573a1b832dd6ea105d3afc2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194953

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:
                &apos;  To make visible an on-the-fly designed dialog when 
macro triggered from Python
                _DialogModel.DesktopAsParent = Not ( _BuiltFromScratch And 
_BuiltInPython )
                _DialogControl.setVisible(True)
-               &apos;  Watch the window Close button - not to be done for 
stored dialogs
-               If _BuiltFromScratch Then
-                       Set _TopWindowListener = 
CreateUnoListener(&quot;SFDialogs.SF_DialogListener._SFNONMODAL_&quot; _
-                                                                               
                , &quot;com.sun.star.awt.XTopWindowListener&quot;)
-                       _DialogControl.addTopWindowListener(_TopWindowListener)
-               End If
+               &apos;  Watch the window Close button
+               Set _TopWindowListener = 
CreateUnoListener(&quot;SFDialogs.SF_DialogListener._SFNONMODAL_&quot; _
+                                                                               
        , &quot;com.sun.star.awt.XTopWindowListener&quot;)
+               _DialogControl.addTopWindowListener(_TopWindowListener)
+               &apos;  Default return code
                lExecute = 0
        End If
 

Reply via email to