Apache OpenOffice (AOO) Bugzilla – Issue 18199
macros defunct in a document opened by a macro function
Last modified: 2003-09-05 10:15:32 UTC
When a document is opened by a macro from another document, by calling StarDesktop.LoadComponentFromURL(DocPath,"_blank",0,Args()) ), macros contained in the opened document are not functional. (Or, to be more precise, are not triggered by initiating the control they are bound to; running them from the IDE works). This occurres in OOo1.1beta (on WinNT) and in OOo1.1RC1 (on Linux). PS: May not sound very impressing, but in our case, this breaks a lot.
Hi Andreas, don't know if this is for you guys or MBA Noel
Created attachment 8630 [details] bug-demonstration
Since this bug has not yet been confirmed, I prepared two little documents to demonstrate it: - first open 'child.sxw' and click on the button - a msgbox will appear - close 'child.sxw' and open 'parent.sxw' instead - click on the button, 'child.sxw' will reappear - click on the button in 'child.sxw' again - the msgbox will not appear. I would appreciate if this problem could be fixed in the official OOo 1.1 release, since we would have to stick to 1.0.3 otherwise... kind regards, Knut Hohenberg CIVS/Ambassade de France
AB->MBA: Please have a look. I can't imagine that Basic itself has a problem here.
This is an FAQ meanwhile. When a document is loaded via API no dialogs should pop up, because this might disturb automatic conversions. Without a dialog it is not possible to allow any macro execution in this document that is not done explicitly (via "Tools-Macro") for security reasons. This default behavior can be overwritten by a "MacroExecutionMode" parameter in the loadComponentFomURL call. The possible values can be found in com.sun.star.Document.MacroExecMode.idl. There have been several mails concerning this on the dev@api mailing list and a feature mail on the features@api mailing list.
.