[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/sfx2

2013-09-04 Thread Caolán McNamara
 include/sfx2/passwd.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d83630190890969d6a668205d058c69983875a8c
Author: Caolán McNamara 
Date:   Wed Sep 4 10:31:18 2013 +0100

revert stray OUString->String conversion

introduced accidentally by a8af548c3be5a42cec7177c60c6d421d2dbc35b4

Change-Id: Ib99e5373a14e95f331ef9f00b9b392633f02d700

diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index b0efa7b..1f10c74 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -73,7 +73,7 @@ private:
 voidSetPasswdText();
 
 public:
-SfxPasswordDialog(Window* pParent, const OUString* pGroupText = NULL);
+SfxPasswordDialog(Window* pParent, const String* pGroupText = NULL);
 
 String GetUser() const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/sfx2 sfx2/source

2013-12-04 Thread Caolán McNamara
 include/sfx2/dispatch.hxx|   33 -
 sfx2/source/control/dispatch.cxx |   72 ---
 2 files changed, 68 insertions(+), 37 deletions(-)

New commits:
commit 5d98639ec39f302df3dd38498703630e0556938d
Author: Caolán McNamara 
Date:   Wed Nov 20 16:17:54 2013 +

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 
Tested-by: Michael Stahl 

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 2b02a5e..4cf5fb1 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -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_BoolbFlushed;
+SfxDispatcher_Impl*  pImp;
+sal_Bool bFlushed;
+std::deque< std::deque > aToDoCopyStack;
 
 private:
 // Search for temporary evaluated Todos
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 9acf705..3e10fff 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -67,31 +67,6 @@ DBG_NAME(SfxDispatcherFillState)
 
 typedef std::vector SfxRequestPtrArray;
 
-struct SfxToDo_Impl
-{
-SfxShell*  pCluster;
-bool   bPush;
-bool   bDelete;
-bool   bUntil;
-
-SfxToDo_Impl()
-: pCluster(0)
-, bPush(false)
-, bDelete(false)
-, bUntil(false)
-{}
-SfxToDo_Impl( bool bOpPush, bool bOpDelete, bool bOpUntil, SfxShell& 
rCluster )
-: pCluster(&rCluster)
-, bPush(bOpPush)
-, bDelete(bOpDelete)
-, bUntil(bOpUntil)
-{}
-~SfxToDo_Impl(){}
-
-bool operator==( const SfxToDo_Impl& rWith ) const
-{ return pCluster==rWith.pCluster && bPush==rWith.bPush; }
-};
-
 struct SfxObjectBars_Impl
 {
 sal_uInt32 nResId;  // Resource - and ConfigId of the Toolbox
@@ -1625,22 +1600,49 @@ void SfxDispatcher::FlushImpl()
 bFlushed = sal_True;
 OSL_TRACE("Successfully flushed dispatcher!");
 
+//fdo#70703 FlushImpl may call back into itself so use aToDoCopyStack to 
talk
+//to outer levels of ourself. If DoActivate_Impl/DoDeactivate_Impl deletes
+//an entry, then they will walk back up aToDoCopyStack and set outer
+//levels's entries to bDeleted
+aToDoCopyStack.push_back(aToDoCopy);
+std::deque& rToDoCopy = aToDoCopyStack.back();
 // Activate the Shells and possible delete them in the 2nd round
-for(std::deque::reverse_iterator i = aToDoCopy.rbegin(); i 
!= aToDoCopy.rend(); ++i)
-{
-if(i->bPush)
-{
-if ( pImp->bActive )
-i->pCluster->DoActivate_Impl(pImp->pFrame, sal_True);
-}
-else if ( pImp->bActive )
-i->pCluster->DoDeactivate_Impl(pImp->pFrame, sal_True);
+for(std::deque::reverse_iterator i = rToDoCopy.rbegin(); i 
!= rToDoCopy.rend(); ++i)
+{
+if (i->bDeleted)
+continue;
+if (!pImp->bActive)
+continue;
+if (i->bPush)
+i->pCluster->DoActivate_Impl(pImp->pFrame, sal_True);
+else
+i->pCluster->DoDeactivate_Impl(pImp->pFrame, sal_True);
 }
 
+aToDoCopy = aToDoCopyStack.back();
+aToDoCopyStack.pop_back();
+
 for(std::deque::reverse_iterator i = aToDoCopy.rbegin(); i 
!= aToDoCopy.rend(); ++i)
 {
-if(i->bDelete)
+if (i->bDelete && !i->bDeleted)
+{
+if (!aToDoCopyStack.empty())
+{
+//fdo#70703 if there is an outer FlushImpl then inform it that
+//we have deleted this cluster
+for (std::deque< std::deque >::iterator aI = 
aToDoCopyStack.begin();
+aI != aToDoCopyStack.end(); ++aI)
+{
+

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/sfx2 sc/inc

2013-07-01 Thread Caolán McNamara
 include/sfx2/sfxsids.hrc |1 +
 sc/inc/sc.hrc|3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d4d5c97b4eb0b0d28aac635482bca547d60b7cdc
Author: Caolán McNamara 
Date:   Mon Jul 1 11:46:05 2013 +0100

Resolves: fdo#66263 calc's protect records doesn't do anything, sid 
collision

Change-Id: I50c9f0bd28f17e5d56c6d6948871042ba64650ef
(cherry picked from commit 257ba103fb9ffae87189eb5d435969961fe4e98c)
Reviewed-on: https://gerrit.libreoffice.org/4651
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index d1227e3..f17124a 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -750,6 +750,7 @@
 #define SC_VIEW_START   (SID_SC_START)
 #endif
 #define FID_CHG_RECORD  (EDIT_MENU_START + 18)
+//see sc/inc/sc.hrc for the rest of the SC_VIEW_START entries
 #define SID_CHG_PROTECT (SC_VIEW_START + 84)
 
 // eof 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 6fbe3f0..b688cdd 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -123,6 +123,7 @@
 #define SID_NUMBER_DECDEC   (SC_VIEW_START + 58)
 
 // misc:
+#define SID_COLLABORATION   (SC_VIEW_START + 59)
 #define SID_LINKS   (SC_VIEW_START + 60)
 #define SID_INSERT_SIMAGE   (SC_VIEW_START + 61)
 #define SID_INSERT_SMATH(SC_VIEW_START + 63)
@@ -153,7 +154,7 @@
 
 #define SID_CHOOSE_DESIGN   (SC_VIEW_START + 82)
 #define SID_EURO_CONVERTER  (SC_VIEW_START + 83)
-#define SID_COLLABORATION   (SC_VIEW_START + 84)
+//See include/sfx2/sfxsids.hrc for reserved usage of (SC_VIEW_START + 84)
 #define SID_EXTERNAL_SOURCE (SC_VIEW_START + 85)
 
 #define SID_SC_INPUT_TEXTWYSIWYG(SC_VIEW_START + 86)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits