summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-20 16:17:54 +0000
committerAndras Timar <andras.timar@collabora.com>2013-12-04 16:49:00 +0100
commitc064375f611e405434ebfc37034d916ac5bdb60a (patch)
tree60eaf058a5d53aedbd7c6e7970db2905472192ca /include
parentbd3e9519d6091c3294f846a927547c4c71cb4f1e (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/6735 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include')
-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 2b02a5e620c6..4cf5fb176630 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