diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-09-10 16:33:00 +0200 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-09-10 16:33:00 +0200 |
commit | a44186d2d4553bd6c89a1740fe2c35ae527e4e95 (patch) | |
tree | 267479a5ea93778a2ec7f84a28326b62b550877b /basic | |
parent | e232eb9772c62d91c8f92b8faaf8051240663e57 (diff) |
mib19: #163583# do not reschedule in callbacks
Diffstat (limited to 'basic')
-rwxr-xr-x | basic/source/classes/sbunoobj.cxx | 16 | ||||
-rwxr-xr-x | basic/source/runtime/methods1.cxx | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index b5e55a035c..dfa4ab5e04 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4432,6 +4432,19 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, ::rtl::OUString aFunctionName = m_aPrefix; aFunctionName += rFunction; + sal_Bool bSetRescheduleBack = sal_False; + sal_Bool bOldReschedule = sal_True; + SbiInstance* pInst = pINST; + if( pInst && pInst->IsCompatibility() ) + { + bOldReschedule = pInst->IsReschedule(); + if ( bOldReschedule ) + { + pInst->EnableReschedule( sal_False ); + bSetRescheduleBack = sal_True; + } + } + SbxVariable* p = xScopeObj->Find( aFunctionName, SbxCLASS_METHOD ); SbMethod* pMeth = p != NULL ? PTR_CAST(SbMethod,p) : NULL; if( pMeth == NULL ) @@ -4464,6 +4477,9 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, aRet = sbxToUnoValue( xValue ); pMeth->SetParameters( NULL ); + if( bSetRescheduleBack ) + pInst->EnableReschedule( bOldReschedule ); + // TODO: OutParameter? return aRet; diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 3fe0a73dea..8be8f3ffec 100755 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -655,6 +655,7 @@ RTLFUNC(DoEvents) //aTimer.Start(); //while ( aTimer.IsActive() ) // Application::Reschedule(); + Application::Reschedule( true ); } RTLFUNC(GetGUIVersion) |