Bug 122163 - Calling a method on a COM object should not require Type Library, it's optional.
Summary: Calling a method on a COM object should not require Type Library, it's optional.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Macro-Windows
  Show dependency treegraph
Reported: 2018-12-17 20:52 UTC by himajin100000
Modified: 2019-09-18 11:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Sample file for Steps to Reproduce (11.99 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-12-17 20:54 UTC, himajin100000

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2018-12-17 20:52:14 UTC
See steps to Reproduce

Steps to Reproduce:
0. Make sure you are using 32bit LibreOffice on Windows(not 64bit LibreOffice)
1. Open the attached document
2. Run Main() under VBAProject/Modules/Module1

Actual Results:
BASIC runtime error.

Type: com.sun.star.lang.IllegalArgumentException
Message: [automation bridge] The object does not have a function or readable property "escape"

Expected Results:

as Excel does.

Reproducible: Always

User Profile Reset: No

Additional Info:
ScriptControl's CodeObject property exists in Type Library but CodeObject's escape does not.


just as an experiment for my own environment, I wrote

ret = directInvoke( aFunctionName, aParams);

instead of current "throw;", and the code worked as expected.

similar thing may be needed for invokeGetProperty I guess.

I'm not that confident in writing good code, and waiting for some other person to do, honestly.
Comment 1 himajin100000 2018-12-17 20:54:13 UTC
Created attachment 147635 [details]
Sample file for Steps to Reproduce
Comment 2 Xisco Faulí 2019-01-21 18:44:20 UTC
Hello himajin100000,
Would you like to propose a fix in gerrit so core developers can review it ?
Comment 3 himajin100000 2019-01-21 19:42:49 UTC
Comment 4 Xisco Faulí 2019-01-21 22:25:17 UTC
(In reply to himajin100000 from comment #3)
> https://gerrit.libreoffice.org/#/c/66700/

Nice!! Moving to ASSIGNED
Comment 5 Xisco Faulí 2019-04-30 10:06:23 UTC
Dear himajin100000@gmail.com,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.