diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2023-04-12 16:27:59 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2023-04-13 09:44:06 +0200 |
commit | ffbe4d480802a351a13ec70777e68e37c3c019eb (patch) | |
tree | 2978451a7b6cea482bbaaa18cde8e8ba08d5a194 | |
parent | tdf#154771 sw: fix drag & drop moving of table columns (diff) | |
download | core-ffbe4d480802a351a13ec70777e68e37c3c019eb.tar.gz core-ffbe4d480802a351a13ec70777e68e37c3c019eb.zip |
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 <jp@ledure.be>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
-rw-r--r-- | wizards/source/scriptforge/SF_FileSystem.xba | 3 | ||||
-rw-r--r-- | wizards/source/scriptforge/SF_Utils.xba | 6 |
2 files changed, 5 insertions, 4 deletions
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: ' Get selected file iAccept = .Execute() If iAccept = com.sun.star.ui.dialogs.ExecutableDialogResults.OK Then sFile = .getSelectedFiles()(0) + + ' 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 ' SF_Root (Basic) object) ''' ScriptForge version -Const SF_Version = "7.4" +Const SF_Version = "7.5" ''' Standard symbolic names for VarTypes ' V_EMPTY = 0 @@ -370,9 +370,7 @@ Dim oDefaultContext As Object End If Set _GetUNOService = .FileAccess Case "FilePicker" - If IsEmpty(.FilePicker) Or IsNull(.FilePicker) Then - Set .FilePicker = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") - End If + Set .FilePicker = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") ' Do not reuse an existing FilePicker: TDF#154462 Set _GetUNOService = .FilePicker Case "FilterFactory" If IsEmpty(.FilterFactory) Or IsNull(.FilterFactory) Then |