sw/source/core/undo/undobj.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit de998662158e3654ac14469989d27ce963cce935 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 f815398..b2a5243 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -249,7 +249,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); } @@ -259,7 +259,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