Issue 121045 - After save a xls file contain marco in AOO, macor can't run in MS excel.
After save a xls file contain marco in AOO, macor can't run in MS excel.
Status: CLOSED FIXED
Product: App Dev
Classification: Unclassified
Component: vba
OOo 3.3 or older
All All
: P3 normal
: 4.0.0
Assigned To: issues@vba
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-19 08:15 UTC by binguo
Modified: 2013-07-12 11:00 UTC (History)
5 users (show)

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


Attachments
sample file (52.00 KB, application/vnd.ms-excel)
2012-09-19 08:15 UTC, binguo
no flags Details
Patch for this issue (20.00 KB, patch)
2012-09-20 01:48 UTC, Jianyuan Li
lijianyuan1983: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
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