Issue 18874 - Buttons (assigned macros) don't work after loadComponentFromUrl()
Summary: Buttons (assigned macros) don't work after loadComponentFromUrl()
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: lisabeeren
QA Contact: issues@api
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2003-09-01 05:29 UTC by lisabeeren
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

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


Attachments
the file I open with loadComponentFromURL that has buttons (11.30 KB, application/octet-stream)
2003-09-01 05:31 UTC, lisabeeren
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description lisabeeren 2003-09-01 05:29:41 UTC
Is this where 'form' (i.e. buttons, macros etc.) issues get put? I could not
find anything else that seemed remotely correct, this seemed the closest, so
feel free to shunt this to the correct spot.

I have a document with buttons, and macros assigned to those buttons.

When you open the document normally, and click the buttons, everything happens
very happily. But when the document is opened via loadComponentFromURL from my
java program, (my program uses the document as a template), when the buttons are
clicked nothing happens.

It works fine in OOo1.0.3, but not OOo1.1RC3

I can still select the macros from the Tools->Macros->Macro menu, and they run
as they should, but not from the click of a button.
If I right click on the button (in edit mode) and look at it's event
assignments, onrelease (or whatever it is) has the correct value.

I've got my Spreadsheet file, if anyone wants me to email it to them.

thanks
- Jonathon
Comment 1 lisabeeren 2003-09-01 05:31:40 UTC
Created attachment 8916 [details]
the file I open with loadComponentFromURL that has buttons
Comment 2 wolframgarten 2003-09-01 08:11:23 UTC
Changed component to spreadsheet.
Comment 3 frank 2003-09-01 11:39:11 UTC
Hi Lisa,

this is an Issue for the API team. So I set the flags and reassign it
to the owner of the API component.

Bets regards

Frank
Comment 4 ooo 2003-09-02 07:51:04 UTC
Works perfectly for me.  Maybe you forgot to set the
MacroExecutionMode in the arguments (MediaDescriptor) of
loadComponentFromURL() properly?  It does not work via UI either, if
the directory is not in the list of safe directories and you answer
the upcoming dialog not to execute macros.
Comment 5 ooo 2003-09-02 07:51:50 UTC
back to reporter
Comment 6 lisabeeren 2003-09-04 01:27:09 UTC
loadComponentFromURL doesn't bring up a 'execute macros?' dialog box.
it does if I open the file manually, and I can add the path to the
path list etc. But when I go loadComponentFromURL no such dialog pops
up. (the path isn't already in the list) (If the path is in the list,
it doesn't make any difference, the macros won't execute at a button
push; of course files opened manually again work fine)

This would mean that it isn't realising that the document has macros
(wouldn't it?) when loaded via loadComponentFromURL

My program is written in Java, and the load code is as follows.

        PropertyValue [] szArgs = new PropertyValue [1];
        szArgs[0] = new PropertyValue();
        szArgs[0].Name = "AsTemplate";
        szArgs[0].Value = new Boolean(asTemplate);

        XComponent xComponent = oCLoader.loadComponentFromURL(path,
"_blank", 0, szArgs );

it could be a java bug.

The frustration is of course that it works fine with OOo1.0.3. Which
would be ok, we'd just use that, except that 1.0.3 has a bug stopping
the registration of certain java components.

thanks for your time.

Lisa
Comment 7 lisabeeren 2004-04-08 07:18:50 UTC
I've been playing around with this issue a bit more.

All the macro's that my buttons were referring to, are in the document itself.
I've shifted the macros from the document, and into the openoffice.standard
location, and now they work.

Lisa.
Comment 8 lisabeeren 2004-05-17 02:06:33 UTC
You were right regarding Macro Execution mode, It seems there was a change
between OOo 1.0 and 1.1 that I was not aware of.

Here is a link that clarifies the issue

http://www.openoffice.org/servlets/ReadMsg?msgId=782516&listName=dev

I am satisfied that this issue is now closed.
Comment 9 thackert 2004-11-01 17:49:27 UTC
Could you verify this issue with a newer version of OOo? Or does it disappear?
If so: Could you close this issue, please?
Comment 10 thorsten.ziehm 2004-11-10 15:40:52 UTC
It is fixed and can be closed.
Comment 11 thorsten.ziehm 2004-11-10 15:41:11 UTC
closed