Issue 121045

Summary: After save a xls file contain marco in AOO, macor can't run in MS excel.
Product: App Dev Reporter: binguo <binbjguo>
Component: vbaAssignee: issues@vba <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: issues, lijiany, lijianyuan1983, louqingle, sunying
Version: 3.3.0 or older (OOo)   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample file
none
Patch for this issue lijianyuan1983: review?

Description binguo 2012-09-19 08:15:00 UTC
Created attachment 79568 [details]
sample file

Build:
Aoo_Trunk\Aoo_Trunk_20120914.1800

Setps:
1. Launch AOO, Tools| Options...
2. Extend OpenOffice.org, select Security, click Macro Security button and check Low on Macro Security dialog. Click OK.
3. Extend Load/Save, select VBA Preperites, Check Executable code.
4. Open the sample file AOO, and click the button on sample file.
5. Input some text in the sample file.
6. Click "File -> Save" to save this file.
7. Close the file and open in MS Excel.
8.  Click the button on sample file.


Defect:
There is no response, Macro can't be run.
Comment 1 Jianyuan Li 2012-09-19 08:49:30 UTC
I am investigating this issue.
Comment 2 Jianyuan Li 2012-09-20 01:45:50 UTC
Background: In MS, there are two kinds of controls: Form control(TBX) and ActiveX control(OCX). 
Root cause: AOO exports the two as the same one TBX. Controls in sample file are OCX.
Resolution: Differentiate the two kinds when import and export them individually. There is key points -- object ID which will impact the running of exported OCX controls. Handle it when import and export.
Comment 3 Jianyuan Li 2012-09-20 01:48:44 UTC
Created attachment 79578 [details]
Patch for this issue
Comment 4 Jianyuan Li 2012-09-20 01:56:04 UTC
Limitation: The fix only focus on the command running.
Comment 5 sunying 2012-09-25 02:15:01 UTC
patch looks good and reivewed.
Comment 6 Jianyuan Li 2012-09-25 05:56:58 UTC
Committed in revision 1389715.
Comment 7 Jianyuan Li 2012-09-25 05:59:55 UTC
Fixed.
Comment 8 louqle 2012-11-06 02:50:22 UTC
verified on Win7, Mac 10.7 and suse 11 against trunk build 1404513, pass