Issue 33662 - Macros in writer-documents loaded by LoadComponentFromURL don't work
Summary: Macros in writer-documents loaded by LoadComponentFromURL don't work
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: helgekraak
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 01:38 UTC by helgekraak
Modified: 2013-02-24 21:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description helgekraak 2004-09-01 01:38:09 UTC
When opening a new document with a Basic Macro assigned to a push button with
this code

>>Sub Open_Document
>>Dim mArgs(2) as New com.sun.star.beans.PropertyValue
>>Dim oDocument as Object

>>mArgs(0).Name = "ReadOnly"
>>mArgs(0).Value = True

>>mArgs(1).Name = "MacroExecMode"
>>mArgs(1).Value = 4

>>mArgs(2).Name = "AsTemplate"
>>mArgs(2).Value = FALSE 

>>oDocument =
>>ThisComponent.getCurrentController.GetFrame.loadComponentFromURL("The_Filepath","_blank",0,
 mArgs())

>>End Sub


Macros don't work in the newly opened document that has push buttons either. It
makes no difference when using 

- macro:// - URLs or the integrated Macro assigning feature. 
- opening the document as template or not (when opening a Template, macro:// -
assigned buttons get a "no privileges message" although the options security
dialog is set to "always run")
- any of the MacroExecMode modes or not
- _self, _blank or any other frame
- Stardesktop.getCurrentController..... instead of ThisComponent......
- a ThisComponent.reload function when the new document is opened
- the global macro library or the documents library

This also doesn't work in the 1.9 m51 of the Developers Build

Regards
Helge
Comment 1 helgekraak 2004-09-01 01:52:30 UTC
forgot to say that I also tried ReadOnly True or False with all other combinations
Comment 2 christianjunker 2004-09-01 04:28:19 UTC
This is not a bug, it's your mistake:
It's
>>mArgs(1).Name = "MacroExecutionMode"
>>mArgs(1).Value = 4

Not MacroExecMode.
Issue can thus be closed.
Comment 3 ooo 2004-09-09 15:36:46 UTC
same as #i33662 	
Comment 4 ooo 2004-09-09 15:37:11 UTC
invalid
Comment 5 helgekraak 2004-09-10 15:04:12 UTC
invalid
Comment 6 stefan.baltzer 2005-02-15 18:35:28 UTC
SBA: Closed.