summaryrefslogtreecommitdiff
path: root/svl/source/undo/undo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/undo/undo.cxx')
-rw-r--r--svl/source/undo/undo.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index a9c50b6b8395..f9ed3a91c7db 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -1364,9 +1364,11 @@ OUString SfxUndoManager::GetRedoActionsInfo() const
{
boost::property_tree::ptree aActions;
const SfxUndoArray* pUndoArray = m_xData->pActUndoArray;
- for (size_t i = GetRedoActionCount(); i > 0; --i)
+ size_t nCount = GetRedoActionCount();
+ for (size_t i = 0; i < nCount; ++i)
{
- boost::property_tree::ptree aAction = lcl_ActionToJson(i - 1, pUndoArray->aUndoActions[pUndoArray->nCurUndoAction - 1 + i].pAction);
+ size_t nIndex = nCount - i - 1;
+ boost::property_tree::ptree aAction = lcl_ActionToJson(nIndex, pUndoArray->aUndoActions[pUndoArray->nCurUndoAction + nIndex].pAction);
aActions.push_back(std::make_pair("", aAction));
}