wizards/source/scriptforge/SF_FileSystem.xba |    3 +++
 wizards/source/scriptforge/SF_Utils.xba      |    6 ++----
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit ffbe4d480802a351a13ec70777e68e37c3c019eb
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Wed Apr 12 16:27:59 2023 +0200
Commit:     Jean-Pierre Ledure <[email protected]>
CommitDate: Thu Apr 13 09:44:06 2023 +0200

    ScriptForge (SF_FileSystem) tdf#154462 2nd call of PickFile() fails
    
    Error happens in gen and gtk3 modes.
    Does not happen in kf5 mode.
    
    Linux only. Windows OK.
    
    Patch on master:
    
https://git.libreoffice.org/core/commit/9c60996fc2a536803d016d6f60f879f8a1e49a54
    
    Change-Id: I2f28b389d33a62af969e9d48e398fa220f99d347
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150297
    Tested-by: Jean-Pierre Ledure <[email protected]>
    Reviewed-by: Jean-Pierre Ledure <[email protected]>
    Tested-by: Jenkins

diff --git a/wizards/source/scriptforge/SF_FileSystem.xba 
b/wizards/source/scriptforge/SF_FileSystem.xba
index 21464c708fe5..d81465dbff13 100644
--- a/wizards/source/scriptforge/SF_FileSystem.xba
+++ b/wizards/source/scriptforge/SF_FileSystem.xba
@@ -1588,6 +1588,9 @@ Try:
                &apos; Get selected file
                iAccept = .Execute()
                If iAccept = com.sun.star.ui.dialogs.ExecutableDialogResults.OK 
Then sFile = .getSelectedFiles()(0)
+
+               &apos;  Do not reuse a FilePicker, side effects observed (a.o. 
TDF#154462)
+               .dispose()
        End With
 
 Finally:
diff --git a/wizards/source/scriptforge/SF_Utils.xba 
b/wizards/source/scriptforge/SF_Utils.xba
index 91b703c46431..23145cb991df 100644
--- a/wizards/source/scriptforge/SF_Utils.xba
+++ b/wizards/source/scriptforge/SF_Utils.xba
@@ -21,7 +21,7 @@ REM 
===================================================================== GLOBAL
 Global _SF_            As Variant              &apos;  SF_Root (Basic) object)
 
 &apos;&apos;&apos;     ScriptForge version
-Const SF_Version = &quot;7.4&quot;
+Const SF_Version = &quot;7.5&quot;
 
 &apos;&apos;&apos;     Standard symbolic names for VarTypes
 &apos;                         V_EMPTY                 = 0
@@ -370,9 +370,7 @@ Dim oDefaultContext As Object
                                End If
                                Set _GetUNOService = .FileAccess
                        Case &quot;FilePicker&quot;
-                               If IsEmpty(.FilePicker) Or IsNull(.FilePicker) 
Then
-                                       Set .FilePicker = 
CreateUnoService(&quot;com.sun.star.ui.dialogs.FilePicker&quot;)
-                               End If
+                               Set .FilePicker = 
CreateUnoService(&quot;com.sun.star.ui.dialogs.FilePicker&quot;)      &apos;  
Do not reuse an existing FilePicker: TDF#154462
                                Set _GetUNOService = .FilePicker
                        Case &quot;FilterFactory&quot;
                                If IsEmpty(.FilterFactory) Or 
IsNull(.FilterFactory) Then

Reply via email to