Issue 108863

Summary: [From Symphony] Application.Run could not work correctly
Product: App Dev Reporter: lihuiibm <lihuibj>
Component: vbaAssignee: Chen Peng <chenpeng2006>
Status: CLOSED FIXED QA Contact: noel.power
Severity: Trivial    
Priority: P3 CC: binbjguo, issues, liushenf, pfg, pflin
Version: 3.3.0 or older (OOo)   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121368, 121425    
Attachments:
Description Flags
Fix for issue.
none
Unit test case for this issue.
none
Unit test case for this issue.
none
Change the patch because CallXScript is used instead of XScript.
none
Fix the issue in test document" Application_API_auto_TST-641E2B.xls"
none
Fix the issue in test document" Application_API_auto_TST-641E2B.xls"
none
Change the patch because CallXScript is used instead of XScript.
none
Patch for bug 108863 chenpeng2006: review? (pfg)

Description lihuiibm 2010-02-03 05:07:59 UTC
1. Root Cause:
Application.Run(...) does not return the result of executing a macro.
2. Resolution:
Return the result of executing a macro.
Comment 1 lihuiibm 2010-02-03 05:35:05 UTC
Created attachment 67546 [details]
Fix for issue.
Comment 2 noel.power 2010-03-09 11:58:00 UTC
looks ok, but
a) first hunk to msvbahelper.cxx seems no longer to be needed
b) msvbahelper has now changed and CallXScript is used instead of XScript 

so the patch needs to be regenerated, othewise this looks good :-), please take
it over ( and needs commiting to an upstream cws )
Comment 3 lihuiibm 2010-03-16 08:48:45 UTC
Created attachment 68364 [details]
Unit test case for this issue.
Comment 4 lihuiibm 2010-03-16 08:49:48 UTC
Created attachment 68365 [details]
Unit test case for this issue.
Comment 5 lihuiibm 2010-03-16 08:53:32 UTC
The msvbahelper.cxx should still be changed:
aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert(
'.', 0 ).Insert( sContainer, 0 ) ), this line should be moved to the 'else'
statement in method 'resolveVBAMacro(...)'.

Because the this line will be called two time if the macro name includes the
document name, such as: Application.Run("'Application API
Macro.xls'!My_Func_Sum", 3, 5).

I regenerated the patch, please review.
Comment 6 lihuiibm 2010-03-16 09:35:08 UTC
Created attachment 68366 [details]
Change the patch because CallXScript is used instead of XScript.
Comment 7 noel.power 2010-03-18 11:46:04 UTC
->lihuiibm
looks good to me!! thanks
Comment 8 lihuiibm 2010-04-19 10:48:07 UTC
Created attachment 68984 [details]
Fix the issue in test document" Application_API_auto_TST-641E2B.xls"
Comment 9 Pedro Giffuni 2012-02-24 18:45:23 UTC
Created attachment 77249 [details]
Fix the issue in test document" Application_API_auto_TST-641E2B.xls"

Update path for AOO 3.4 (is still not correct)
Comment 10 Pedro Giffuni 2012-02-24 18:56:01 UTC
Created attachment 77250 [details]
Change the patch because CallXScript is used instead of XScript.

Update the path and remove copyright changes.
Still untested.

Only for reference: the textdocissue patch looks newer.
Comment 11 Chen Peng 2012-08-23 06:07:17 UTC
Created attachment 79079 [details]
Patch for bug 108863
Comment 12 Chen Peng 2012-08-23 06:12:04 UTC
Comment on attachment 79079 [details]
Patch for bug 108863

Repatch it for AOO 3.5, passed the UT for the two sample.
Comment 13 SVN Robot 2012-08-23 15:54:10 UTC
"pfg" committed SVN revision 1376557 into trunk:
#i108863# Application.Run could not work correctly.In Application.Run Return ...
Comment 14 Pedro Giffuni 2012-08-23 15:55:13 UTC
Committed indeed, thanks!!
Comment 15 Shenfeng Liu 2012-10-18 05:00:12 UTC
Update Target Milestone to AOO 3.5.0.
Comment 16 binguo 2012-12-14 09:09:03 UTC
Latest build is Aoo_Trunk_20121207.1915 Rev.1413470, marked is as verified.
Comment 17 binguo 2012-12-14 09:10:29 UTC
close it