diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index d11d53f48ad1..c39f0f264a42 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -203,13 +203,12 @@ void OTableEditorDelUndoAct::Undo() void OTableEditorDelUndoAct::Redo() { // delete line again - sal_uLong nPos; std::vector< std::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); for (auto const& deletedRow : m_aDeletedRows) { - nPos = deletedRow->GetPos(); - pOriginalRows->erase( pOriginalRows->begin()+nPos ); + auto it = pOriginalRows->begin() + deletedRow->GetPos(); + pOriginalRows->erase(it); } pTabEdCtrl->DisplayData(pTabEdCtrl->GetCurRow()); |