summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwshb.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabvwshb.cxx')
-rw-r--r--sc/source/ui/view/tabvwshb.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 74ee9d36e..215a65801 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -552,13 +552,12 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
SfxStringListItem aStrLst( nWhich );
if ( pUndoManager )
{
- List* pList = aStrLst.GetList();
+ std::vector<String> &aList = aStrLst.GetList();
sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
for (size_t i=0; i<nCount; i++)
- pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
- pUndoManager->GetRedoActionComment(i) ),
- LIST_APPEND );
+ aList.push_back( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
+ pUndoManager->GetRedoActionComment(i) );
}
rSet.Put( aStrLst );
}