mib19: #163583# do not reschedule in callbacks

This commit is contained in:
Mikhail Voytenko
2010-09-10 16:33:00 +02:00
parent 8e29a77b5d
commit 583cd12ea4
2 changed files with 17 additions and 0 deletions

View File

@@ -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;

View File

@@ -655,6 +655,7 @@ RTLFUNC(DoEvents)
//aTimer.Start();
//while ( aTimer.IsActive() )
// Application::Reschedule();
Application::Reschedule( true );
}
RTLFUNC(GetGUIVersion)