summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx4
-rw-r--r--sd/source/ui/view/viewshel.cxx7
2 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 44987fcaa791..2421d51ec461 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1778,8 +1778,8 @@ void CustomAnimationPane::onAdd()
maViewSelection >>= xShapes;
sal_Int32 nCount = xShapes->getCount();
- sal_Int32 nIndex;
- for( nIndex = 0; nIndex < nCount; nIndex++ )
+ aTargets.reserve( nCount );
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
{
Any aTarget( xShapes->getByIndex( nIndex ) );
aTargets.push_back( aTarget );
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index be1c561a096a..93f3fcc85684 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1168,7 +1168,7 @@ void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
{
// prepare list
std::vector<OUString> aStringList;
-
+ aStringList.reserve(nCount);
for (sal_uInt16 a = 0; a < nCount; ++a)
{
// generate one String in list per undo step
@@ -1195,9 +1195,8 @@ void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
{
// prepare list
::std::vector< OUString > aStringList;
- sal_uInt16 a;
-
- for( a = 0; a < nCount; a++)
+ aStringList.reserve(nCount);
+ for(sal_uInt16 a = 0; a < nCount; a++)
// generate one String in list per undo step
aStringList.push_back( pUndoManager->GetRedoActionComment(a) );