Bug 66471 - Field events do not work after saving
Summary: Field events do not work after saving
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1.0.0.beta2
Hardware: Other macOS (All)
: medium blocker
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-01 20:43 UTC by Benny
Modified: 2013-07-05 23:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document (10.42 KB, application/vnd.oasis.opendocument.database)
2013-07-04 15:56 UTC, Petr Mladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benny 2013-07-01 20:43:48 UTC
To reproduce do the following:

1.Open a new database.
2.Open a new Form
3. Place two TextFields
4. Put an event on "focus lost", like a small programm: MsgBox "Event Done"
5. Check if that works (run the form, go from first field to second field, a Message Box should appear)

6. Save the Form, save the dbo and close it
7. Open the dbo again, open the form and try the same.
The Message Box does not appear again.
Same for all other events I have tested.(when receiving focus, key pressed, mouse actions)

This happens for me on a MacOS X Mountain Lion 10.8.4.
Have not yet tested on Windows or other.
Same on my application I have written for OO in all cases where events are needed.
At least I cannot use LO because of this.
Comment 1 Benny 2013-07-01 21:01:27 UTC
Just found that it works with Libre office 3.6.4.3

Regards,
Benny
Comment 2 Petr Mladek 2013-07-04 15:56:51 UTC
Created attachment 82033 [details]
Test document

I am unable to reproduce this problem.

Please, try the attached document. I created with my test build from the libreoffice-4-0 branch from yesterday. It is very close to 4.1.0.2. I did the testing on Linux.

There is test form "TestFocus". If I open it, put cursor into the text filed "A" and press [TAB], it runs the event and show msg box "Event Done".
Comment 3 Petr Mladek 2013-07-04 16:00:38 UTC
I wonder if it is MAC-specific, or it has already been fixed ort I did something wrong.

Benny, could you please try the last 4.1 build?
Could you please check my document if I added the event the right way?
Just to be sure? Do you have macros enabled in LO 4.1?
Comment 4 Jan Koberstein 2013-07-04 22:01:41 UTC
Hello Benny,

I can reproduce the mentioned behaviour with OS: Win7 SP1 32bit, LibO version: 4.1.0.1 (Build ID 1b3956717a60d6ac35b133d7b0a0f5eb55e9155),
but it seems to me not a bug, but a security-feature:


Have a look at:
Extras -> Options -> LibreOffice -> Security -> [button] macro security -> security level

If it is set to "high" (e.g. after default-installation), I get the information "this document contains macros. ... no macros will be executed ... ".
If I set it to "medium", I get a question if I opened the ODB-file, whether to activate macros or not. If I activate them, the message box is displayed as expected.

For me it is not a bug, but a setting issue, so I set the status to RESOLVED -> WORKSFORME.

Benny can you have a look on this option.
If it solves your problem, everything is fine.
Else please set the status back to UNCONFIRMED.

Regards
Jan
Comment 5 Benny 2013-07-05 23:47:58 UTC
OK guys, I feel really stupid now, as I had seen this before and did not get that I had to change security level.
Sorry for that one!