sw/source/core/undo/undobj.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 637d80a4aebf2b65a855283a68e6dd72e9d6de30
Author: Michael Stahl <mst...@redhat.com>
Date:   Mon Feb 6 22:01:27 2012 +0100

    fdo#38745: fix hilariously stupid stack guards:
    
    The UndoRedoRedlineGuards that SwUndo::{Un,Re}doWithContext wants to
    put on the stack aren't actually variables, so the destructor gets
    invoked before the function call that the guard is supposed to protect.
    Regression from CWS undoapi.
    (cherry picked from commit 13424b43c25389e303774c3fb2f2beb3e20ceae5)
    
    Signed-off-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 60eaaf3..1645b32 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -251,7 +251,7 @@ void SwUndo::UndoWithContext(SfxUndoContext & rContext)
             dynamic_cast< ::sw::UndoRedoContext * >(& rContext));
     OSL_ASSERT(pContext);
     if (!pContext) { return; }
-    UndoRedoRedlineGuard(*pContext, *this);
+    UndoRedoRedlineGuard const g(*pContext, *this);
     UndoImpl(*pContext);
 }
 
@@ -261,7 +261,7 @@ void SwUndo::RedoWithContext(SfxUndoContext & rContext)
             dynamic_cast< ::sw::UndoRedoContext * >(& rContext));
     OSL_ASSERT(pContext);
     if (!pContext) { return; }
-    UndoRedoRedlineGuard(*pContext, *this);
+    UndoRedoRedlineGuard const g(*pContext, *this);
     RedoImpl(*pContext);
 }
 
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to