| Summary: | Auto_Open should not run from ThisWorkbook | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Justin L <jluth> |
| Component: | Calc | Assignee: | Justin L <jluth> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jluth, quikee |
| Priority: | medium | Keywords: | bibisected, bisected, regression |
| Version: | 7.4.0.0 alpha0+ | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:7.5.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 108908 | ||
| Attachments: | autoOpenClose.xls: various oddities with auto_open in Excel | ||
|
Description
Justin L
2022-10-06 18:00:27 UTC
Steps to reproduce 1.) Open autoOpenClose.xls and allow macros to run 2.) Accept MsgBox from ThisWorkbook.WorkBook_Open macro. 3.) That should be it. However, we have a second msgbox opening for ThisWorkbook.auto_open. This second one should not run (tested Excel 2010/2003). Prior to Tomaž' patch, hasMacro could return true if sMod.isEmpty() and a Module named sMacroName has a "Main" macro. I think that might have been for MS Word's benefit. At least AutoOpen works that way (although our code didn't get the macroURL right). It is probably better that it doesn't return true, but just noting the difference. Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ffc15725b58d0988b4e2ed836c5751223ad00984 tdf#148806 tdf#151393 xls vba: no Auto_Open from ThisWorksheet It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |