Author: pfg Date: Thu Aug 23 15:53:45 2012 New Revision: 1376557 URL: http://svn.apache.org/viewvc?rev=1376557&view=rev Log: #i108863# Application.Run could not work correctly.
In Application.Run Return the result of executing a macro Author: lihuiibm Reviewed by: Chen Peng Modified: incubator/ooo/trunk/main/oovbaapi/ooo/vba/XApplicationBase.idl incubator/ooo/trunk/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx Modified: incubator/ooo/trunk/main/oovbaapi/ooo/vba/XApplicationBase.idl URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/oovbaapi/ooo/vba/XApplicationBase.idl?rev=1376557&r1=1376556&r2=1376557&view=diff ============================================================================== --- incubator/ooo/trunk/main/oovbaapi/ooo/vba/XApplicationBase.idl (original) +++ incubator/ooo/trunk/main/oovbaapi/ooo/vba/XApplicationBase.idl Thu Aug 23 15:53:45 2012 @@ -45,7 +45,7 @@ interface XApplicationBase void Quit(); any CommandBars( [in] any Index ); - void Run( [in] string Macro, [in] /*Optional*/ any Arg1, [in] /*Optional*/ any Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30); + any Run( [in] string Macro, [in] /*Optional*/ any Arg1, [in] /*Optional*/ any Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30); void OnTime( [in] any EarliestTime, [in] string Procedure, [in] any LatestTime, [in] any Schedule ); float CentimetersToPoints([in] float Centimeters ); void Undo(); Modified: incubator/ooo/trunk/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx?rev=1376557&r1=1376556&r2=1376557&view=diff ============================================================================== --- incubator/ooo/trunk/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx (original) +++ incubator/ooo/trunk/main/vbahelper/inc/vbahelper/vbaapplicationbase.hxx Thu Aug 23 15:53:45 2012 @@ -57,7 +57,7 @@ public: virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException); - virtual void SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException); virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException); virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException); virtual void SAL_CALL Undo() throw (css::uno::RuntimeException); Modified: incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx?rev=1376557&r1=1376556&r2=1376557&view=diff ============================================================================== --- incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx (original) +++ incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbaapplicationbase.cxx Thu Aug 23 15:53:45 2012 @@ -286,7 +286,7 @@ VbaApplicationBase::getVersion() throw ( return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(OFFICEVERSION)); } -void SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) +uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException) { ::rtl::OUString aMacroName = MacroName.trim(); if (0 == aMacroName.indexOf('!')) @@ -332,6 +332,7 @@ void SAL_CALL VbaApplicationBase::Run( c uno::Any aRet; uno::Any aDummyCaller; executeMacro( aMacroInfo.mpDocContext, aMacroInfo.msResolvedMacro, aArgs, aRet, aDummyCaller ); + return aRet; } else {