wizards/source/scriptforge/SF_PythonHelper.xba   |    1 +
 wizards/source/scriptforge/python/scriptforge.py |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d1e09ee551b18eedb46c2bb4bc5cd175b94bcd93
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Thu Jul 21 14:59:35 2022 +0200
Commit:     Rafael Lima <rafael.palma.l...@gmail.com>
CommitDate: Thu Jul 21 16:20:32 2022 +0200

    ScriptForge - tdf#149983 dialog.Execute() failure
    
    (patch https://gerrit.libreoffice.org/c/core/+/137113 cont'd)
    
    In SF_PythonHelper._PythonDispatcher():
    
    Force a hardcoded call of the methods in the Dialog
    service which may potentially be invoked while the
    dialog is displayed, bypassing the generic CallByName()
    Basic builtin function:
       Activate
       Center
       EndExecute
       Resize
       Execute => was missing in the list
                  Case when a parent dialog opens a child dialog
    (Controls is already hardcoded because returning an array)
    
    cfr.commit on master  https://gerrit.libreoffice.org/c/core/+/137289
    
    Change-Id: Ia54f2f0a45a212f6d8f35879a1ea92f68db35111
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137301
    Tested-by: Jenkins
    Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com>

diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba 
b/wizards/source/scriptforge/SF_PythonHelper.xba
index 178dfcc09749..99d9f86c610c 100644
--- a/wizards/source/scriptforge/SF_PythonHelper.xba
+++ b/wizards/source/scriptforge/SF_PythonHelper.xba
@@ -826,6 +826,7 @@ Try:
                                                        Case &quot;Center&quot;
                                                                If 
UBound(vArgs) &lt; 0 Then vReturn = vBasicObject.Center() Else vReturn = 
vBasicObject.Center(vArgs(0))
                                                        Case 
&quot;EndExecute&quot;             :       vReturn = 
vBasicObject.EndExecute(vArgs(0))
+                                                       Case 
&quot;Execute&quot;                        :       vReturn = 
vBasicObject.Execute(vArgs(0))
                                                        Case &quot;Resize&quot; 
                :       vReturn = vBasicObject.Resize(vArgs(0), vArgs(1), 
vArgs(2), vArgs(3))
                                                End Select
                                End Select
diff --git a/wizards/source/scriptforge/python/scriptforge.py 
b/wizards/source/scriptforge/python/scriptforge.py
index 003abfb9b2ee..ebc6f147c114 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -1799,7 +1799,7 @@ class SFDialogs:
             return self.ExecMethod(self.vbMethod + self.flgHardCode, 
'EndExecute', returnvalue)
 
         def Execute(self, modal = True):
-            return self.ExecMethod(self.vbMethod, 'Execute', modal)
+            return self.ExecMethod(self.vbMethod + self.flgHardCode, 
'Execute', modal)
 
         def GetTextsFromL10N(self, l10n):
             l10nobj = l10n.objectreference if isinstance(l10n, 
SFScriptForge.SF_L10N) else l10n

Reply via email to