summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/undo/undo.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 630bb9deea5b..0c081b152c3a 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -683,6 +683,16 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
return false;
}
+ if (i_contextOrNull && i_contextOrNull->GetUndoOffset() == 1)
+ {
+ if (m_xData->pActUndoArray->nCurUndoAction >= 2)
+ {
+ std::swap(
+ m_xData->pActUndoArray->maUndoActions[m_xData->pActUndoArray->nCurUndoAction - 1],
+ m_xData->pActUndoArray->maUndoActions[m_xData->pActUndoArray->nCurUndoAction - 2]);
+ }
+ }
+
SfxUndoAction* pAction = m_xData->pActUndoArray->maUndoActions[ --m_xData->pActUndoArray->nCurUndoAction ].pAction.get();
const OUString sActionComment = pAction->GetComment();
try