summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/dispatch.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 676e02839154..e14723a466dd 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -69,12 +69,12 @@
#include <rtl/strbuf.hxx>
#include <deque>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
DBG_NAME(SfxDispatcherFlush)
DBG_NAME(SfxDispatcherFillState)
-typedef boost::ptr_vector<SfxRequest> SfxRequestPtrArray;
+typedef std::vector<SfxRequest*> SfxRequestPtrArray;
SV_IMPL_PTRARR( SfxItemPtrArray, SfxPoolItemPtr );
DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 );
@@ -120,7 +120,17 @@ struct SfxObjectBars_Impl
struct SfxDispatcher_Impl
{
- SfxRequestPtrArray aReqArr;
+ //When the dispatched is locked, SfxRequests accumulate in aReqArr for
+ //later dispatch when unlocked via Post
+ //
+ //The pointers are typically deleted in Post, only if we never get around
+ //to posting them do we delete the unposted requests.
+ SfxRequestPtrArray aReqArr;
+ ~SfxDispatcher_Impl()
+ {
+ for (SfxRequestPtrArray::iterator aI = aReqArr.begin(), aEnd = aReqArr.end(); aI != aEnd; ++aI)
+ delete *aI;
+ }
const SfxSlotServer* pCachedServ1; // last called message
const SfxSlotServer* pCachedServ2; // penultimate called Message
SfxShellStack_Impl aStack; // active functionality
@@ -2162,7 +2172,7 @@ void SfxDispatcher::Lock( sal_Bool bLock )
if ( !bLock )
{
for(size_t i = 0; i < pImp->aReqArr.size(); ++i)
- pImp->xPoster->Post(&pImp->aReqArr[i]);
+ pImp->xPoster->Post(pImp->aReqArr[i]);
pImp->aReqArr.clear();
}
}