summaryrefslogtreecommitdiffstats
path: root/include/sfx2/dispatch.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-20 16:17:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-20 16:20:21 +0000
commit32a621027f1a234a85b3659b93752a9263d8e860 (patch)
treef757b2a066b2ab8bf87f3fdf3140a1a95bef45bb /include/sfx2/dispatch.hxx
parentuse Puinave_Colombia [pui-CO] locale data, fdo#71836 (diff)
downloadcore-32a621027f1a234a85b3659b93752a9263d8e860.tar.gz
core-32a621027f1a234a85b3659b93752a9263d8e860.zip
Resolves: fdo#70703 guard against FlushImpl inside FlushImpl
where the inner one deletes Shells that the outer one is still processing. Push the candidates onto a stack and let inner FlushImpl modify them to inform outer FlushImpl's that an entry has been deleted Change-Id: I1db8546d53e24cc96c72f2cd5cbec57b6cecaff5
Diffstat (limited to 'include/sfx2/dispatch.hxx')
-rw-r--r--include/sfx2/dispatch.hxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index c48871aaa0ec..151d4833dcea 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -27,6 +27,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/viewfrm.hxx>
+#include <deque>
#include <map>
#include <vector>
@@ -76,10 +77,38 @@ public:
}
};
+struct SfxToDo_Impl
+{
+ SfxShell* pCluster;
+ bool bPush;
+ bool bDelete;
+ bool bDeleted;
+ bool bUntil;
+
+ SfxToDo_Impl()
+ : pCluster(0)
+ , bPush(false)
+ , bDelete(false)
+ , bDeleted(false)
+ , bUntil(false)
+ {}
+ SfxToDo_Impl( bool bOpPush, bool bOpDelete, bool bOpUntil, SfxShell& rCluster )
+ : pCluster(&rCluster)
+ , bPush(bOpPush)
+ , bDelete(bOpDelete)
+ , bDeleted(false)
+ , bUntil(bOpUntil)
+ {}
+
+ bool operator==( const SfxToDo_Impl& rWith ) const
+ { return pCluster==rWith.pCluster && bPush==rWith.bPush; }
+};
+
class SFX2_DLLPUBLIC SfxDispatcher
{
- SfxDispatcher_Impl* pImp;
- sal_Bool bFlushed;
+ SfxDispatcher_Impl* pImp;
+ sal_Bool bFlushed;
+ std::deque< std::deque<SfxToDo_Impl> > aToDoCopyStack;
private:
// Search for temporary evaluated Todos