summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/viewshel.cxx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-05-22 21:57:20 -0700
committerJoseph Powers <jpowers27@cox.net>2011-05-22 21:57:20 -0700
commiteccb365dcabdb077546858340191e2846b0f34d2 (patch)
tree93a15c6e6142d384b68c8c0225c98e9bb66c4cbf /sd/source/ui/view/viewshel.cxx
parent6160c8da0bed075763efaafaeb3ea57f4efb1292 (diff)
Remove List from ImpGetUndoStrings & ImpGetRedoStrings
Diffstat (limited to 'sd/source/ui/view/viewshel.cxx')
-rw-r--r--sd/source/ui/view/viewshel.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 9c742859d679..bb1357808aa4 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1074,22 +1074,17 @@ void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
if(nCount)
{
// prepare list
- List aStringList;
+ ::std::vector< String > aStringList;
sal_uInt16 a;
for( a = 0; a < nCount; a++)
{
// generate one String in list per undo step
- String* pInsertString = new String(pUndoManager->GetUndoActionComment(a));
- aStringList.Insert(pInsertString, LIST_APPEND);
+ aStringList.push_back( String(pUndoManager->GetUndoActionComment(a)) );
}
// set item
rSet.Put(SfxStringListItem(SID_GETUNDOSTRINGS, &aStringList));
-
- // delete Strings again
- for(a = 0; a < nCount; a++)
- delete (String*)aStringList.GetObject(a);
}
else
{
@@ -1109,22 +1104,17 @@ void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
if(nCount)
{
// prepare list
- List aStringList;
+ ::std::vector< String > aStringList;
sal_uInt16 a;
for( a = 0; a < nCount; a++)
{
// generate one String in list per undo step
- String* pInsertString = new String(pUndoManager->GetRedoActionComment(a));
- aStringList.Insert(pInsertString, LIST_APPEND);
+ aStringList.push_back( String(pUndoManager->GetRedoActionComment(a)) );
}
// set item
rSet.Put(SfxStringListItem(SID_GETREDOSTRINGS, &aStringList));
-
- // delete Strings again
- for(a = 0; a < nCount; a++)
- delete (String*)aStringList.GetObject(a);
}
else
{