Bug 153752 - Calling a macro with non-ASCII characters in name from command line fails
Summary: Calling a macro with non-ASCII characters in name from command line fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.6.0 target:7.5.2
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-20 08:14 UTC by Mike Kaganski
Modified: 2023-02-22 08:11 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-02-20 08:14:04 UTC
0. Make sure that macro security level is medium or lower (to allow executing macros in documents).
1. Download attachment 185469 [details] from bug 153724. It contains a Basic sub named 'さかさことば2' in library Standard, module Module1.
2. Try this command line:

> soffice path/to/VBAForEachInSelectionProblem.ods macro://./Standard.Module1.さかさことば2

This command line is expected to execute the specified macro from the current document (after it's open). Before the fix to bug 153724, it is expected to raise Basic error. After the said fix, it is expected to reverse the content of the selected cell (A1: the "foo" should become "oof").

Actually, nothing happens after opening the document (with macros approved).

If the sub is renamed to something ASCII-only, and the command line is fixed accordingly, the macro executes as expected.

Tested with Version: 7.5.1.1 (X86_64) / LibreOffice Community
Build ID: bd819218336a5be54a11b986ea4dd2db2efb120e
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 1 Mike Kaganski 2023-02-20 17:49:58 UTC
https://gerrit.libreoffice.org/c/core/+/147345
Comment 2 Commit Notification 2023-02-21 04:30:47 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ccd0ef98f76011f108f8ea1d282b96386dba0a6a

tdf#153752: SbxObject::Execute: extra characters in Option Compatible mode

It will be available in 7.6.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.
Comment 3 Commit Notification 2023-02-21 05:53:55 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/527741d528ef347b28917976efffd366c62341b1

Related: tdf#153752 Use virtual method to avoid dynamic casts

It will be available in 7.6.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.
Comment 4 Commit Notification 2023-02-22 08:11:52 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/2074fd1b6c97e0b9b605297ad87e88647e3d05f9

tdf#153752: SbxObject::Execute: extra characters in Option Compatible mode

It will be available in 7.5.2.

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.