summaryrefslogtreecommitdiff
path: root/include
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-12-04 09:16:39 -0600
commit039fb1d5671274ba868dbbf12c8d606da27fb469 (patch)
tree9938b20210ea53ead842e4e0e328fc759e45fc61 /include
parent3da29e6813a64b97fb56436a80dae7fafc39eba3 (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> (cherry picked from commit 5d98639ec39f302df3dd38498703630e0556938d) Reviewed-on: https://gerrit.libreoffice.org/6928 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@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