[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 Jean-Pierre Ledure changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|libreoffice-b...@lists.free |j...@ledure.be |desktop.org | --- Comment #8 from Jean-Pierre Ledure --- Reading https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1ui_1_1dialogs_1_1XFilterManager.html#ae6c608a77c755b24972d5d8abbddc1d4 it appears that an exception is raised on appendFilter() when a filter with the specified title already exists (even if not all contexts implement that exception). => The correction of the bug should be done in the ScriptForge code. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 --- Comment #7 from Jean-Pierre Ledure --- Possible workarounds are: (1) in the user script, insert a statement, like in next code: sub pickafile() GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") Set _SF_.FilePicker = Nothing f = ScriptForge.SF_FileSystem.pickfile() print(f) End Sub (2) in the sources of ScriptForge, force next re-execution where appropriate: ... = CreateScriptService("com.sun.star.ui.dialogs.FilePicker") WHAT SHOULD BE DONE ? (1) is an immediate solution to help the user (2) does not solve the root cause but avoids error in the ScriptForge context Please recommendation is requested here. If implementation of (2) is requested, current bug report may be assigned to myself. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 --- Comment #6 from Jean-Pierre Ledure --- The root cause is: when running next Basic code: Sub pickafile() a = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") a.appendFilter("*.*", "*.*") a.appendFilter("*.*", "*.*") End Sub the error occurs on the 2nd occurrence of line: a.appendFilter("*.*", "*.*") in the same graphical environments as described above: gen, gtk3: error kf5, win: no error The error does not happen in next code: Sub pickafile2() a = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") a.appendFilter("*.*", "*.*") a = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") a.appendFilter("*.*", "*.*") End Sub -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 Jean-Pierre Ledure changed: What|Removed |Added CC||j...@ledure.be --- Comment #5 from Jean-Pierre Ledure --- I confirm the error under Linux Mint: Version: 7.5.2.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: fr-BE (fr_BE.UTF-8); UI: fr-FR Ubuntu package version: 4:7.5.2~rc2-0ubuntu0.20.04.1~lo1 Calc: threaded in next code: sub pickafile() GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") f = ScriptForge.SF_FileSystem.pickfile() print(f) g = ScriptForge.SF_FileSystem.pickfile() print(g) End Sub on line: g = ScriptForge.SF_FileSystem.pickfile() The execution is normal under Windows: Version: 7.5.2.2 (X86_64) / LibreOffice Community Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2 CPU threads: 6; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-US (en_BE); UI: en-US Calc: threaded -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 Rafael Lima changed: What|Removed |Added Component|Calc|BASIC -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 --- Comment #4 from Rafael Lima --- (In reply to gellid from comment #3) > Xisco asks for a sample document. I was already able to reproduce the problem. So no need of an attachment for now. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 --- Comment #3 from gellid --- Xisco asks for a sample document. I tried to attach PickAFile.ods but this message appears "The content type ods file is invalid. Valid types must be of the form foo/bar where foo is one of application, audio, image, message, model, multipart, text, video and bar must not contain any special characters (such as "=", "?", ...)." and I don't understand what is required to submit a sample document -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 154462] BASIC The ScriptForge.SF_FileSystem.pickfile macro runs once and fails on a second call (gtk3/gen)
https://bugs.documentfoundation.org/show_bug.cgi?id=154462 Rafael Lima changed: What|Removed |Added CC||rafael.palma.l...@gmail.com Summary|BASIC The |BASIC The |ScriptForge.SF_FileSystem.p |ScriptForge.SF_FileSystem.p |ickfile macro runs once,|ickfile macro runs once and |then returns error |fails on a second call ||(gtk3/gen) Status|NEEDINFO|NEW --- Comment #2 from Rafael Lima --- I can reproduce this issue in "gtk3" and "gen". The first call works fine, but if you run it a second time, we get an error. Running the macro in kf5 works fine. If anyone else wants to test, do not forget to load the ScriptForge library first. For that, use the following: sub pickafile() GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") f = ScriptForge.SF_FileSystem.pickfile() print(f) End Sub -- You are receiving this mail because: You are the assignee for the bug.