Kaydet (Commit) 528aba3a authored tarafından August Sodora's avatar August Sodora

SV_DECL_PTRARR_DEL->boost::ptr_vector

üst 8904dce9
...@@ -72,21 +72,17 @@ ...@@ -72,21 +72,17 @@
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <deque> #include <deque>
#include <boost/ptr_container/ptr_vector.hpp>
namespace css = ::com::sun::star; namespace css = ::com::sun::star;
//==================================================================
DBG_NAME(SfxDispatcherFlush) DBG_NAME(SfxDispatcherFlush)
DBG_NAME(SfxDispatcherFillState) DBG_NAME(SfxDispatcherFillState)
//================================================================== typedef boost::ptr_vector<SfxRequest> SfxRequestPtrArray;
typedef SfxRequest* SfxRequestPtr;
SV_IMPL_PTRARR( SfxItemPtrArray, SfxPoolItemPtr );
SV_DECL_PTRARR_DEL( SfxRequestPtrArray, SfxRequestPtr, 4, 4 )
SV_IMPL_PTRARR( SfxRequestPtrArray, SfxRequestPtr );
SV_IMPL_PTRARR( SfxItemPtrArray, SfxPoolItemPtr );
DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 ); DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 );
//==================================================================
struct SfxToDo_Impl struct SfxToDo_Impl
{ {
...@@ -1264,7 +1260,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq ) ...@@ -1264,7 +1260,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
else else
{ {
if ( pImp->bLocked ) if ( pImp->bLocked )
pImp->aReqArr.Insert( new SfxRequest(*pReq), pImp->aReqArr.Count() ); pImp->aReqArr.push_back(new SfxRequest(*pReq));
else else
pImp->xPoster->Post(new SfxRequest(*pReq)); pImp->xPoster->Post(new SfxRequest(*pReq));
} }
...@@ -2176,10 +2172,9 @@ void SfxDispatcher::Lock( sal_Bool bLock ) ...@@ -2176,10 +2172,9 @@ void SfxDispatcher::Lock( sal_Bool bLock )
pImp->bLocked = bLock; pImp->bLocked = bLock;
if ( !bLock ) if ( !bLock )
{ {
sal_uInt16 nCount = pImp->aReqArr.Count(); for(size_t i = 0; i < pImp->aReqArr.size(); ++i)
for ( sal_uInt16 i=0; i<nCount; i++ ) pImp->xPoster->Post(&pImp->aReqArr[i]);
pImp->xPoster->Post( pImp->aReqArr[i] ); pImp->aReqArr.clear();
pImp->aReqArr.Remove( 0, nCount );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment