Kaydet (Commit) 13424b43 authored tarafından Michael Stahl's avatar Michael Stahl

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.
üst 89b68f68
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment