Bug 68118 - [UI] Can not attach macro from file to event if "Assign" window is opened from organize macros window
Summary: [UI] Can not attach macro from file to event if "Assign" window is opened fro...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected) release
Hardware: Other All
: medium normal
Assignee: Mike Kaganski
Whiteboard: target:5.3.0
Depends on:
Reported: 2013-08-14 17:23 UTC by Mirosław Zalewski
Modified: 2016-11-15 05:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

File with embedded macro (12.22 KB, application/vnd.oasis.opendocument.text)
2013-08-14 17:23 UTC, Mirosław Zalewski
Two windows side by side for comparison purposes (60.47 KB, image/png)
2013-08-14 17:24 UTC, Mirosław Zalewski
Screenshot AssignNotEnabled.png (6.67 KB, image/png)
2014-01-25 17:41 UTC, pierre-yves samyn

Note You need to log in before you can comment on or make changes to this bug.
Description Mirosław Zalewski 2013-08-14 17:23:56 UTC
Created attachment 84067 [details]
File with embedded macro

If you try to assign macro to event from Organize macros window, you can not choose macros embedded in document.

Steps to reproduce
1. Open any document with embedded macro (attached one for example; all that macro does is displaying friendly pop-up window, but you should check code anyway).
2. Choose Tools → Customize...
3. In new window go to "Events" tab. Select any entry and press "Macro..." (in upper right corner)
4. Note how library provides you with three sets for macros: My Macros, LibreOffice Macros and file macros. Close window.
5. Choose Tools → Macros → Organize macros → LibreOffice Basic...
6. In new window select any macro and press "Assign"
7. Again select any entry and press "Macro..." (in upper right corner)
8. Note how window is the same as in step 4 EXPECT you can not choose macro from document.

Actual results
Otherwise identical window provides different sets of options (see attached screenshot for comparison; of course red letters are added for easy identification)

Expected result
Identical windows should provide access to the same set of libraries. One should be able to assign macro embedded in document to event from Organize macros window.

Reproduced on:
- 3.6.6 from TDF website, Debian testing, amd64
- 4.0.4 from Debian repo, Debian testing, amd64
- 4.0.1 from TDF website, Debian testing, amd64
Comment 1 Mirosław Zalewski 2013-08-14 17:24:54 UTC
Created attachment 84068 [details]
Two windows side by side for comparison purposes
Comment 2 pierre-yves samyn 2014-01-25 17:40:54 UTC

I reproduce on windows 7/64 with Version:
Build ID: c63c03decdf780d8fb80823950665b782ec9ecd0

I set Status to New.

The problem with this dialog seems to me more serious: the "Assign" button is active only when a macro is selected (see AssignNotEnabled.png). 

This suggests that it is this macro that will be assigned to an event or a menu, etc..

It seems to me that all this feature should be reviewed.

Comment 3 pierre-yves samyn 2014-01-25 17:41:23 UTC
Created attachment 92778 [details]
Screenshot AssignNotEnabled.png
Comment 4 Joel Madero 2015-05-02 15:43:02 UTC Comment hidden (obsolete)
Comment 5 pierre-yves samyn 2015-05-07 14:06:40 UTC

Still reproduced on windows 7 & Version:
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale : fr_FR

Comment 6 QA Administrators 2016-09-20 09:36:57 UTC Comment hidden (obsolete)
Comment 7 Mike Kaganski 2016-11-03 11:35:04 UTC
Still reproducible with Version:
Build ID: 458a9fd8065737af212bb6bbba285ecb9aad1bb8
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: ru-RU (ru_RU); Calc: group
Comment 8 Mike Kaganski 2016-11-05 22:30:33 UTC
A patch is submitted for review: https://gerrit.libreoffice.org/30600
Comment 9 Commit Notification 2016-11-14 08:58:25 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":


tdf#68118: Pass current document frame to SvxScriptSelectorDialog

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.