Apache OpenOffice (AOO) Bugzilla – Issue 52036
Macro execution mode incorrectly set
Last modified: 2017-05-20 11:29:31 UTC
The macro execution mode of documents is not set according to the security settings in all cases. Set macro security to the lowest possible value in tools/options/OOo/Security Create a text document with a document macro and insert a database field. Press the "Print File Directly" button and answer yes to go into the mail merge dialog. Create mail merges as file output. -> The created files have the macro execution mode set to "NEVER_EXECUTE" This is set because the medium doesn't contain a related macro mode item in SfxObjectShell::AdjustMacroMode() In this cases I'd vote for using the system security settings. Otherwise those settings don't make much sense.
The question is how the documents are created by the MailMerge implementation. In case UNO API call is used, "NEVER_EXECUTE" is used by default. If different mode is required it must be specified in MediaDescriptor property "MacroExecutionMode". This is designed so. To let the office configuration settings be used please use "USE_CONFIG" value. In case sfx c++ API is used, it should be discussed since the API is not so strictly specified as I know. But from general point of view I would say that the caller is responsible for this.
Reset assigne to the default "issues@openoffice.apache.org".