diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-05 18:01:06 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-05 19:08:09 +0000 |
commit | a141cba76606c7dcc4965f0a25cc9a4ff2d8879e (patch) | |
tree | f6b9a765a7b257db0f7b56a9dd1d399ed259b1ba /svl | |
parent | 049ca7107ddb02c0b741c7aabd4c60971f418248 (diff) |
gtktiledviewer: expose undo/redo info in a repair document dialog
This shows the full undo and redo stack, with all the metadata available
via the LOK API.
Also fix SfxUndoManager::GetRedoActionsInfo(), so it's easy to show the
undo/redo stack in linear time; and fix a use-after-free in lokdocview.
Change-Id: I66625ed453efa61b5738d99d7d1ad8f468908240
Reviewed-on: https://gerrit.libreoffice.org/27913
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/undo/undo.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 3c6d6515a93c..f2f6bd84dccf 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -1333,9 +1333,9 @@ OUString SfxUndoManager::GetRedoActionsInfo() const { boost::property_tree::ptree aActions; const SfxUndoArray* pUndoArray = m_xData->pActUndoArray; - for (size_t i = 0; i < GetRedoActionCount(); ++i) + for (size_t i = GetRedoActionCount(); i > 0; --i) { - boost::property_tree::ptree aAction = lcl_ActionToJson(i, pUndoArray->aUndoActions[pUndoArray->nCurUndoAction + i].pAction); + boost::property_tree::ptree aAction = lcl_ActionToJson(i - 1, pUndoArray->aUndoActions[pUndoArray->nCurUndoAction - 1 + i].pAction); aActions.push_back(std::make_pair("", aAction)); } |