Issue 121001

Summary: [From Symphony]Macro doesn't work if click "Undo" button
Product: App Dev Reporter: Yan Ji <yanji.yj>
Component: vbaAssignee: issues@vba <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: bjdujing, debin.lei, issues, lijianyuan1983, liushenf
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
none
patch for the issue debin.lei: review?

Description Yan Ji 2012-09-18 02:10:02 UTC
Created attachment 79539 [details]
sample

Build: AOO 3.5 Trunk Rev. r1384699
OS: Windows
Steps:
1. Enable macro and allow execute executable code in option setting
2. Load sample file
3. Without any other action, the "Undo" button is enabled
4. Click "Undo" button
5. Click button

Defect: Macro code cannot be executed.
Comment 1 Lei Debin 2012-09-18 05:18:36 UTC
I am checking the issue
Comment 2 Lei Debin 2012-09-19 02:59:56 UTC
After more investigation, when the file(.xls) loading, function ConvertFrom will called, and some convert action will add to Undo manager. So user can see some undo action from the UI. The behavior is abnormal. The file after loading, should NOT have any undo action.
Comment 3 Lei Debin 2012-09-19 03:03:23 UTC
For another objects, not form control, but drawing, graphic and so on, can reproduce the undo issue. So I figure out a simple solution, after convert finishing, call the GetUndoManager()->Clear() to clear the undo action.
Comment 4 Jianyuan Li 2012-09-19 08:36:23 UTC
Please add the patch.
Comment 5 Lei Debin 2012-09-19 09:00:05 UTC
Created attachment 79570 [details]
patch for the issue
Comment 6 Jianyuan Li 2012-09-19 09:31:36 UTC
Review and tested. OK.
Comment 7 Lei Debin 2012-09-25 02:50:31 UTC
@jianyuan, thx your review.
Now, the patch had been committed in Revision: 1389676
Comment 8 Du Jing 2012-10-17 01:55:14 UTC
verified on the build AOO3.5_r1397404
Comment 9 Shenfeng Liu 2012-10-18 05:37:13 UTC
Update Target Milestone to AOO 3.5.0.