diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-16 15:21:07 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-16 15:21:07 +0000 |
commit | 11ca14bcaa3bdcb7f5653b7ef0d958c29148dbb4 (patch) | |
tree | fff8898a8da5e6a8bfb168dcebebae96a48409a0 | |
parent | 4c95af204f4df8787ef0a9b223948adc9debd841 (diff) |
INTEGRATION: CWS impress15 (1.30.40); FILE MERGED
2004/11/01 15:48:53 dbo 1.30.40.1: #i34160# postponing posting of requests when dispatcher is locked [checked in for MBA]
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index ac7122a2df3a..d19dee24bbf9 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatch.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: obo $ $Date: 2004-11-16 15:26:50 $ + * last change: $Author: obo $ $Date: 2004-11-16 16:21:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,7 +138,10 @@ DBG_NAME(SfxDispatcherFlush); DBG_NAME(SfxDispatcherFillState); //================================================================== +typedef SfxRequest* SfxRequestPtr; SV_IMPL_PTRARR( SfxItemPtrArray, SfxPoolItemPtr ); +SV_DECL_PTRARR_DEL( SfxRequestPtrArray, SfxRequestPtr, 4, 4 ); +SV_IMPL_PTRARR( SfxRequestPtrArray, SfxRequestPtr ); DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 ); //================================================================== @@ -187,6 +190,7 @@ struct SfxObjectBars_Impl struct SfxDispatcher_Impl { + SfxRequestPtrArray aReqArr; const SfxSlotServer* pCachedServ1; // zuletzt gerufene Message const SfxSlotServer* pCachedServ2; // vorletzt gerufene Message SfxShellStack_Impl aStack; // aktive Funktionalitaet @@ -1586,7 +1590,10 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq ) else { // pImp->xPoster->Post(pExec); - pImp->xPoster->Post(new SfxRequest(*pReq)); + if ( pImp->bLocked ) + pImp->aReqArr.Insert( new SfxRequest(*pReq), pImp->aReqArr.Count() ); + else + pImp->xPoster->Post(new SfxRequest(*pReq)); } } // else @@ -2864,6 +2871,13 @@ void SfxDispatcher::Lock( sal_Bool bLock ) else if ( pBindings ) pBindings->InvalidateAll(sal_False); pImp->bLocked = bLock; + if ( !bLock ) + { + USHORT nCount = pImp->aReqArr.Count(); + for ( USHORT i=0; i<nCount; i++ ) + pImp->xPoster->Post( pImp->aReqArr[i] ); + pImp->aReqArr.Remove( 0, nCount ); + } } //-------------------------------------------------------------------- |