summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2023-04-11 17:21:48 +0200
committerJean-Pierre Ledure <jp@ledure.be>2023-04-11 18:59:39 +0200
commit9c60996fc2a536803d016d6f60f879f8a1e49a54 (patch)
treec07472f54c260bae8cc18b60b9bcc52187422af4 /wizards
parentf1ad6834e1c08ea59e85bfa8a1e47d81e2a92533 (diff)
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. Change-Id: Ia5dd21f6879c1a732d291d15d6fb9f4bf20c76e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150238 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/scriptforge/SF_FileSystem.xba4
-rw-r--r--wizards/source/scriptforge/SF_Utils.xba4
2 files changed, 5 insertions, 3 deletions
diff --git a/wizards/source/scriptforge/SF_FileSystem.xba b/wizards/source/scriptforge/SF_FileSystem.xba
index 21464c708fe5..b09f980429f4 100644
--- a/wizards/source/scriptforge/SF_FileSystem.xba
+++ b/wizards/source/scriptforge/SF_FileSystem.xba
@@ -1588,6 +1588,10 @@ 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 c19f815587ce..11753704c461 100644
--- a/wizards/source/scriptforge/SF_Utils.xba
+++ b/wizards/source/scriptforge/SF_Utils.xba
@@ -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