Bug 118440 - If a javascript macro embedded in a document has errors can't be edited
Summary: If a javascript macro embedded in a document has errors can't be edited
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-Javascript
  Show dependency treegraph
 
Reported: 2018-06-28 22:10 UTC by Luis
Modified: 2024-04-03 04:41 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (10.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-06-28 22:12 UTC, Luis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis 2018-06-28 22:10:45 UTC
Description:
In the case of a javascript macro embedded with errors editing the macro is impossible.

Steps to Reproduce:
1. Open the attached file and try to edit the javascript macro "MacroERROR"

2. Tools -> Macros -> Organize Macros -> Javascript...

3. In the document select embedded macro "MacroERROR" in "Library1"

4. Press "Edit" buttton

Actual Results:
There is a error message and then the Rhino debugger appears without the macro code.

Expected Results:
Appears the Rhino debugger with the macro code and the macro can be edited.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Luis 2018-06-28 22:12:01 UTC
Created attachment 143194 [details]
Test file
Comment 2 Julien Nabet 2018-06-30 14:32:54 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 4 himajin100000 2018-07-01 13:16:19 UTC
this = the fact that the rhino gui debugger tries to compile the script.
Comment 5 Xisco Faulí 2018-07-03 00:05:03 UTC
Also reproducible in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 6 himajin100000 2018-07-03 07:29:52 UTC
>https://opengrok.libreoffice.org/xref/core/scripting/examples/java/debugger/OORhinoDebugger.java?r=3f43627a#85

Oops, I was referring to "examples" one, I should have linked to the one in Main.java, which existed until the following commit.

https://github.com/mozilla/rhino/commit/88ff0e32f500c9b0fa04f4831bf266b3744a2900#diff-7afcd3364868d28a10547b0eba24a8aeL2780
Comment 7 Luis 2018-07-05 21:50:38 UTC
I have tried original Rhino debugger (version 5R5 and 7R1) to see behavior before changes to adapt to LO.
When you Open a script the debugger tries to compile.
If the script contains an error and can't be compiled then an error message is issued but the script file is not loaded.
So in LO this behavior is not changed.
Comment 8 QA Administrators 2021-04-19 03:39:37 UTC Comment hidden (obsolete)
Comment 9 Timur 2021-08-31 07:39:57 UTC
Repro 7.3+.
Comment 10 QA Administrators 2023-09-01 03:14:37 UTC Comment hidden (obsolete)
Comment 11 Stéphane Guillou (stragu) 2024-04-03 04:41:22 UTC
Reproduced as described with sample file in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 069bf61cea5e3aea07ffd5a1bb9f55324651cb35
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

However, with 58c4457a902c846229dc3383cc31bbc8f4b3aed9 now merged in trunk (and planned to be included in 24.8 release), the debugger/editor window is gone, so closing as "won't fix".