Issue 121001 - [From Symphony]Macro doesn't work if click "Undo" button
[From Symphony]Macro doesn't work if click "Undo" button
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-18 02:10 UTC by Yan Ji
Modified: 2013-07-12 10:59 UTC (History)
5 users (show)

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


Attachments
sample (18.00 KB, application/vnd.ms-excel)
2012-09-18 02:10 UTC, Yan Ji
no flags Details
patch for the issue (448 bytes, patch)
2012-09-19 09:00 UTC, Lei Debin
debin.lei: review?
Details | Diff

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