[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Tue Feb 7 02:50:04 PST 2012
sw/source/core/undo/undobj.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit de998662158e3654ac14469989d27ce963cce935
Author: Michael Stahl <mstahl at 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 <sbergman at 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);
}
More information about the Libreoffice-commits
mailing list